Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would like to have a d7 port
Comment | File | Size | Author |
---|---|---|---|
#12 | prev-next-drupal7-port-1231996-5.patch | 38.41 KB | alexku |
#12 | prev-next-views-drupal7-port-1231996-8.patch | 3.06 KB | alexku |
#8 | prev_next-d7.tar_.gz | 7.5 KB | alexku |
#5 | prev_next-d7.zip | 13.66 KB | jdanthinne |
Comments
Comment #1
Jarviss CreditAttribution: Jarviss commentedsubscribe
Comment #2
Canadaka CreditAttribution: Canadaka commentedsubscribe
unless is there a better way or another existing module in D7 for prev/next links?
Comment #3
basicmagic.net CreditAttribution: basicmagic.net commentedsubscribe
Comment #4
MGParisi CreditAttribution: MGParisi commentedsubscribe
Comment #5
jdanthinne CreditAttribution: jdanthinne commentedHi,
I needed it too, so I've done a first port to D7, using Coder Upgrade and then fine-tuned it myself.
Using it on my own blog, and it's working fine, BUT I don't use the Views function, so this part needs to be checked.
Comment #6
BarisW CreditAttribution: BarisW commentedLooking good so far. It seems to work. The only thing I found is that the default text on the prev/next links is incorrect.
This is the default:
Where it should be:
Comment #7
jdanthinne CreditAttribution: jdanthinne commentedI haven't changed those values, they're the same as the D6 version.
So for those who want to upgrade, it wouldn't be good to invert that I think…
Comment #8
alexku CreditAttribution: alexku commentedAttached is a version of jdanthinne's port in comment #5 with fixed prev_next_views.
What was fixed:
Comment #9
mgiffordGreat. So how does this compare with what's in Git for D6? Also, can we get a patch of this so it is easier to see the changes? Great that it's been run through Coder. Thanks @alexku & @jdanthinne
Comment #10
alexku CreditAttribution: alexku commentedI have just run coders code review and still see some critical warnings. Will fix them in prev_next_views part and re-upload soon
Comment #11
mgiffordThanks!
Comment #12
alexku CreditAttribution: alexku commentedAfter fixing few coder module warnings I have created attached two patches. One is for initial d7 port from @jdanthinne and one is for prev_next_views
There are some warnings for prev_next module on using variables in db_query() query parameter.
Some of them (which use $search_criteria variable) are quite dangerous and can allow a user with 'access administration pages' permission to perform an SQL injection
Comment #13
Pls CreditAttribution: Pls commentedOk, so tested both patches against 6.x-1.x branch using vanilla D7 install.
Patch prev-next-drupal7-port-1231996-5.patch applies cleanly and prev_next navigation block works smoothly as expected.
Patch patch prev-next-views-drupal7-port-1231996-8.patch, which applies cleanly (though received warning about whitespace - it is right after function prev_next_menu() closing bracket) using latest views (and ctools) module with different node (nodes was generated by devel_generate) sort order's (Post date, Node ID, Image ALT) to see if everything is fine on different scenarios. And haven't seen any bugs.
Changing status to RTBC, though would be great if more testers could walk through same routine and test these patches. Thanks!
Comment #14
AndyF CreditAttribution: AndyF commentedI followed the procedure in #13 and the main module seems to be working fine, though I haven't thoroughly tested. I didn't try out the views module (actually not sure what it's supposed to do - just add a field?).
Comment #15
alexku CreditAttribution: alexku commentedViews part saves view query result in a session and uses it for paging later. So you can use filters/arguments/ordering for paging
Comment #16
bhosmer CreditAttribution: bhosmer commented