Skip to main content
deleted 315 characters in body
Source Link

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

This presents a new Checkbox called "Show Scheduling options in vertical tabs", which you can uncheck to display as a field. Then you give it some weight so it shows up where you want it to.

Scheduler Configuration Scheduler rendered field

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably wantEDIT: Here's a better way to domake this: happen with both Scheduler and Rules.

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)

    Create a Rule, "After saving new content"

  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)

    Add a condition of "Content is of type"

  3. Add an action to the second Rule that publishes the node

    Add an "Execute PHP" action with this:

    $node->publish_on = strtotime("[node:field-datefield-here]"); scheduler_node_insert($node)

  4. Create a Rule, "After updating existing content"

  5. Add a condition of "Content is of type"

  6. Add an "Execute PHP" action with this:

    $node->publish_on = strtotime("[node:field-datefield-here]"); scheduler_node_update($node);

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

This presents a new Checkbox called "Show Scheduling options in vertical tabs", which you can uncheck to display as a field. Then you give it some weight so it shows up where you want it to.

Scheduler Configuration Scheduler rendered field

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

This presents a new Checkbox called "Show Scheduling options in vertical tabs", which you can uncheck to display as a field. Then you give it some weight so it shows up where you want it to.

Scheduler Configuration Scheduler rendered field

It's been working for me in production for a month or so.

EDIT: Here's a better way to make this happen with both Scheduler and Rules.

  1. Create a Rule, "After saving new content"

  2. Add a condition of "Content is of type"

  3. Add an "Execute PHP" action with this:

    $node->publish_on = strtotime("[node:field-datefield-here]"); scheduler_node_insert($node)

  4. Create a Rule, "After updating existing content"

  5. Add a condition of "Content is of type"

  6. Add an "Execute PHP" action with this:

    $node->publish_on = strtotime("[node:field-datefield-here]"); scheduler_node_update($node);

added 354 characters in body
Source Link

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

This presents a new Checkbox called "Show Scheduling options in vertical tabs", which you can uncheck to display as a field. Then you give it some weight so it shows up where you want it to.

Scheduler Configuration Scheduler rendered field

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

This presents a new Checkbox called "Show Scheduling options in vertical tabs", which you can uncheck to display as a field. Then you give it some weight so it shows up where you want it to.

Scheduler Configuration Scheduler rendered field

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

added 890 characters in body
Source Link

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

It's been working for me in production for a month or so

There is a patch to make the Scheduler "Publish On" date render itself as a field: http://drupal.org/node/1203958

It's been working for me in production for a month or so.

If you would rather accomplish this using Rules, you would probably want to do this:

  1. Create a Rule that when Cron tasks are ran (event), Load all nodes of a type (action)
  2. Create a Rule that when Content is viewed (event), it checks the value of the Date field (condition) and checks that the Publish status is (not published)
  3. Add an action to the second Rule that publishes the node

So not only is this Rule kinda complicated and messy, but it also doesn't address what happens when a user decides to Unpublish the node. Then the rule will Publish it again automatically. That could be problematic, and the way to address it is equally messy.

The Scheduler module handles all of this pretty nicely, which is why I ended up using it. I went back and forth between Schedule and Rules, and ended up decided that Scheduler would allow me to sleep better at night.

Source Link
Loading