Schedule promote/demote of nodes

njivy - December 9, 2004 - 21:17
Project:Scheduler
Version:5.x-1.15
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Submitted for your review are a series of files that extend scheduler.module to permit users to schedule the promotion and demotion of nodes.

Other than the obvious changes, the only other things to notice are:
1) Schema changes to the database,
2) Scheduled entries in the database are not deleted according to the same rules as before. I think it's better this way, but I'll be testing it to make sure.

AttachmentSize
scheduler.module.promote.patch12.58 KB

#1

njivy - December 9, 2004 - 21:18

MySQL schema change

AttachmentSize
scheduler.mysql.promote.patch 469 bytes

#2

njivy - December 9, 2004 - 21:18

PostgreSQL schema change

AttachmentSize
scheduler.pgsql.promote.patch 391 bytes

#3

stelman - July 31, 2005 - 08:22
Version:<none>» 4.6.x-1.x-dev

I'm not sure if I understand this correctly, but I would love to see something like this work to schedule promotion and demotion of nodes to the front page. I like to have the next nearest upcoming event node (event module) show up on the front page, but disappear after its occured, and be replaced by the next upcoming event

#4

deekayen - February 2, 2006 - 14:59
Status:needs review» needs work

After patching, admin/node/scheduler is blank.

#5

m3avrck - July 22, 2006 - 23:57
Version:4.6.x-1.x-dev» HEAD
Assigned to:njivy» m3avrck
Status:needs work» active

Not a bad feature request, would be easy to add. Changing status for now.

#6

mariagwyn - September 7, 2006 - 21:47

I just want 2nd or 3rd this feature. I don't really need to unpublish things, but I do need to demote them.
Thanks,
Maria

#7

AjK - September 12, 2006 - 08:12
Assigned to:m3avrck» AjK
Status:active» postponed

Add to TODO.txt

Making this issue "postponed" as I wish to concentrate on Drupal5 compat and any ensuing bugs. Once stable, I will return to these issues as outlined in the projects TODO.txt file

#8

chris_five - December 26, 2006 - 21:56

actions + scheduled actions already enables scheduled promote/demote of nodes.

#9

GavenHuang - April 10, 2007 - 17:01

Also consider adding "sticky" option?

#10

HorsePunchKid - May 9, 2007 - 20:17

Would an updated patch that does promotion/demotion instead of publish/unpublish be accepted at this point? I can work on one if its likely to make it into a release; otherwise, it's easier just to do search and replace to change the behavior.

#11

HorsePunchKid - June 23, 2007 - 22:16

Here's an updated patch to do promotion and demotion instead of publishing and unpublishing. Nothing fancy, no extra options. Just a change in terminology where it's visible in the interface and a change in behavior on the backend.

The scheduled actions module doesn't appear to be updated for Drupal 5, for what it's worth.

AttachmentSize
scheduler-5.x-1.4_promote_0.patch 7.43 KB

#12

HorsePunchKid - September 2, 2007 - 18:47

Updated for scheduler 1.6.

AttachmentSize
scheduler-5.x-1.6_promote_0.patch 7.88 KB

#13

AjK - September 2, 2007 - 19:08
Status:postponed» needs work

Hi, thanks for your work. Note, if you are changing the schema by patch then:-

  1. It needs to handle the PG stuff
  2. It needs a scheduler_update_X() function to handle upgrades of existing systems

#14

HorsePunchKid - September 2, 2007 - 19:32

Thanks for the suggestions, AjK. I decided, for better or worse, to make this a very "shallow" patch in order to avoid having to touch the schema in any way. The only changes are in the text presented to the user to describe the functionality and in the code that actually perform the scheduling actions. Everything else (form input identifiers, column names, internal variables) are unchanged.

#15

AjK - October 6, 2007 - 14:27
Status:needs work» closed

Killing this as no followup work forthcoming

#16

oadaeh - June 27, 2008 - 00:27
Version:HEAD» 5.x-1.15
Assigned to:AjK» oadaeh
Status:closed» needs review

The attached patch gives scheduler the ability to promote and demote nodes as well as publishing and unpublishing them. While I'm sure I've missed an edge case or two, I'm fairly positive that it is flexible enough to handle just about any combination of publishing, unpublishing, promoting, and demoting. It also includes updates to scheduler.install for full database compatibility.

I didn't do any translations, as I don't speak anything other than English. Also, if the wording is inappropriate (promoting vs promotion, etc.), let me know. Try it out and see if it works for you.

AttachmentSize
scheduler-promotion.patch 20.16 KB

#17

Eric Schaefer - June 29, 2008 - 16:28

Please have a look at #276376: Make scheduler more generic?.

#18

koenpyls - August 26, 2008 - 10:23

Does this feature exist for Drupal 6?

#19

Eric Schaefer - September 7, 2008 - 15:47

Not yet.

#20

michemon - September 21, 2008 - 14:13

I implemented the patch on the version 5.x-1.16 and it works.
Only one problem: when the item is demoted, it is considered updated and so it is shown in the recent block.

Michele.

#21

Eric Schaefer - October 28, 2008 - 16:08

Postponing until #276376: Make scheduler more generic? is available.

#22

Eric Schaefer - October 28, 2008 - 16:09
Status:needs review» postponed

#23

Eric Schaefer - August 2, 2009 - 12:58
Assigned to:oadaeh» Anonymous
Status:postponed» won't fix

It has been decided to keep scheduler nice and tidy and let it schedule publishing and unpublishing of nodes. Your requested feature might be possible with other, more suitable modules like rules, actions and workflow.

#24

najibx - October 31, 2009 - 00:08

yes, scheduler is nice and tidy :-) It make it easy for end user to schedule. Unfortunately, with rules/workflow, i don't think It's going to be as clean/easy as this module. Would it be possible to 'duplicate' this module, with very much similar look & feel, but mainly for promoted/depromoted to frontpage, without disturbing publish/unpublish status?

Could you share share links/specific how to, an alternative point out how it can be implemented alternatively. TQ

#25

Eric Schaefer - October 31, 2009 - 12:29

I have been thinking about this again lately. I have some new ideas but right now I want fix open bugs and port scheduler to D7. New features will have to wait until after that (I have lots of ideas).

If you only want to promote/demote and not publish/unpublish you can do this:

Edit scheduler.module, go to function scheduler_cron()
- look for this line: "$n->status = 1;" (line #433 in the current release for D5), change it to "$n->promote = 1;"
- look for this line: "$n->status = 0;" (line #459 in the current release for D5), change it to "$n->promote = 0;"

Please do not try this with you live site, because I did not test it. This will also not work for the D6 release, because the publishing is done differently. If you need this feature for D6 I would have to look up the appropriate actions for promotion of nodes. Tell me if you need that.

BTW: I can't think of a scenario where scheduled promotion/demotion of a node would be handy. Can you tell me what you want to do with that?

#26

oadaeh - October 31, 2009 - 14:34

I can think of one. I have two sites I maintain where events are created months in advance. I would like for the events to always be published, but to only be promoted to the front page for the week before they happen (for more publicity), and then to be automatically demoted (but not unpublished) after the event is over. That scenario is a little more complicated in that the date created would also have to be changed in order for the event to show up at the top of the list, rather than way down on the list, potentially several pages back.

#27

najibx - November 1, 2009 - 17:29

on the sites i built, many of them are careful on content being displayed on the frontpage. I have bunch of blocks, which uses Views to show only nodes that are promoted to the frontpage. However, it also arranged according to date.

I've been thinking, i could use this module to enable the node automatically at future date but during conten creation I must checked "promoted to the front". So when the time come, the node will be published AND promoted to the frontpage. Later, one must demotion manually or it will be taken out by more latest content.

 
 

Drupal is a registered trademark of Dries Buytaert.