Active
Project:
Last Node
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2009 at 14:11 UTC
Updated:
24 Apr 2009 at 18:46 UTC
Hello,
I love this module, but would like to have more control over the selected nodes. So I've tried a little hack to decrease the amount of nodes retrieved:
In function _last_node_contents():
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n WHERE n.type in ($placeholders) AND n.status = 1 AND (UNIX_TIMESTAMP() - n.changed) < (4 * 24 * 60 * 60) ORDER BY n.changed DESC"), $node, 0, 5);
This works for me, but it would be far better, if the number of days in the past and the number of records could be customized in the admin panel.
Comments
Comment #1
TheCrow commentedHello kanute,
I need to refactor this project, i started this over 4.6 branch and is a bit old the general approach. This feature will be sure added, i try to provide temporarily a patch :))
Comment #2
kanute commentedThanks!
In the meantime I added a little bit of code to explain whether the content is new or updated:
By the way: The w3.org HTML Validator says:
After refactoring, I will add willingly a de.po file.
Comment #3
TheCrow commentedAre you sure this work just comparing the 2 property? It depend from the user too if you mean the same behaviour comment display has.
Well marquee is another thing to fix, many changes to do...
Thank you!