NP_Pager.php

NP_Pager provides an API for plugins that need to display paginated results, like lists of comments or posts, be it inside the admin area or not. It's based on PEAR::Pager and it is very powerful and flexible.

Warning: the plugin alone does nothing. So it is bundled with a NP_PagerDemo plugin that displays latest comments on all blogs (using pagination of course).

General Plugin info
Current Version: 0.1
Download: here (.tgz, 28KB)
Forum Thread: here

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the NP_Pager and NP_PagerDemo
  3. Add <%PagerDemo%> to a skin to see the “latest comments with pagination” example.

More Info

Benefits

  • For users:
    • Total control over how the pagination links will be displayed, including alternative texts, titles on links and the url parameters (i.e., translate '?page=2' to your language!).
  • For developers:
    • Forget pagination logic. Let NP_Pager do it for you.
    • Tons of options to give users total control over how the pagination links will be displayed.
    • Provide a 'SELECT' query to the plugin, it will build the 'COUNT' query and deliver the paged results and links using minimum MySQL resources.
    • Choose between 'mysql_fetch_row' or 'mysql_fetch_array' to get the current page data.
    • Extremely flexible and extensible. The plugin is provided with two PEAR::Pager pagination styles ('Sliding' and 'Jumping'), but you can add your own.
    • Easy, easy, easy paged pages. ;-)

History

  • Version 0.1, released 2005-12-03: initial version
pager.txt · Last modified: 2006/07/05 13:03 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki