Attached is a new paging module that supports filters and CCK. By supporting filters, you can now enable or disable the paging based on input format (in admin / filters). I believe that this is the "Drupal way" rather than install something that always works on all nodes.
I've also added a setting so you can change the page break from <!--pagebreak--> to anything you want, primarily so that this module can be used with tinymce, and the pagebreak string can be changed to something that tinymce will output, such as <HR />.
A previous CCK patch was posted that I couldn't get to work. I've included a CCK patch that worked for me, here.
It would be nice to have a more generic solution, one that replaced all $node fields that had the paging input format enabled. I have not done this yet. The solution is to loop through the node fields looking for ones that are paging filter enabled, look for body and teaser fields specifically using preg_match(), match up body's and teaser's that go together, then run them through the work functions. All the matching work should be done one time, probably in load. I think this solution would catch flexinode nodes, however I haven't looked at the flexinode format close enough to know for certain.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | paging_rebuild.patch | 7.01 KB | Gurpartap Singh |
| #4 | paging_6.module | 5.16 KB | jax |
| #1 | paging_0.diff | 6.06 KB | douggreen |
| paging_5.module | 4.84 KB | douggreen |
Comments
Comment #1
douggreen commentedThis version displays the current paging separator in all of the help messages, and fixes a couple of comments that referenced the wrong module.
Comment #2
jax commentedYour patch doesn't apply to the module you attached originally. Could you provide a module with all the functionality? It would be easier to test, since now I cannot test it with the patch in it.
Comment #3
jax commentedThere is at least one bug in the thing:
$op is sent as 6th arg and _paging_nodeapi expects it as 4th. So you cannot even try this out...
btw, the patch is against the original module in project/paging, not the one presented here as I said in my previous post. If douggreen does not react I'll try to provide something that can be tested...
Comment #4
jax commentedAttached to this post is the paging.module from http://ftp.osuosl.org/pub/drupal/files/projects/paging-cvs.tar.gz with the paging_0.diff patch applied and the bug-fix described above. It seems to work.
Don't forget to activate the filter through:
administer > input formats > configure > check the Paging filter.
Comment #5
Gurpartap Singh commentedHere's a patch with following new features:
Paging with this patch seems to be at little next level. Thanks to douggreen, Nick Lewis, and Jax for the fixes :)
Comment #6
Gurpartap Singh commentedMarking RTBC. Seems working good. Will be commiting soon.
Comment #7
Gurpartap Singh commentedCommitted to CVS. For any further problems, please create new issue against the project.
Comment #8
(not verified) commented