Gå til innhold

Trenger hjelp til shout box,


-k-r-l-

Anbefalte innlegg

holder på med en shoutbox, har funnet et script på internett..

 

Her er test siden: http://mm-forum.freehostia.com/test/

 

og jeg vil ha denne inn i shoutbox'en her op denne siden: LINK

 

vil forlenge høyden litt, på siden,

 

¤ problemer, å få den til å ta lite plass og få den inn i shout box'en på siden.

¤ problem med at teksten forsetter på en linje, i stede for flere linjer...

 

noen som kan hjelpe med dette? er 99% noob med dette :p

 

koden/scripte:

 

<? 

/* Shoutbox V1.0
*/ 

?>

<html>

<head>

<link rel="stylesheet" href="styles.css" type="text/css">

<script type="text/javascript">

function smily(smile) {

document.shout.shout.value += smile

}

</script>

<Title>Shout Box</Title>

</head>

<?

echo "<div align=\"left\"><H1><u>Shout Box</u></H1></div><table width=\"20%\" align=\"left\" border=\"0\"><tr><td><div align=\"left\">";

if($HTTP_POST_VARS['submit']) {

if(strstr($REMOTE_ADDR,"68.67.222.10")) { // This is how you can set bans on people that abuse the system, just copy and paste this code and change the ip address

echo "You are banned due to abuse."; // A message to tell the banned person they are banned

exit;

}

if(!$HTTP_POST_VARS['name']) {

echo "You must enter a name";

exit;

}

if(!$HTTP_POST_VARS['shout']) {

echo "You must enter a shout";

exit;

}

if(strstr($HTTP_POST_VARS['name'],"|")) {

echo "Name cannot contain the pipe symbol - |";

exit;

}

if(strstr($HTTP_POST_VARS['shout'],"|")) {

echo "shout cannot contain the pipe symbol - |";

exit;

}

$fp = fopen('shouts.txt','a');

if(!$fp) {

echo "Error opening file!";

exit;

}

$line = $HTTP_POST_VARS['name'];

$line .= "|" . $HTTP_POST_VARS['shout'];

$line .= "|" . $HTTP_POST_VARS['Email:'];

$line = str_replace("\r\n","<BR>",$line);

$line = str_replace (":)", "<img src=smiles/icon_smile.gif>", $line);

$line = str_replace (":D", "<img src=smiles/icon_biggrin.gif>", $line);

$line = str_replace (":P", "<img src=smiles/icon_tounge.gif>", $line);

$line = str_replace (":(", "<img src=smiles/icon_sad.gif>", $line);

$line = str_replace ("8)", "<img src=smiles/icon_cool.gif>", $line);

$line = str_replace (";)", "<img src=smiles/icon_wink.gif>", $line);

$line = str_replace (":o", "<img src=smiles/icon_surprised.gif>", $line);

$line = str_replace (":flat:", "<img src=smiles/icon_neutral.gif>", $line);

$line = str_replace ("8o", "<img src=smiles/icon_eek.gif>", $line);

$line = str_replace (":?", "<img src=smiles/icon_confused.gif>", $line);

$line = str_replace (":evil:", "<img src=smiles/icon_twisted.gif>", $line);

$line = str_replace (":eyes:", "<img src=smiles/icon_Eyecrazy.gif>", $line);

$line .= "\r\n";

fwrite($fp, $line);

if(!fclose($fp)) {

echo "Error closing file!";

exit;

}

echo "<b>Shout added!</b>\n"; 

}



$data = file('shouts.txt');

$data = array_reverse($data);

foreach($data as $element) {

$element = trim($element);

$pieces = explode("|", $element);

if(!$pieces[2]) {

echo "<u>" . $pieces[0] . ":</u> " . $pieces[1] . "<hr height=\"1\" color=\"#0066CC\" width=\"20%\">";

}

else {

echo "<a href=$pieces[2]><u>" . $pieces[0] . ":</u></a> " . $pieces[1] . "<hr height=\"1\" color=\"#0066CC\" width=\"20%\">";



}

}

echo "</div><div align=\"left\">";

echo "</td></tr></table><H5><u>Add Shout</u></H5><table width=\"20\" align=\"left\" border=\"0\"><tr><td><div align=\"left\">";

?>

<FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="shout"><h6>

Name: <br><INPUT TYPE='TEXT' NAME='name' SIZE='20' maxlength='25'><br>
Email:<br>
<input name='Email' type='text' size='30' maxlength='50'>
<br>
Shout: <br>
<input type='TEXT' name='shout' size='50' maxlength='200'>
<br>

Smiles:<br><table width="11%" border="1" bordercolor="#111111">
 <tr><td width="16%"><img src=smiles/icon_smile.gif onClick="smily(':)');" STYLE="cursor:hand;"></td>
<td width="16%"><img src=smiles/icon_biggrin.gif onClick="smily(':D');" STYLE="cursor:hand;"></td>
<td width="16%"><img src=smiles/icon_tounge.gif onClick="smily(':P');" STYLE="cursor:hand;"></td>
<td width="16%"><img src=smiles/icon_sad.gif onClick="smily(':(');" STYLE="cursor:hand;"></td>
<td width="16%"><img src=smiles/icon_cool.gif onClick="smily('8)');" STYLE="cursor:hand;"></td>
<td width="20%"><img src=smiles/icon_wink.gif onClick="smily(';)');" STYLE="cursor:hand;"></td>
</tr><tr><td><img src=smiles/icon_surprised.gif onClick="smily(':o');" STYLE="cursor:hand;"></td><td><img src=smiles/icon_neutral.gif onClick="smily(':flat:');" STYLE="cursor:hand;"></td><td><img src=smiles/icon_eek.gif onClick="smily('8o');" STYLE="cursor:hand;"></td><td><img src=smiles/icon_confused.gif onClick="smily(':?');" STYLE="cursor:hand;"></td><td><img src=smiles/icon_twisted.gif onClick="smily(':evil:');" STYLE="cursor:hand;"></td><td><img src=smiles/icon_Eyecrazy.gif onClick="smily(':eyes:');" STYLE="cursor:hand;"></td></tr></table><p>

<INPUT TYPE="submit" NAME="submit" VALUE="Shout" CLASS=button></h6>
</FORM>

<a href="mailto:[email protected]">e</a>
</body>

Lenke til kommentar
Videoannonse
Annonse
Gjest
Dette emnet er stengt for flere svar.
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...