Features I need:

  • "Active" item in Nodequeue (a pointer) is kept track of for each Nodequeue.
  • Pointer can be modified via the admin (i.e. another node is made the "active" one
  • Every X (time increment) the "active" item in the Nodequeue is incremented by one.
  • The Nodequeue itself is NOT modified - only the pointer is.
  • Pointer loops back to the beginning when it encounters the end of the Nodequeue.
  • Upon modification of the Nodequeue the pointer checks to see if the node it's pointing to still is in the Nodeque. If not, then it attempts to point to the same queue position. If it cannot do that then it points to the previous queue position (if exists - otherwise the queue is empty).

Any module/mechanism out there which does this?

Thanks,
Hermes

Comments

EndEd’s picture

+1

hermes_costell’s picture

Update: I am currently working on this module

rgristroph’s picture

I coded something like this up, I did the following strategy, which is not optimal but worked.

I made the whatever-of-the-day queues, and for each one I also made a past-whatever-of-the-day queue.

In a custom module, I have a hook_cron(), which:

1) Checks that it has been at least X amount of time since it was last run (the last run timestamp is kept in a database variable).
2) For each of the pairs of queues, if there is more than one time in the -of-the-day queue, I take off one and put it on the past- queue.
3) The -of-the-day nodes are displayed as views limited to one item.

The site maintainer can add nodes to the queues, and the site will change each day until there is only one item in each queue, and it does not remove the last one. The past- queue allows the site maintainer to look over the history and avoid repeating.

Hopefully some of this info will be useful to you. My work was very hard-coded, and not suitable for rolling into a generic module.

--Rob

hermes_costell’s picture

Hi Rob:

Thanks for the thoughts. I'm actually almost done with the basic version of the module at this point. It will offer more functionality than you described - plus it won't be tied to cron runs (hence the site won't have to be set to run a cron run at least as often as the time iteration).

-Hermes

alex.a’s picture

Hello,

I have also written a "message of the day" module. I used the flag module to define the pool of daily messages, but after reading this topic, I made my message of the day module extensible with a module hook, so it can be extended by other modules to use nodequeue. I provide a flag and a content-type implementation.

My module is at: http://drupal.org/sandbox/alex.a/1083052
I believe anyone can check-out the code using git.

I've also added a post in the "Contributed Module Ideas": http://groups.drupal.org/node/13178
I'm not sure if we're rebuilding the wheel here.

-Alex

amateescu’s picture

Status: Active » Fixed

You should take a look at this sandbox project: http://drupal.org/sandbox/mshick/1147788. If you find that it matches your requirements, you can help by reviewing it so it gets promoted as a full project.

Status: Fixed » Closed (fixed)

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