******************************************************************************************** *Smilies Mambo Forum Hack Version 1.0 * *15-12-2001 * * * *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.6) * *Hack Name: Smilies Mambo Forum Hack * *Developer: Emir Sakic - saka@hotmail.com * *Date: 15/12/2001 * *Version #: 1.0 * *Comments: This hack adds smiley option into forum posts in Mambo forum. * * Demo can be viewed at http://www.superbosna.com/forum * ******************************************************************************************** Instalation =========== Before you do anything please make a back up of the following files: javascript.php from forum/classes directory, expandHTML.php, messageHTML.php, newTopicHTML.php and replyHTML.php from forum/classes/html directory so you can regret the changes. Easy way (replace the files) ---------------------------- 1. Go to forum directory of your Mambo 3.0.6 instalation. 2. Upload the folder "smilies" there. 3. Go to forum/classes directory. 4. Upload files addSmilies.php and parseSmilies.php and replace javascript.php file. 5. Go to forum/classes/html directory. 6. Replace following files: expandHTML.php, messageHTML.php, newTopicHTML.php and replyHTML.php. Done! Harder way (hack your files) ---------------------------- 1. Go to forum directory of your Mambo 3.0.6 instalation. 2. Upload the folder "smilies" there. 3. Go to forum/classes directory. 4. Upload files addSmilies.php and parseSmilies.php. 5. Open javascript.php file. Search for line: document.location.href = 'mainpage.php?option=viewForum&forumid=' + forum; Under the "}" insert the following code: function setsmile(Smiley) { document.sendmail.message.value = document.sendmail.message.value + Smiley; document.sendmail.message.focus(); } Save and upload. 6. Go to forum/classes/html directory. 7. Open expandHTML.php file. Search for line: function viewMainMessage($subject, $author, $date, $time, $message, $color, $id, $forumid, $messageid, $numsub, $count, $reply, $views, $mainauthorid){ Insert following code under that: include("classes/parseSmilies.php"); Search for line: list ($authorid)=mysql_fetch_array($result); Insert following code under that: include("classes/parseSmilies.php"); Save and upload. 8. Open messageHTML.php file. Search for line: function drawMessage($mainmessage, $mainviews, $mainMessageID, $mainauthorid, $mainforumid, $id, $mainauthor, $maindate, $maintime){ Replace "$mainmessage" with "$message" in that line. Insert the following code between "{" and "?>" at the end of that line: include("classes/parseSmilies.php"); Search for: Replace with: Search for: Replace with: Search for line: function drawReplyMessage($replysubject, $replymessage, $replyviews, $replyMessageID, $replyauthorid, $replyforumid, $id, $replyauthor, $replydate, $replytime){ Replace "$replymessage" with "$message" in that line. Insert the following code between "{" and "?>" at the end of that line: include("classes/parseSmilies.php"); Save and upload. 9. Open newTopicHTML.php file. Search for line: