NP_PageBreak

Allows multiple pages posts (how many extended texts you want). It breaks a post as defined by you and creates navigation links. Use <%pagebreak()%> every time you want a page break in your post. Useful for long texts, tutorials, presentations etc.

General Plugin info
Author: Rodrigo Moraes
Current Version: 0.9
Download: np_pagebreak_v0.9.zip
Code: NP_PageBreak code
Demo: -
Forum Thread: here

Instructions

  • Save the NP_PageBreak code as NP_PageBreak.php and upload it to your plugins directory or extract the zip file from the download above
  • Install the plugin in the admin area.
  • Put <%PageBreak(links)%> in your default and detailed templates.
  • You can also use <%PageBreak(next)%> in the templates to have a link to the next page on each page.
  • Use <%PageBreak(title)%> in your items.

How to use the plugin

Somebody asked this plugin here sometime ago, explaining how it could be used: Let's say I'm writing a review of a new gfx-card. It would be very useful to be able to split it into different sections, like benchmarks, drivers, conclusion and so on. The easiest way, from a user-point of view of course, would be to just add something like a <%pagebreak()%> command where the page should end and another begin. Maybe it could even be possible to name the pages with a little title-tag, like <%pagebreak(title)%>.

Version 0.2 implements page titles. Use <%pagebreak(Here's a title!)%> to set a title or <%pagebreak()%> to have leave it blank. See some tips here.

Feedback

Post bug reports and suggestions here at the Nucleus forum in thread 3995.

History

  • version 0.9:
    • bug fix: wrong link was generated when the blog was set to “Fancy URLs”.
  • version 0.8:
    • added 'full mode' to show all parts with plugins line ~NP_Print or ~NP_MailToaFriend.
  • version 0.7:
    • bug fix: first page, if untitled, wasn't showed.
  • version 0.6:
    • bug fix: navigation was added even on items with no page breaks.
    • added option: div for the next link.
  • version 0.4:
    • titles are added using <%pagebreak(title)%> anywhere (first page can have its own title or not);
    • navigation links are placed inside a customizable div that only appears when there are page breaks, so you can make it floats;
    • fancy url's compatibility;
    • added new options (reinstall the plugin to see them):
    • custom error message when trying to access a non-existent page
    • show numbers before navigation links?
    • navigation links start tag (default: <div class=“pagebreak”>)
    • navigation links end tag (default: </div>)
  • 0.3
    • fixed unwanted behavior: when using no title, a <h2><br /></h2> was added in the beginning of the page, resulting in a blank line. Now nothing appears.
  • 0.2
    • Added page title to each page! First line of each page will be the title - if empty numbers will be used;
    • Fixed bug: pagination appeared even on posts without <%pagebreak%>;
    • Current page has no link in the list anymore;
    • Added <ul> and <li> to the navigation links (easy customizable with css);
    • Added page breaks on extended parts (thanks, Hiro!).
    • More with less: improved code to deal with body and extended item parts.
  • 0.1b
    • Initial release: basic functionallity is done. (TODO: next/previous links.)

Plugin review

NP_PageBreak version 0.9 works with Nucleus CMS version 3.31 - 2007-11-25 kg

Note: doesn't work with Fancy Urls (e.g. item/76) and Fancier Urls (e.g. item/this-is-a-title).

pagebreak.txt · Last modified: 2007/11/25 16:32 (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