The attached patch includes the code I used to make automatic paging. It will automatically add the page delimiter to the node body.

The configurable settings are:
Automatic Paging (on/off)
Number of words per page.

The node types selected under the normal options are respected. During the submit phase of a node edit, the automatic code parses the body text adding the page delimiter to every 'x' word of the body, as determined by the settings.

I didn't know how people would want the settings, so for now automatic paginations override manual set page breaks. If desired, I can split the settings up further into a manual section with its node types, and an automatic section with its node types.

Please review and comment.

Comments

Gurpartap Singh’s picture

StatusFileSize
new4.98 KB

Other than improvements, there's a change in your concept of removing manual page breaks. Rather, if manual page breaks are present, paging would skip auto pagination. This is more flexible. Everything seems stable and was tested well under Drupal 5.1. Also option to select node types for auto pagination is added. Only node types which has paging enabled are selectable.

Needs review.. Have reviewed self, but a word from others is good :)

Gurpartap Singh’s picture

Moreover, breaking through sentences might not be desirable.. Maybe separator can be placed to the nearest line break(\n or
)? (If implemented, it should be optional from paging settings.)

Gurpartap Singh’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
StatusFileSize
new6.72 KB

Patch applies against paging-5.x-dev release.

danmurf’s picture

Is this still a patch or was this feature added to the latest development snapshot?
Many thanks
Dan

Gurpartap Singh’s picture

Assigned: Gman » Gurpartap Singh
Status: Needs review » Fixed

Committed to CVS! Thanks!

psicomante’s picture

Wonderful Gurp ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.