So this may not be perfect but i think its a good start to get the ball rolling.

here is the code : http://drupalbin.com/9359

This is my first time using nodequeue so i am having a hard time providing a proper integration with nodequeue and views etc etc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Status: Active » Closed (duplicate)

Thanks for taking the time to write this code!

There has been some discussion about the potential complications of such a feature at #378160: Pageing for long nodequeues which is worth reading. Please see the discussion there and feel free to jump in.

If this is not a duplicate, feel free to re-open this issue.

Thanks!

merlinofchaos’s picture

Status: Closed (duplicate) » Active

This is not a dup. That issue talks about the admin view of a nodequeue.

This is a pager for an individual node, using next/prev to go through a nodequeue jumping from one node to the next. This is the kind of pager you would use on galleries, and it is one of the features that could make nodequeue an excellent tool for creating user gallery sets (think: flickr)

Though this use a paging object which is probably unnecessary...nodequeue's code isn't OO.

ezra-g’s picture

Status: Active » Needs review

Thanks for the clarification. This would be an awesome addition, litwol! I agree with merlinofchaos that it would be more consistent with the rest of Nodequeue to have his feature not be OO. In any case, I hope to review soon.

litwol’s picture

There is no technical reasons behing me doing this in OO, i just wanted to scratch my own itch. I do not know nodequeue well enough to provide proper inegration, but with some guidelines and points from you i'm sure i could do it *the right way*.

ezra-g’s picture

Status: Needs review » Postponed (maintainer needs more info)

Any reason not to base this on http://drupal.org/project/custom_pagers ?

ezra-g’s picture

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Needs more information for more than 5 weeks -> closed.

litwol’s picture

Status: Closed (fixed) » Needs work

It doesn't need more information. It needs work to port OO code to drupal/nodequeue standard.

ezra-g’s picture

Status: Needs work » Postponed (maintainer needs more info)

Could you answer the question in #5?

litwol’s picture

Status: Postponed (maintainer needs more info) » Needs work

It is different on a basis that it is more light weight, it is more an an API for developers than a self contained feature like custom_pagers. IMHO both are not mutually exclusive and have their own use cases. Best outcome would be to have both integrations. have to start somewhere right ?

jerodfritz’s picture

FileSize
3.71 KB

My client wanted to be able to Next Previous between nodes based on their position in a nodequeue. I took some ideas from litwols class and made a module out of it. I have submitted it for review into contrib, but in the meantime feel free to use the attached.

sndev’s picture

LOL! this is funny I have a patch already for the nodequeue_pager module. :) Something to deal with the nodequeue having a maximum of 5 nodes displayed in the pager functionality.

ezra-g’s picture

picardo’s picture

Can anyone tell me if the patch has been added to the latest version of the module?

spazfox’s picture

Picardo: #11 is a separate module, not a patch. I downloaded and installed it and it works beautifully for me!

jerodfritz: any word on getting this approved for listing as a contrib module??

mokko’s picture

just for the record. I install and activate custom_pagers, associate some content types and the nodequeue-generated view and the pager appears on the page. Only "problem" is that it is not formatted nicely, so I have to work on css.

I would try the code from litwol and jerodfritz, but it seems that it is too much trouble installing from zip right this second. Therefore I am agnostic as to whether it merits to make a module out of that or not.

jjma’s picture

I het the following error

This version is not compatible with Drupal 7.x and should be replaced.

Jon

amateescu’s picture

Status: Needs work » Closed (fixed)

The archive from #11 has a module that is only for Drupal 6, you need to port it to Drupal 7.

With that said, I'm going to close this issue because it's clearly possible to create this functionality in a separate contrib module.

dsbrianwebster’s picture

Status: Closed (fixed) » Needs review
FileSize
2.79 KB

Just finished an initial port of this to D7 for a project I'm currently working on. I also addressed sndev's comment in #12.

Check it out. Maybe this should become an actual module?

I do wonder though at what point, rather at what length nodequeue, this pager becomes too strenuous on the DB.

Currently the module uses the nodequeue_load_nodes() function which builds the whole node object for each item in the queue. I think a custom db query retuning just the nids by their position would be leaner, no? Then perhaps we could set/get this result from the cache to avoid running this query on each node.

Thoughts?

Cellar Door’s picture

Just downloaded and used the D7 version - Works pretty good! Some undefined index issues to squelch but nothing large at all. Thanks for contributing this Delicious Simplicity!!

Dentorat’s picture

FileSize
2.97 KB

I've added some options to the module from #19 as well as fixed a bug. The module now checks if the node is in the nodequeue so it doesn't come back with errors. I've also added the ability to customize the text of the previous and next buttons sitewide under the nodequeue pager settings, as well as added the options to each block of whether to show the title of the node being linked to as well as the ability to have the block show only previous, only next, or both links.

merlinofchaos’s picture

It seems like this should at least be a sandbox, not a tarball. Sandboxes can be promoted to true projects with ease, and anyone can make them.

autopoietic’s picture

Issue summary: View changes

I have installed #21 and it seems to be working fine. Thanks litwol, jerodfritz, DS and penthehuman!

I agree with merlin that this should probably go into a sandbox, happy to put it there, but don't want to imply ownership. @litwol?

litwol’s picture

Throw credits somewhere in the module and it's all fine. More importantly making it into a separate project may increase ease of adaptation and help users so go ahead with it.

Cheers.

autopoietic’s picture

I have create a sandbox project to hold this module. I have only added the D7 version for now.

I moved theming to theme function to allow overrides and refactored slightly to remove the paging object as suggested by @merlinofchaos in #2.

https://drupal.org/sandbox/autopoietic/2285747

jenlampton’s picture

Status: Needs review » Closed (outdated)

Since this there are no patches provided, but several other contrib solutions for this problem, I'm going to mark this issue as closed / outdated. If anyone is interested in providing a patch to integrate one of those solutions into nodequeue directly, please reopen this issue with said patch attached.