Hi All,
Right now I have rules coupled with the Flag module so that when I flag a node, it gets "marked for publishing."
What I want to do is this but I'm unsure how: I want to have all nodes that are "marked for publishing" to be published at a given time but not all at once. For example, if I write 10 articles and flag them "marked for publishing," I want them to be in a "pool" more or less, where they sit and get published say one article per day instead of them all being published at once. If I wrote 2 more articles, they would be published in succession after the 10 nodes that are currently in "line" to be published, one day at a time.
I'm thinking this should be do-able with Rules and Flag module, but I'm currently lost on how to leverage these modules to get them to do this.
Any help is immensely appreciated, hopefully my question makes sense. Thank You.
Comments
Requires some coding
What you want to do most probably requires some coding, but not that much.
The solution I suggest involves the following steps:
1) A view that lists all the nodes that are published for scheduling. If you also apply DraggableViews you can let administrators reorder the nodes by drag-and-drop, which is always nice.
2) A custom PHP function
dailypublish_get_top_node()that executes the view above and returns the NID for the top node. I would recommend putting this in a custom mini-module.3) A rule that is triggered on cron run, and checks whether it is time to publish a new node (by, say, checking if the time is between 00.00 and 00.15 – depending on how often your cron runs). If it is time, then it fires action 'load node' and uses
dailypublish_get_top_node()to get the NID to load. Then it publishes the loaded node.If you want to make it even more clean, you write a Rules plugin instead of just a PHP function.
If you want it less clean, you write the function directly in an action for executing arbitrary PHP code.
Good luck!
//Johan Falk, NodeOne, Sweden
Thank You for your response
Thank You for your response Johan,
Unfortunately I'm more of a design type and have pretty much no experience with PHP.
I guess since coding is out of the picture for me at the current time, I would have to deal with scheduling nodes to publish per cck dates as shown on one of the Rules tutorials.
If anyone else can chime in with any other possible solutions other than writing a module, I'd greatly appreciate it. I'm wondering how to other news/magazine style Drupal sites manage automated content publishing?
The Scheduler module
Sorry about the PHP stuff – maybe someone else can come up with a no-coding solution (which would be neater).
I think most newspapers and magazines put a scheduling date on each article, just as you suggest. If this is the only scheduled action you want, I recommend using the Scheduler module. It does this very thing, and also includes a few neat extra stuff (like optionally changing the 'post date' to the publishing time).
All of this is possible to do with Rules, but Scheduler is a much quicker start.
Good luck!
//Johan Falk, NodeOne, Sweden