******************************************************************************************** * Last Post Mambo Forum (LoudMouth) Hack Version 1.0 * * 17-05-2002 * * * * Copyright (C) 2001 Emir Sakic * * Distributed under the terms of the GNU General Public License * * This software may be used without warranty provided and these statements are left intact.* * This source is available at http://www.superbosna.com/mambo_hacks * * * * LoudMouth and Mambo are Copyright (C) 2000-2001 Miro Construct Pty Ltd * * Source is available at http://sourceforge.net/projects/mambo * * * * Site Name: LoudMouth Open Source Edition Version 2.4 (Mambo 3.0.7) * * Hack Name: Last Post Mambo Forum Hack * * Developer: Emir Sakic - saka@hotmail.com * * Date: 17/05/2002 * * Version #: 1.0 * * Comments: This hack adds last post notification on main site of Mambo forum. * * Includes date and author name. Time if todays post. * * Demo can be viewed at http://www.superbosna.com/forum * ******************************************************************************************** Instalation =========== Before you do anything please make a back up of the following file: default.php from forum/ directory so you can regret the changes. Easy way (replace the file) --------------------------- 1. Go to forum directory of your Mambo instalation. 2. Upload the the file "default.php" there (replace the old one). Done! Harder way (hack your file) --------------------------- 1. Go to forum directory of your Mambo instalation. 2. Open default.php file. 3. Search for code: 4. Replace that code with following code:
Forum Name Number of Messages
5. Search for code: $messagesNum=mysql_num_rows($result2);?> 6. Replace that line with the following code: $messagesNum=mysql_num_rows($result2); $query3 = "SELECT author, date, time FROM messages WHERE forumid=$id AND archive=0 AND published=1 AND newmessage=0 AND usertype='$usertype' ORDER BY date DESC, time DESC"; $result3 = $database->openConnectionWithReturn($query3); $row3 = mysql_fetch_object($result3); $lastauthor = $row3->author; $lastdate = $row3->date; $lasttime = $row3->time; $lasttime = explode (":", $lasttime);?> today, $lasttime[0]:$lasttime[1], $lastauthor"; } else { $lastdate = explode ("-", $lastdate); echo ""; }?> 7. Save and upload. Done! Look at the file included for reference. Send your comments or suggestions to: saka@hotmail.com
Forum Name # of Messages Last Post
   
    $lastdate[2]-$lastdate[1]-$lastdate[0], $lastauthor