MiniDoc: How to make a Last Updated Module
Posted: Thu Dec 22, 2005 1:32 pm
Here's a quick hack of latest news that turns it into a "latest updates" module. copy mod_latestnews.php to another file (I used mod_latestmods.php as name). Then make following changes in mod_latestmod.php:
In the query in each of the three (3) case statements change these two lines:
. "\n AND ( a.publish_up = '$nullDate' OR a.publish_up<= '$now' )"
. "\n ORDER BY a.created DESC LIMIT $count"
to read:
. "\n AND ( a.modified = '$nullDate' OR a.modified <= '$now' )"
. "\n ORDER BY a.modified DESC LIMIT $count"
Then copy mod_latestnews.xml to mod_latestmods.xml. Make following changes to mod_latestmods.xml:
Find this line:
mod_latestnews.php
And change to read:
mod_latestmod.php
You might also want to edit the ... and other documentation type statements to reflect this is the latest updates module.
Zip mod_latestmod.php and mod_latestmod.xml into a mod_latestmod.zip file and install ....
You can see an example of this module at http://www.hrpr.com.
In the query in each of the three (3) case statements change these two lines:
. "\n AND ( a.publish_up = '$nullDate' OR a.publish_up<= '$now' )"
. "\n ORDER BY a.created DESC LIMIT $count"
to read:
. "\n AND ( a.modified = '$nullDate' OR a.modified <= '$now' )"
. "\n ORDER BY a.modified DESC LIMIT $count"
Then copy mod_latestnews.xml to mod_latestmods.xml. Make following changes to mod_latestmods.xml:
Find this line:
And change to read:
You might also want to edit the
Zip mod_latestmod.php and mod_latestmod.xml into a mod_latestmod.zip file and install ....
You can see an example of this module at http://www.hrpr.com.