Also, there is Auto Expire module: http://drupal.org/project/auto_expire
which lets only to renew node, without specifying exact expire date.
Disclaimer: Accessing the information on this page means you agree to the Sites Terms of Service
I recently created a classified website (Jan 2009) that is dedicated to used asphalt equipment. One of the features I wanted on the site, was the ability to transparently expire a node after x days (45 to be exact). The well known craigslist.org has a similar feature where a post would expire after 45 days but they recently changed it to 30. I'm guessing there are so many posts being put out that most people only look at the first few days.
Anywho, I wanted the ability on the site, for a mass number of users to create a post and have the post / node automatically expire after 45 days. Not knowing the power of the Rules module, I went in search of a module that would expire a node after a set time that I specified. Thats when I came across the Node Expire module.
After some extensive playing with both modules, I finally decided to go with the rules module because it will allow a node to transparently be unpublished without any say-so or input from the user. I didn't want them to mess with the expiration at all.
So, what exactly is the difference between the Rules and Node Expire Modules?
Rules is a very powerful module that allows certain "Actions" to happen on a Drupal site, after certain "Conditions" are met. I first setup a rule set that would unpublish a content type (post). Then I setup two rule triggers, one that says "When content is created, schedule the unpublish rule set" and another that says "When content is unpublished, then published, schedule the rule set". These are done at the system level where the user doesn't even know it's happening nor can they make any changes to how it operates. Use Rules to unpublish a node if you have a lot of users and you don't want them to set their own expirations. Keep in mind though that "powerful = complicated"... Rules isn't exactly for the faint-at-heart and will take some trial and error to get it right. I recommend setting up a sandbox to play with rules before implementing it on a production site.
Node Expire is designed for a site where there is only one (or a handful) of administrative persons and they all have the ability to set an expiration for a node. OR, a site where the user might need explicit permissions to set their own node expiration. A user who does not have the permission to set the expiration time, will be presented with an error saying that the post can't be created after an expiration date. I'm sure it is a bug that needs worked out, but basically, Node Expire won't allow (at this time) transparent expirations of nodes.
Version 2x of the Node Expire module will also integrate into Rules to give even more options for the expiration of a node, but I have not had very good luck in getting it to work on a site where I don't want the user to have access to node expirations.
At the time of this writing I had been testing the following versions:
Rules: v6.x-1.x-dev-[2009-Jan-16]
Node Expire: v6.x-2.02
Also, there is Auto Expire module: http://drupal.org/project/auto_expire
which lets only to renew node, without specifying exact expire date.
By the way, Node Expire permits to set up "default expiration date" in special php format, for example "+30 day" or "+2 month", then in "Publishing options" the default value will be what you need, the problem could be if you want to restrict user to change the date.
Hey,
How did you check if it was unpublished and then published again? I got it to unpublish a new content but not sure how to check if its been republished already...
Thanks
Hi,
nice thing .. I tried very long to get it working via a rule set and didn't know where the scheduler comes into play.
But now it works, thank you very much! :)
Bye, Chris
I know that is possible, but how to make it step by step ?
The same decision I came to, but I can't make it work! I have spent at least 5 hours combing through drupal.org's documentation (forums, issues, groups, handbook, etc). I have found dozens of posts by Rules users begging for a solution, but no response that answers how to do it.
If you could post or send me instructions on how to get rules to do this, I will write some clear documentation that even a beginner can follow and post it to the Drupal site and the drupal documentation team.
How to make this with the help of rules?
I know that is possible.
Post Comment