It would be handy if there was a global setting to control how long nodes live on the front page. After the elapsed time has expired the node's "promote to front page" option becomes reset.

Comments

killes@www.drop.org’s picture

You could extend the scheduler.module (in contrib cvs) to do this.

moshe weitzman’s picture

nodes naturally scroll off of the front page with more activity. why would
you want to force them off? are you thinking of removing static nodes
automatically?

killes@www.drop.org’s picture

I don't know. But I got this request from one of my Co-Admins
yesterday. We have mainly events on the front page and it looks a bit
silly if they are already over and still on the frontpage.

I am still waiting for the answer to the question "what else should we
put there then?"...

matt westgate’s picture

My concern is for websites that post a lot of content to the frontpage. I don't want make a pager query call for a site that has 5.000 some nodes with the front page status enabled down the road when all a person wants to do is check out the homepage.

I would like to set an option that tells drupal when the front page status expires, say after a couple of months. We store this value in the variable table and let cron take care of flipping the switch in the database.

For my client's site, These nodes are still accessible via the url path patch and breadbrumb module i have built for 4.3. For example: "pressreleases/archive" and "news/archive" would contain some of these "no longer promoted" nodes.

ax’s picture

from node.module, DRUPAL-3-0-0 [1]:

$form .= form_textfield("Automatically post document", "timestamp_posted", ($node->timestamp_posted ? format_date($node->timestamp_posted) : ""), 30, 55, "The date at which your document will be automatically posted.  Leave empty if you don't want to schedule this document, or fill out a string containing an English date format.  Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...");
$form .= form_textfield("Automatically queue document", "timestamp_queued", ($node->timestamp_queued ? format_date($node->timestamp_queued) : ""), 30, 55, "The date at which your document will be automatically queued.  Leave empty if you don't want to schedule this document, or fill out a string containing an English date format.  Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...");
$form .= form_textfield("Automatically hide document", "timestamp_hidden", ($node->timestamp_hidden ? format_date($node->timestamp_hidden) : ""), 30, 55, "The date at which your document will be automatically hidden.  Leave empty if you don't want to schedule this document, or fill out a string containing an English date format.  Example input: '". date("j F Y G:i") ."', '". date("m/d/y H:i") ."', '". date("F j, Y H:i") ."', ...");

good ol' times ...

[1] http://cvs.drupal.org/viewcvs/drupal/modules/node.module?annotate=1.56.2...

killes@www.drop.org’s picture

@ax: I think "post" and "hide" are rather analogous to "publish" and "unpublish".

@mathias: It should be to achieve what you want, look at the scheduler.module. You don't even need am extra "timeout" time. You can simply use the standard timestamp created when the post is submitted.

matt westgate’s picture

scheduler.module will enable me to do what i need.