Bywalec
Postów: 915 Pomógł: 41
Data rejestracji: 12.03.2006 07:28
|
no to masz gotowe
to jest dla extreme fusion
poszukaj shoutbox_panel.php i usun calosc a nastepnie wklej to:
<?php
/*--------------------------------------------------------------------------+
| INF: Shoutbox Panel dla PHP-Fusion v6
|---------------------------------------------
| author: eXtreme-fusion crew - (c) 2005
| web: http://extreme-fusion.pl
|---------------------------------------------
| Wycinanie kodu poza eXtreme-pack zabrionione.
| Je¶li po kopiowaniu co¶ nie działa - miej pretensje do siebie.
+--------------------------------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
echo "<br>";
openshoutbox($locale['120']);
if (iMEMBER || $settings['guestposts'] == "1") {
if (isset($action) && $action == "delete" && isset($shout_id) && isNum($shout_id)) {
$dane = dbarray(dbquery("SELECT shout_name from ".$db_prefix."shoutbox WHERE shout_id='$shout_id'"));
if (EPS)
{
$przydzial2 = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='2'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial2['point_ammount'])." WHERE user_id='".$dane['shout_name']."'");
}
$result = dbquery("DELETE FROM ".DB_PREFIX."shoutbox WHERE shout_id='$shout_id'");
}
if (isset($_POST['saveshout'])) {
if ($action == "edit") {
$message = str_replace("\n", " ", $_POST['message']);
$message = trim(stripinput(censorwords($message)));
$message = str_replace("\n", "<br>", $message);
$result = dbquery("UPDATE ".DB_PREFIX."shoutbox SET shout_message='$message' WHERE shout_id='$shout_id'");
header("Location:".BASEDIR."news.php");
}
}
if (isset($action) && $action == "edit") {
if (!isset($shout_id)) $shout_id=0;
$result = dbquery("SELECT * FROM ".DB_PREFIX."shoutbox WHERE shout_id='$shout_id'");
$data = dbarray($result);
echo "<form name='chatform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")."'>";
echo "<table align='center' cellspacing='0' cellpadding='0' class='tbl'><tr><td align='center'><font style='font-style:italic;font-family:Tahoma;font-size:8;color:#777777;'>".$locale['128']." </font></td></tr>";
echo "<tr><td align='center'><textarea name='message' rows='3' class='shoutboxarea' style='width:135px;'>".$data['shout_message']."</textarea><br>";
echo "<center>";
echo "";
echo "";
echo "";
echo "<div id='ShowHide5'><LEGEND>".$locale['131']."</LEGEND>";
echo "".displaysmileysSB("message")."<script>show_hide(ShowHide5)</script></div>";
echo "<div id='ShowHide6'><LEGEND>BBCode</LEGEND><center><input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText2('message', '[b]', '[/b]');\">";
echo "<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText2('message', '[i]', '[/i]');\">";
echo "<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText2('message', '[u]', '[/u]');\"><input type='button' value='s' class='button' style='width:25px;' onClick=\"addText2('message', '[s]', '[/s]');\"></center><br>";
echo "<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText2('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>";
echo "</td></tr>";
echo "<tr><td align='center'><input type='submit' name='saveshout' value='".$locale['132']."' class='button'></td></tr></form></table>\n";
echo "<script>show_hide(ShowHide6)</script>";
} else {
if (isset($_POST['post_shout'])) {
if (iMEMBER) {
$shout_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == "1") {
$shout_name = trim(stripinput($_POST['shout_name']));
$shout_name = preg_replace("(^[0-9]*)", "", $shout_name);
if (isNum($shout_name)) $shout_name="";
}
$message = str_replace("\n", " ", $_POST['message']);
$message = trim(stripinput(censorwords($message)));
$message = str_replace("\n", "<br>", $message);
if ($shout_name != "" && $message != "") {
$result = dbquery("INSERT INTO ".$db_prefix."shoutbox VALUES('', '$shout_name', '$message', '".time()."', '".USER_IP."')");
if (EPS)
{
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='2'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
}
}
header("Location:".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""));
}
if (iGUEST) {
echo "<form name='chatform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")."' OnSubmit=\"document.forms['chatform'].post_shout.enabled = false;\">\n";
echo "<table width='100%' cellpadding='2' cellspacing='1'><tr><td>";
echo $locale['121']."<br>";
echo "<input type='text' name='shout_name' value='".(isset($userdata['user_name'])? $userdata['user_name'] : "")."' class='textbox' maxlength='32' style='width:100%;'><br>";
echo "".$locale['122']."<br>\n";
echo "</td></tr>";
echo "<tr><td><textarea name='message' rows='3' class='shoutboxarea' style='width:100%;'></textarea><br>";
echo "<center>";
echo "";
echo "";
echo "<div id='ShowHide2'>";
echo "<LEGEND>".$locale['131']."</LEGEND>".displaysmileysSB("message")."</div>";
echo "<script>show_hide(ShowHide2)</script>";
echo "<div id='ShowHide8'><LEGEND>BBCode</LEGEND><center><input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText2('message', '[b]', '[/b]');\">";
echo "<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText2('message', '[i]', '[/i]');\">";
echo "<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText2('message', '[u]', '[/u]');\"><input type='button' value='s' class='button' style='width:25px;' onClick=\"addText2('message', '[s]', '[/s]');\"></center><br>";
echo "<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText2('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select></div>";
echo "<script>show_hide(ShowHide8)</script>";
echo "</td></tr>";
echo "<tr><td align='center'><input type='submit' name='post_shout' value='".$locale['123']."' class='button'>";
echo "</td></td></tr></table></form>\n";
} else {
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$userdata['user_id']);
$caution = dbarray($caution_r);
$c_count = mysql_numrows($caution_r);
$caution_conf = dbarray(dbquery("SELECT * from ".$db_prefix."cautions_config"));
if ($c_count > $caution_conf['shoutbox'])
{
echo $caution_conf['shoutbox_info']."<br><br>";
} else {
echo "<form name='chatform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")."' OnSubmit=\"document.forms['chatform'].post_shout.enabled = false;\">\n";
echo "<table width='100%' cellpadding='2' cellspacing='1'><tr><td>";
if (iGUEST) {
echo $locale['121']."<br>";
echo "<input type='text' name='shout_name' value='".$userdata['user_name']."' class='textbox' maxlength='32' style='width:100%;'><br>";
echo "".$locale['122']."<br>\n";
}
echo "</td></tr>";
echo "<tr><td><textarea name='message' rows='3' class='shoutboxarea' style='width:100%;'></textarea><br>";
echo "<center>";
echo "";
echo "";
echo "<div id='ShowHide2'><LEGEND>".$locale['131']."</LEGEND>";
echo "".displaysmileysSB("message")."<script>show_hide(ShowHide2)</script></div>";
echo "<div id='ShowHide7'><LEGEND>BBCode</LEGEND><center><input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText2('message', '[b]', '[/b]');\">";
echo "<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText2('message', '[i]', '[/i]');\">";
echo "<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText2('message', '[u]', '[/u]');\"><input type='button' value='s' class='button' style='width:25px;' onClick=\"addText2('message', '[s]', '[/s]');\"></center><br>";
echo "<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText2('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>";
echo "</td></tr>";
echo "<tr><td align='center'><input type='submit' name='post_shout' value='".$locale['123']."' class='button'>";
echo "</td></td></tr></table></form></div>\n";
echo "<script>show_hide(ShowHide7)</script>";
}
}
}
} else {
echo "<center>".$locale['125']."</center><br>\n";
}
$result = dbquery("SELECT count(shout_id) FROM ".DB_PREFIX."shoutbox");
$numrows = dbresult($result, 0);
$result = dbquery("SELECT * FROM ".DB_PREFIX."shoutbox LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."shoutbox.shout_name=".DB_PREFIX."users.user_id ORDER BY shout_datestamp DESC LIMIT 0,".$settings['numofshouts']);
echo "<script type='text/javascript' src='".INFUSIONS."shoutbox_panel/js/lighttable.js' language='Javascript'></script>";
echo "<script type=\"text/javascript\">
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=5
if (iens6){
document.write('<div id=\"container\" style=\"position:relative;width:100%;height:280px;border:0px solid #444444;overflow:hidden\">')
document.write('<div id=\"content\" style=\"position:absolute;width:100%;left:0;top:0\">')
}
</script>";
echo "<ilayer name=\"nscontainer\" width=100% height=250 clip=\"0,0,277,400\">";
echo "<layer name=\"nscontent\" width=100% height=250 visibility=hidden>";
if (dbrows($result) != 0) {
$i = 0;
$gouest_opt = dbarray(dbquery("SELECT * from ".$db_prefix."colors WHERE user_level=0"));
while ($data = dbarray($result)) {
echo "<LEGEND><span class='shoutboxname'>";
$user = "<span style='color:#".$data['user_color']."'>".$data['user_prefix'].$data['user_name']."</span>";
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>$user</a><br>\n";
} else {
echo "<span style='color:#".$gouest_opt['user_color']."'>".$gouest_opt['user_prefix'].$data['shout_name']."</span>\n";
}
echo "</span></LEGEND>";
if (checkrights("S")){
echo "[ <a href='".FUSION_SELF."?action=delete&shout_id=".$data['shout_id']."'>".$locale['133']."</a> | <a href='".FUSION_SELF."?action=edit&shout_id=".$data['shout_id']."'>".$locale['134']."</a> ]<br><font style='font-style:italic;font-family:Tahoma;font-size:8;color:#777777;'>IP: ".$data['user_ip']."</font><br>";
} else {
echo "\n";
}
echo "<span class='shoutboxdate'><font style='font-style:italic;font-family:Tahoma;font-size:8;color:#777777;'>".$locale['135']." ".showdate("shortdate", $data['shout_datestamp'])."</font></span><br>";
$wiadomosc = nl2br(parseubb(parsesmileys($data['shout_message'])));
$shout_wiadomosc = wordwrap($wiadomosc , 50, " ", 1);
echo "<span class='shoutbox'>".$shout_wiadomosc ."</span>";
echo "<br>\n";
if ($i != $numrows) echo "\n";
}
if ($numrows > $settings['numofshouts']) {
}
} else {
echo "<div align='left'>".$locale['127']."</div>\n";
}
echo "</layer></ilayer><script language=\"JavaScript1.2\">
if (iens6)
document.write('</div></div>')
</script>";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><td><p align=\"right\">";
echo "<a href=\"#\" onMouseover=\"moveup()\" onMouseout=\"clearTimeout(moveupvar)\"><img src=\"".INFUSIONS."shoutbox_panel/images/up.gif\" border=\"0\"></a> ";
echo "<a href=\"#\" onMouseover=\"movedown()\" onMouseout=\"clearTimeout(movedownvar)\"><img src=\"".INFUSIONS."shoutbox_panel/images/down.gif\" border=\"0\"></a>";
echo "</td></table>";
if (iMEMBER) {
echo "<hr><center>\n<img border='0' src='".THEME."images/bullet.gif'> ";
echo "<a href='".INFUSIONS."shoutbox_panel/shoutbox_archive.php' class='side'>".$locale['126']."</a> ";
echo "<img border='0' src='".THEME."images/bulletb.gif'></center>\n";
} else {
echo "<div align='left'></div>\n";
}
echo "<script language=\"JavaScript1.2\">
if (iens6) {
var crossobj=document.getElementById? document.getElementById(\"content\") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4) {
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+\"px\"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout(\"movedown()\",20)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+\"px\"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout(\"moveup()\",20)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility=\"show\"
}
window.onload=getcontent_height
</script>";
closeshoutbox();
?>
potem do pliku style.css w twoim theme dodaj to
.shoutboxarea
{
background-image:url(images/tlo.jpg);
border:1px #FFFFFF solid;
}
no i ostatnie wgraj na serwa w katalogu images towojego theme plik o nazwie
tlo.jpg (niekoniecznie musi byc ta nazwa, jesli ma byc inna to zmien w kodzie powyzej)
no i to tyle
pozdrawiam
Edytowane przez slawekneo dnia 25.04.2006 00:43:36
|