- fix for preventing potential warnings if superglobal is not present
- minor amendments to previous commit; see #38
- fixed an issue when the library was in
condensed
mode and there were no records available
- lots of minor bug fixes and source code formatting because we are now using PHPStan for static code analysis and PHP CodeSniffer for detecting coding standards violations, which are now PSR12-ish with a few of the rules excluded
- fixed a bug when having arrays in the URL (like
select-products?&example[family]=MyFamily&example[subfamily]=Mysubfamily&other_param=Other
); see #36; thanks Franck Dupont!
- fixed a bug where encoded ampersands in pre-existing URL parameters were incorrectly handled; see #34; thanks Tom-Lovatt!
- fixed a bug where running the script on a server's home would cause the link to the first page to be incorrect; see #35; thanks Robert!
- fixed compatilibty issues with PHP 8 and updated examples to work with latest versions of MariaDB
- fixed bug where the library was not working correctly for
method
beingurl
,variable
beingan empty string
and last segment of an URL being a numerical value; see #25; thanks Bilge! preg_quote
-d user variables used inpreg_replace
; see #26; thanks Bilge!- removed
rel="next"
andrel="prev"
as these are not an indexing signal anymore; see #21; thanks Bilge! - pagination links are now in an
ordered list
instead of anunordered list
making the output semantically correct since the order of elements is imperative; see #24; thanks Bilge! - fixed bug where when
method
was set tourl
, the library would not respect the value ofavoid_duplicate_content
when this was set tofalse
; see #27; thanks Bilge! - fixed bug where having always_show_navigation set to
TRUE
would still not display pagination if there was a single page to be shown (see #6) - added a condensed mode which removes pagination links leaving only the next and previous buttons, links to the first and last pages, as well as a label showing the current page and the total available pages
- updated examples
- a new css_classes method was added for setting the CSS classes used in the markup; additionally, the library is now also compatible with Twitter Bootstrap 4
- updated example to use the
mysqli
extension instead of themysql
extension, fixing #6 - thank you Elra Ghifary - fixed some typos in the examples (see #9)
- unnecessary files are no more included when downloading from GitHub or via Composer
- minor source code tweaks
- documentation is now available in the repository and on GitHub
- the home of the library is now exclusively on GitHub
- fixed an issue when using the library with Composer
- the library is now compatible with Twitter Bootstrap
- fixed a bug where wrong class name was used in the JavaScript files
- project is now available on GitHub and as a package for Composer
- fixed some bugs with having pagination links shown in reverse order; thanks to marcin for all the feedback
- position of next/previous links can now be changed so instead of being on the outside of the links to individual pages these can now be shown also either to the left or to the right; see the newly added navigation_position method
- dropped support for PHP4; the library now requires PHP5+
- fixed a bug where if parts of the URL had HTML entities, these would wrongly be encoded again by the library when generating the pagination links; thanks to Phil
- "next page" and "previous page" links will now show their associated labels by default (label were previously hidden from the library's stylesheet file); labels can be changed/localized with the newly added labels method; also, the "next page" and "previous page" links are now always visible instead of just when there were more pages than the value of selectable pages
- pagination links can now be generated also in reverse order; use the newly added reverse method for that; thanks to marcin for suggesting
- everything is now centered by default
- changed the "next" and "previous" icons
- tweaked the CSS file
- in order to make the library more SEO friendly and to indicate the relationship between component URLs in a paginated series, rel="prev" and rel="next" were added to previous/next links; read more about pagination with rel="next" and rel="prev"; thanks to Igor
- corrections and additions to the documentation; thanks to Roberto Gomes
- the URL specified through the "base_path" method can now contain query strings; previously query strings in this value got automatically removed; also, any query strings existing in the page's URL were always preserved - now the "base_path" method accepts an additional argument to disable this behavior; thanks to Kesuma, Augusto Carvalho dos Santos, moregatest and to all the people reporting these things
- by also including a newly added JavaScript file, hashes in the URL can now also be preserved; the simple inclusion of the JavaScript file will do the trick; not including it will mean that hashes will not be preserved; thanks to Alan for requesting this
- fixed a bug where query strings got deleted if URLs were SEO friendly; thanks to theyouyou
- added a new method for setting whether the script should add a trailing slash to the URLs when generating SEO friendly URLs; read more on the subject on Official Google Webmaster Central Blog; thanks to theyouyou for suggesting.
- fixed a bug that appeared in version 1.2 that would remove all query string parameters from the URL, except the page-related one; thanks to kumbing for reporting
- when method is "url", the link to the first page does not include the "page" parameter anymore, in order to avoid duplicate content; previously this was true only for when method was "get"
- the link to the first page does not include the "page" parameter anymore, in order to avoid duplicate content; thanks to Sebi Popa for suggesting
- some optimizations were made in the code
- fixed a bug with the "next" link, when on first page; thanks to Jan for reporting.
- fixed a bug where disabling the "next" and "previous" links, when on first or last page respectively, was not working properly; thanks to Javier for reporting.
- fixed a bug where the "padding" method was not working (thanks to D. Koper for reporting)
- fixed a bug where the "set_page" method was not working correctly (thanks to D. Koper for reporting)
- when there is a single page available, the pagination links are not displayed anymore (thanks to Sebi P. for the suggestion)
- default style was tweaked a bit
- entire code was audited and improved
- cleaner output
- more complete examples were added
- method names, method arguments and global properties were changed and therefore this version breaks compatibility with previous ones
- initial release