http://www.phphq.net :- Copyright (c) 2010 All Rights Reserved :- :- This script is free software; you can redistribute it and/or modify :- it under the terms of the GNU General Public License as published by :- the Free Software Foundation; either version 2 of the License, or :- (at your option) any later version. :- :- This script is distributed in the hope that it will be useful, :- but WITHOUT ANY WARRANTY; without even the implied warranty of :- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the :- GNU General Public License for more details. :-http://www.gnu.org/licenses/gpl.txt :- //================================================================================ * Description //================================================================================ :- phShoutBox is a simple, yet full featured shoutbox. It has bb code, automatic url and email phrasing, ip banning, your own :- word filters, display direction, clickable smilies, and most things other shoutbox's have, minus all the junk. //================================================================================ * Install //================================================================================ :- To install this script, first you need to create a database, if you do not know how to do this ask your host, I do not know how to :- setup a database on every host, therefore I cannot help you on that part. Then open config.php in a text editor like notepad :- and edit the MySql values. Again ask your host if you do not know your MySql information, you need the database name, :- database user name and password. Edit config.php again and change the admin password. If you do not change this anyone :- will be able to get into the admin! Then run install.php from your browser. If you need help with editing the values, please :- read on. Values are easy to edit and I will try to explain it the best I can. $value = "1"; this is a value. Where you see the 1 :- between the 2 quotes is the actual value that will need to be changed. To change a value, edit the value between the 2 quotes, :- in this example you would be editing the 1 to something else. Got it? Good :). //================================================================================ * Usage //================================================================================ :- You can use this script on your site in a few ways, I will explain 1 of the most common. You can show the shoutbox :- directly on your page by using an "iframe". I will give you an example. :- This is an iframe: :- There are many more options to iframes and I don't feel the need to explain all of them, those are the basics. :- I would check out w3schools.com if you need more help on iframes. :- You can also change the looks of this script, by editing the color values in config.php and phshoutbox.css. You may :- want to look up on css if you do not know how to edit this. Again: w3schools.com is your friend here. Unless of course :- you know someone that knows how ;). //================================================================================ */ require_once("./config.php"); ?> phShoutBox
phShoutBox Smilies:
phShoutBox Code:
[b]Bold[/b]
[i]Italics[/i]
[u]Underline[/u]
[move]Move[/move]
[color=red]Red[/color]
©phShoutBox
"; } If((trim($shout)=="") OR ($shout=="Your Message")) { $error.="Type A Message!
"; } If(($url!="Website URL") AND (trim($url)!="")) { If(!isurl($url)) { $error.="Invalid URL"; } } Else { $url=""; } If($error) { $display_message=$error; } Else { $ph->query("INSERT INTO ".$tbl_prefix."_shout VALUES('NULL', '".addslashes($name)."', '".addslashes($url)."', '".addslashes($shout)."', '".time()."', '".addslashes($_SERVER['REMOTE_ADDR'])."')"); setcookie("name",$name,time()+108000); If($sburl){ setcookie("url",$url,time()+108000); } header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?cmd=".$cmd); exit; } } $total_shouts=$ph->getrows("SELECT * FROM ".$tbl_prefix."_shout"); $total=$total_shouts-$limit_max; $all=""; $extra=""; If($sb_direction=="1") { $all="DESC"; If($total_shouts < $limit_max) { $extra="DESC"; } Else { $extra="DESC LIMIT 0,".$limit_max; } } Else { $all="ASC"; If($total_shouts < $limit_max) { $extra="ASC"; } Else { $extra="ASC LIMIT ".$total.",".$limit_max; } } If($cmd=="all") { $query=$ph->query("SELECT * FROM ".$tbl_prefix."_shout ORDER BY id ".$all); } Else { $query=$ph->query("SELECT * FROM ".$tbl_prefix."_shout ORDER BY id ".$extra); } ?>
fetch($query)) { extract($result); $class=($i++ & 1) ? "1" : "2"; $shout=htmlspecialchars($shout); $shout=phrase($shout); If(isurl($url)) { $name="".htmlspecialchars(stripslashes($name)).""; } Else { $name=htmlspecialchars(stripslashes($name)); } ?>




Extras | Limit Shouts Extras | All Shouts
©phShoutBox