We have a gaming site where the node creation date is irrelevant to the user as they only see it once it is published by our moderators.
Surprisingly, there is no “published on” date in the original Drupal database, so the Views can only sort by the mysterious “created on” date.
As I didn’t want to hammer this problemmette away with the formidable Scheduler module, here’s a quick fix.
Get the Rules module and add this triggered rule:
- After updating existing content
- Conditions: updated content type fits, NEGATE “unchanged content is published”, “changed content is published”
- Custom PHP action:
$node->created = time();
return array(”node” => $node);
Seems to work just fine.
Now I can use the “posted on” date in Views to display the games in a logical manner. Too bad there is no way to do this retroactively.
Here’s my Rules screen shot:
And a related article: http://drupal.org/nyobserver.

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=038d56fd-d4cb-4073-8805-dc455ff2cfc8)



{ 2 comments… read them below or add one }
This is very cool but way do I need the “NOT unchanged content is published rule”??
not unchanged actually equals “updated”, and this is a choice because on our site, content gets taken offline and back online and we don’t want it to appear in “new items” if it was unchanged.