:::: MENU ::::
Posts tagged with: Content Management

Drupal Published Date equals Effective Date fix

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);

Continue Reading