By jorre on
is there a way to find the ID of the Node that was last put on the frontpage?
doing a sql select on the highest node number does not work, since some nodes are not promoted to frontpage
also:
we write articles and save them in moderation (without putting them on frontpage)
then some other articles come in, and we publish what we feel like that needs to be published at that time
-> so sometimes newer articles are published earlier than some articles that are in moderation queue for a longer amount of time
so this is a small problem to think about
Comments
Sounds like you may want to
Sounds like you may want to use Views and Nodequeue to manage that sort of thing.
______________________
Dominik Lukes
http://www.dominiklukes.net
http://www.hermeneuticheretic.net
http://www.czechupdate.com
http://www.techwillow.com
Not really... I'm just
Not really...
I'm just looking for let's say an SQL statement that knows what node is put on the frontpage most recently
Pakfriet.be
Uzegt.be
Does this sound what you want?
It sound like you want to know the most recently promoted node to the front page that is ready for display. In this case this should work
Notes:
1) You do not need it on the multiple lines, I wrote it that way to make it easier to comment.
2) I don't think status can be 1 with moderate not equal to 0 but may be wrong about that, hence the check for moderate
3) This assumes all the code that plays with the flags updates 'changed' when changing flag values (status, promote, moderate)
Hi nevets, This is something
Hi nevets,
This is something I also thought about, but imagine this:
I have 10 articles on my frontpage (newest one on top has ID 10, lowest one has 1)
What if I change something to article number 5 (let's say I retype a misspelled word there, and save it again)
Does the changed date change then? Or is this the date that is posted under "author information"... ? And it doesn't change, unless I manually change it?
Pakfriet.be
Uzegt.be
That would also change the "changed" timestamp
That would also change the "changed" timestamp and if that is a problem then I would write a small module that tracks the last node promoted to the front page. Pretty straight forward unless one can unpromote a node from the front page before having promoted a new one.
That is funny I just found
That is funny
I just found that and implemented it. Now I have a discrepancy.
These are the first three articles.
Now my pager is acting up, because it does not appear to be keeping order. If I click on next on the most recent article....Reminder of... appears. If I click on the next link it then jumps past CAJ urges... to the next article - National Conference.
Here is my pager code in my template.php file:
I set the limit to '1' from '10'....but now that I think of it - that wouldn't do anything here because I am not showing next page / previous page....just next and previous articles.
Did I do this right?