MiniDoc: How to make a Last Updated Module

Moderator: mcsmom

Post Reply
User avatar
HarryB
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Aug 17, 2005 10:30 pm
Location: Vienna, VA US

MiniDoc: How to make a Last Updated Module

Post by HarryB » 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.
Last edited by HarryB on Fri Feb 03, 2006 11:33 pm, edited 1 time in total.
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

Re: MiniDoc: How to make a Last Updated Module

Post by guilliam » Thu Dec 22, 2005 2:03 pm

thank you harry for sharing!

let us hear others hwo they went with this hack.

- g
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

FrostByghte
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 10, 2005 12:55 pm

Re: MiniDoc: How to make a Last Updated Module

Post by FrostByghte » Tue Jan 31, 2006 5:19 pm

Just a heads up, but in order to make this work right I had to also change the ORDER BY statements to use a.modified

User avatar
HarryB
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Aug 17, 2005 10:30 pm
Location: Vienna, VA US

Re: MiniDoc: How to make a Last Updated Module

Post by HarryB » Fri Feb 03, 2006 11:08 pm

FrostByghte wrote:Just a heads up, but in order to make this work right I had to also change the ORDER BY statements to use a.modified

You're right...guess it got lost somewhere along the way during my original post...thanks...  :-[
Last edited by HarryB on Fri Feb 03, 2006 11:32 pm, edited 1 time in total.
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com

User avatar
HarryB
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Aug 17, 2005 10:30 pm
Location: Vienna, VA US

Re: MiniDoc: How to make a Last Updated Module

Post by HarryB » Fri Feb 03, 2006 11:22 pm

Modified my first post in this thread to correct error...my apologies... :'(
Last edited by HarryB on Fri Feb 03, 2006 11:32 pm, edited 1 time in total.
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com

mosey
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Fri Aug 26, 2005 6:14 pm
Location: United Kingdom
Contact:

Re: MiniDoc: How to make a Last Updated Module

Post by mosey » Sat Feb 04, 2006 4:39 am

Thanks for sharing! :D I thinkI'll find this solution very helpful :)
Joomla site in development...
Meanwhile Zetahelp.net continues...

(Unavailable end of Sept/start of Oct)


Post Reply