/web/test/chat/shoutitout/Readme.txt |
---|
0,0 → 1,23 |
This readme file is intended to help you set up the Shout It Out. |
Check if all the files are present: |
- readme.txt (this file) |
- shout.php |
- mysql.txt |
- connect.php |
First upload shout.php to the root of the webfolder - so that it is accesible this way: |
- http://www.yourDomain.com/shout.php |
Then upload the icons to a directory similar to this: |
- http://www.yourDomain.com/images/shout/ |
Now use phpMyAdmin, if installed on your server, to make the tables in the MySQL databse. |
The descriptions are available in the mysql.txt file. |
It contains both the table for the Shout.php and a table for bad word checking (censuring). |
In the top of shout.php there is a reference to stylesheet.css - just use your own css. |
Thats all - hope it works out for you! |
Andy Sørensen - August 2002 |
http://www.andys.dk |
/web/test/chat/shoutitout/_vti_cnf/Readme.txt |
---|
0,0 → 1,6 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|20 Aug 2002 14:43:38 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_cacheddtm:TX|20 Aug 2002 14:43:38 -0000 |
vti_filesize:IR|825 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/_vti_cnf/connect.php |
---|
0,0 → 1,15 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|31 Jul 2005 13:44:48 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|20 Aug 2002 11:00:08 -0000 |
vti_backlinkinfo:VX| |
vti_nexttolasttimemodified:TW|20 Aug 2002 11:00:08 -0000 |
vti_cacheddtm:TX|31 Jul 2005 13:44:48 -0000 |
vti_filesize:IR|197 |
vti_cachedneedsrewrite:BR|false |
vti_cachedhasbots:BR|false |
vti_cachedhastheme:BR|false |
vti_cachedhasborder:BR|false |
vti_charset:SR|windows-1250 |
/web/test/chat/shoutitout/_vti_cnf/mysql.txt |
---|
0,0 → 1,6 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|20 Aug 2002 10:51:22 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_cacheddtm:TX|20 Aug 2002 10:51:22 -0000 |
vti_filesize:IR|853 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/_vti_cnf/shout.php |
---|
0,0 → 1,17 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|20 Aug 2002 10:59:22 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|20 Aug 2002 10:59:22 -0000 |
vti_cacheddtm:TX|20 Aug 2002 10:59:22 -0000 |
vti_filesize:IR|4855 |
vti_cachedbodystyle:SR|<body onload="window.scrollTo(0,99999);"> |
vti_cachedlinkinfo:VX|Q|stylesheet.css |
vti_cachedsvcrellinks:VX|NQUS|chat/shoutitout/stylesheet.css |
vti_cachedneedsrewrite:BR|false |
vti_cachedhasbots:BR|false |
vti_cachedhastheme:BR|false |
vti_cachedhasborder:BR|false |
vti_charset:SR|windows-1250 |
vti_backlinkinfo:VX|content2.htm |
/web/test/chat/shoutitout/connect.php |
---|
0,0 → 1,8 |
<? |
$database="shoutitout"; |
$sqlhost="localhost"; |
$sqluser="chaosdell"; |
$sqlpass="sesvul"; |
mysql_connect($sqlhost,$sqluser,$sqlpass) OR DIE("1"); |
mysql_select_db($database) OR DIE("1"); |
?> |
/web/test/chat/shoutitout/images/shout/_vti_cnf/dk.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|88 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/happy.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|239 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/ironic.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|250 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/mad.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|248 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/nothing.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|243 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/tongue.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:12 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:12 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:12 -0000 |
vti_filesize:IR|238 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/vain.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:14 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:14 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:14 -0000 |
vti_filesize:IR|245 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/_vti_cnf/very_happy.gif |
---|
0,0 → 1,9 |
vti_encoding:SR|utf8-nl |
vti_timelastmodified:TR|08 Aug 2002 15:54:14 -0000 |
vti_extenderversion:SR|6.0.2.5516 |
vti_author:SR|KAKLIK\\Jakub |
vti_modifiedby:SR|KAKLIK\\Jakub |
vti_timecreated:TR|08 Aug 2002 15:54:14 -0000 |
vti_cacheddtm:TX|08 Aug 2002 15:54:14 -0000 |
vti_filesize:IR|230 |
vti_backlinkinfo:VX| |
/web/test/chat/shoutitout/images/shout/dk.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/happy.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/ironic.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/mad.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/nothing.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/tongue.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/vain.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/images/shout/very_happy.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/test/chat/shoutitout/mysql.txt |
---|
0,0 → 1,22 |
CREATE TABLE badwords ( |
id int(11) NOT NULL auto_increment, |
words text NOT NULL, |
PRIMARY KEY (id), |
UNIQUE KEY id (id), |
KEY id_2 (id) |
) TYPE=MyISAM; |
INSERT INTO badwords VALUES (1, 'fuck,shit,piss,cunt,asshole,motherfucker,dick,fuk,blow,sex,tit,pussy,slut,whore,cum,horny,oral,anal,bitch,nigger,crap,bastard,clit,felacio,pik,kusse,fisse,røv,sperm,spasser,cock,kusse,skede,patter,idiot,perker,neger,blowjob,pis,bøsse,numse,lort,sexy,bitch,bitches,blowjobbers,Bitch,Blowjob,Ass'); |
# -------------------------------------------- |
CREATE TABLE shout ( |
id int(11) NOT NULL auto_increment, |
ip varchar(20) NOT NULL default '', |
link varchar(30) NOT NULL default '', |
name_id varchar(30) NOT NULL default '', |
text text NOT NULL, |
time varchar(40) NOT NULL default '', |
PRIMARY KEY (id), |
KEY id (id) |
) TYPE=MyISAM; |
/web/test/chat/shoutitout/shout.php |
---|
0,0 → 1,133 |
<? |
if ($name_id_c){ |
setcookie ("name_id_c", $name_id_c, time()+86400); |
} |
if ($link_c){ |
setcookie ("link_c", $link_c, time()+86400); |
} |
// 2002 - Andy Sørensen - andy@nospam.andys.dk (remove nospam) |
// Visit http://www.andys.dk |
// Shout It Out v1.0 |
?> |
<link rel="stylesheet" href="stylesheet.css" type="text/css"> |
<body onload="window.scrollTo(0,99999);"> |
<? |
include("connect.php"); |
$result = mysql_query("SELECT * FROM shout"); |
$all_rows = mysql_num_rows($result); |
if ($all == "true"){ |
$start = "0"; |
$posts = "999"; |
} else { |
if ($all_rows < 15){ |
$start = "0"; |
} else { |
$start = $all_rows - 15; |
} |
$posts = "15"; |
} |
$result = mysql_query("SELECT * FROM shout ORDER BY time ASC LIMIT $start,$posts"); |
$rows = mysql_num_rows($result); |
if ($rows > 0) { |
while($row = mysql_fetch_array($result)){ |
// Bad word check |
$badwords = mysql_query("SELECT * FROM badwords"); |
$rowords = mysql_fetch_array($badwords); |
$words = explode(",", $rowords[words]); |
$bad = "*********************"; |
$i = "0"; |
while ($words[$i]){ |
$length = strlen($words[$i])-2; |
$bad = substr($words[$i], 0, 2) . substr($bad, -$length); |
$row[text] = ereg_replace($words[$i],$bad, $row[text]); |
$i++; |
} |
// End of bad word check |
$time = date("d. F Y H:i",$row[time]); |
// Change emotions |
$smile = "<img src='images/shout/happy.gif' align='absmiddle'>"; |
$ironic = "<img src='images/shout/ironic.gif' align='absmiddle'>"; |
$nothappy = "<img src='images/shout/mad.gif' align='absmiddle'>"; |
$very_happy = "<img src='images/shout/very_happy.gif' align='absmiddle'>"; |
$tongue = "<img src='images/shout/tongue.gif' align='absmiddle'>"; |
$nothing = "<img src='images/shout/nothing.gif' align='absmiddle'>"; |
$vain = "<img src='images/shout/vain.gif' align='absmiddle'>"; |
$row[text] = ereg_replace(":-\/",$vain, $row[text]); |
$row[text] = ereg_replace(":\|",$nothing, $row[text]); |
$row[text] = ereg_replace(":-\|",$nothing, $row[text]); |
$row[text] = ereg_replace(":-P",$tongue, $row[text]); |
$row[text] = ereg_replace(":P",$tongue, $row[text]); |
$row[text] = ereg_replace(":p",$tongue, $row[text]); |
$row[text] = ereg_replace(":-p",$tongue, $row[text]); |
$row[text] = ereg_replace(":)",$smile, $row[text]); |
$row[text] = ereg_replace(":-)",$smile, $row[text]); |
$row[text] = ereg_replace(":D",$very_happy, $row[text]); |
$row[text] = ereg_replace(":-D",$very_happy, $row[text]); |
$row[text] = ereg_replace(":\(",$nothappy, $row[text]); |
$row[text] = ereg_replace(":-\(",$nothappy, $row[text]); |
$row[text] = ereg_replace(";)",$ironic, $row[text]); |
$row[text] = ereg_replace(";-)",$ironic, $row[text]); |
if ($row[ip] != "") { |
$logged = "Yes!"; |
} else { |
$logged = "No"; |
} |
echo "<table cellpadding='2' cellspacing='0' width='100%'><tr><td align='left'>"; |
$amounts = mysql_query("SELECT * FROM shout WHERE ip = '$row[ip]'"); |
$entries = mysql_num_rows($amounts); |
if ($row[link] != ""){ |
echo "<a target='_blank' href='http://$row[link]' title='$time - Logged:$logged Shouts:$entries'>$row[name_id]: </a>"; |
} else { |
echo "<b title='$time - Logged:$logged Shouts:$entries'>$row[name_id]: </b></a>"; |
} |
echo "$row[text]"; |
echo "</td></tr></table>"; |
} |
} |
?> |
<table width="100%" cellpadding="2" cellspacing="0"><tr><td align="center"> |
<? |
if ($HTTP_COOKIE_VARS[name_id_c]){ |
$name_value = $HTTP_COOKIE_VARS[name_id_c]; |
} else { |
$name_value = "Your name"; |
} |
if ($HTTP_COOKIE_VARS[link_c]){ |
$link_value = $HTTP_COOKIE_VARS[link_c]; |
} else { |
$link_value ="Your link"; |
} |
echo "<form name=\"form1\" method=\"post\" action=\"$php_self\"> |
<input class=\"inputtext\" type=\"text\" name=\"name_id\" value=\"$name_value\" onFocus=\"this.value='';\" size=\"20\"> |
<input class=\"inputtext\" type=\"text\" name=\"text\" value=\"Your message\" onFocus=\"this.value='';\" size=\"20\"> |
<input class=\"inputtext\" type=\"text\" name=\"link\" value=\"$link_value\" onFocus=\"this.value='';\" size=\"20\"> |
<input class=\"button\" type=\"submit\" name=\"add\" value=\"Go\"> <input class=\"button\" type=\"reset\" value=\"Reset\"><br> |
<a href=\"?all=true\">All posts</a> |
</form>"; |
?> |
</td></tr></table> |
<? |
if ($add){ |
if ($link){ |
$link = trim($link); |
$link = ereg_replace("http://", "", $link); |
$s=substr_count($link,"http://"); |
$d=substr_count($link,"."); |
if ($s==0 && $d>=1){ |
$link_ok = "ok"; |
} else { |
$link = ""; |
} |
} |
$time = time(); |
$ip = getenv("REMOTE_ADDR"); |
$name_id = strip_tags($name_id); |
$text = strip_tags($text, '<a>'); |
if($name_id != "Your name" && $text != "Your message"){ |
mysql_query("insert into shout (ip,name_id,link,text,time) values ('$ip', '$name_id', '$link', '$text', '$time')"); |
echo "<script>location.href='$PHP_SELF?name_id_c=$name_id&link_c=$link';</script>"; |
} |
} |
mysql_close(); |
?> |
</body> |