Rewrite php function
- or -
Post a project like this2656
$$$
- Posted:
- Proposals: 9
- Remote
- #1392693
- Completed
Certified Laravel Developer | PHP | VueJS | Wordpress | API | Logo | Responsive Design | Shopify
Karachi
Top rated PHP Web Development | WordPress | Magento | Drupal | OpenCart | PrestaShop | Joomla
Leicester
Web Developer - Core PHP | Zend, Codeignitor, Cakephp, Laravel | Wordpress | Javascript, Jquery, Angularjs | Amazon web services | API Integration | Web Scrapper
Ahmedabad
1460372260836518230102303810507541090782113073313714581428493
Description
Experience Level: Expert
General information for the website: Holiday Property Website
Description of requirements/features: I require a function I have to be completely re-written for one of my php classes. The function is called resultsNav and is used to provide back the html placed at the bottom of search result pages when search is run and the results span many pages. The html returned should is for the bootstrap framework pagination component:
http://getbootstrap.com/components/#pagination
The function should receive the following inputs and return the following outputs:
INPUTS:
$url - current url
$currentpage - page currently being viewed
$maxpage - total number of page of results required
$maxlinks – total number of href links displayed (any more an a page left and right will be applied – would be used if there were hundreds of pages of results, user would page through each 10 or so, this parameter will specific how many)
PROCESS:
Return False if $currentpage = 1 and $maxpage = 1 as there are no results pages required
The returned html will need to highlight the current active page using the ‘active’ CSS class.
The function will have to cater for the page parameter potentially being present in the url eg ‘page=3’ (the function will have to take the url provided and apply it to each results page href replacing the number in the page parameter with the relevant page for that href link). The page parameter may or may not be present.
The function will have to present a total number of href links based on the maxlinks parameter and if the pages required are more than maxlinks then further paging links should be provided so a user can page left and right through the results, further “Start” and “End” href links will be required so a user can go to the first and last group of pages.
The url provided could or could not contain parameters eg /propertyresults/?type=V or /villas/
OUTPUTS:
Return False if $currentpage = 1 and $maxpage = 1 as there are no results pages required
Otherwise, return html to display bootstrap pagination component
Happy to take questions. Existing function attached and can also provide examples of where this is used on websites to help provide further context if required.
Description of requirements/features: I require a function I have to be completely re-written for one of my php classes. The function is called resultsNav and is used to provide back the html placed at the bottom of search result pages when search is run and the results span many pages. The html returned should is for the bootstrap framework pagination component:
http://getbootstrap.com/components/#pagination
The function should receive the following inputs and return the following outputs:
INPUTS:
$url - current url
$currentpage - page currently being viewed
$maxpage - total number of page of results required
$maxlinks – total number of href links displayed (any more an a page left and right will be applied – would be used if there were hundreds of pages of results, user would page through each 10 or so, this parameter will specific how many)
PROCESS:
Return False if $currentpage = 1 and $maxpage = 1 as there are no results pages required
The returned html will need to highlight the current active page using the ‘active’ CSS class.
The function will have to cater for the page parameter potentially being present in the url eg ‘page=3’ (the function will have to take the url provided and apply it to each results page href replacing the number in the page parameter with the relevant page for that href link). The page parameter may or may not be present.
The function will have to present a total number of href links based on the maxlinks parameter and if the pages required are more than maxlinks then further paging links should be provided so a user can page left and right through the results, further “Start” and “End” href links will be required so a user can go to the first and last group of pages.
The url provided could or could not contain parameters eg /propertyresults/?type=V or /villas/
OUTPUTS:
Return False if $currentpage = 1 and $maxpage = 1 as there are no results pages required
Otherwise, return html to display bootstrap pagination component
Happy to take questions. Existing function attached and can also provide examples of where this is used on websites to help provide further context if required.
Ewan M.
99% (31)Projects Completed
35
Freelancers worked with
28
Projects awarded
76%
Last project
17 Sep 2018
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies