Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Shoutbox in Header.

Parašė Tomcis· 2009 Kov. 2 18:03:26
#1

Hello. Gal kas turi shoutbox'o panelės kodą, kuri galėtų būti įklijuota į headerį ir norma veiktų. Aš inklūdinau Infusions/shoutbox'ą, bet tada sql klaida. Reiktų tokios, pvz: www.thegtaplace.lt. +10.
Nereik nukreipinėt į phpfusion.lt arba į aš, nes ten jau viską apnaršiau. Dėkuj.

Parašė zabello· 2009 Kov. 2 18:03:10
#2

<td><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"937\">
<tr>
<td background=\"".THEME."images/emikser_v3_18.jpg\" width=\"378\" height=\"209\" style=\"border: 0; padding-top: 20; padding-left: 25; padding-right: 25; padding-bottom: 10;\">";
if (!defined("IN_FUSION")) { header("Location: ../../index.html"); exit; }
if (isset($_GET[id]) && !isNum($_GET[id])) fallback(FUSION_SELF);
if (isset($_GET[shout]) && !preg_match("#(add|edit|delete)#iu", $_GET[shout])) fallback(FUSION_SELF);
define("SBX_EDIT_USER", $settings[sbx_edit_user]);
$shout = $_GET[shout]; $id = $_GET[id];
if (iMEMBER || $settings['guestposts'] == "1") {
$result = dbquery("SELECT * FROM qs49krpz0nx_shoutbox WHERE shout_id='".$id."'");
if (dbrows($result)) $sdata = dbarray($result);
if (isset($_POST['post_shout']) && isset($shout)) {
$flood = false;
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="";
}
$shout_message = str_replace("\n", " ", $_POST['shout_message']);
$shout_message = preg_replace("/^(.{255}).*$/", "$1", $shout_message);
$shout_message = str_replace("[", " [", $shout_message);
$shout_message = preg_replace("/([^\s]{21})/", "$1\n", $shout_message);
$shout_message = trim(stripinput(censorwords($shout_message)));
$shout_message = str_replace("\n", "<br>", $shout_message);
if ($shout_name != "" && $shout_message != "") {
$result = dbquery("SELECT MAX(shout_datestamp) AS last_shout FROM ".$db_prefix."shoutbox WHERE shout_ip='".USER_IP."'");
if (!iSUPERADMIN && dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_shout']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
}
}
if (!$flood) {
$lin = FUSION_QUERY;
if ($shout =='add') {
$result = dbquery("INSERT INTO ".$db_prefix."shoutbox (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '".time()."', '".USER_IP."')");
if (EPS && iMEMBER) {
$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']."'");
}
}
if ($shout =='edit' AND checkrights("S")
OR SBX_EDIT_USER AND iMEMBER AND $sdata['shout_name'] == $userdata['user_id']) {
$result = dbquery("UPDATE ".$db_prefix."shoutbox SET shout_message='$shout_message' WHERE shout_id='".$id."'");
}
$lin = str_replace("&shout=$shout&id=$id", '', $lin);
$lin = str_replace("shout=$shout&id=$id", '', $lin);

if($lin != '') redirect(FUSION_SELF."?".$lin);
else redirect(FUSION_SELF.$lin);
}
}
}
if (
isset($shout) AND isset($id) AND isNum($id) AND checkrights("S")
OR isset($shout) AND isset($id) AND isNum($id) AND !checkrights("S") AND iMEMBER AND $sdata['shout_name'] == $userdata['user_id'] AND SBX_EDIT_USER
) {
if ($shout == 'edit') {
$shout_message = str_replace("<br>", "", $sdata[shout_message]);
$shout_message = str_replace(" [", "[", $shout_message);
} else if ($shout == 'delete') {
$result = dbquery("DELETE from ".$db_prefix."shoutbox WHERE shout_id='".$id."'");
$lin = FUSION_QUERY;
$lin = str_replace("&shout=$shout&id=$id", '', $lin);
$lin = str_replace("shout=$shout&id=$id", '', $lin);

if($lin != '') redirect(FUSION_SELF."?".$lin);
else redirect(FUSION_SELF.$lin);
}
} else {
$id = 0;
$shout = 'add';
$shout_message = '';
$shout_name = '';
}
if(iMEMBER){
$caution_r = dbquery("SELECT * from qs49krpz0nx_cautions WHERE user_id=".$userdata['user_id']);
$caution = dbarray($caution_r);
$c_count = dbrows($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 {
if ($shout == 'add') {
echo "<form name='chatform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".str_replace("&","&",FUSION_QUERY."&shout=$shout&id=$id") : "?shout=add&id=$id")."'>";
} else {
echo "<form name='chatform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".str_replace("&","&",FUSION_QUERY) : "?shout=$shout&id=$id")."'>";
}
echo"
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td colspan='2'>\n";
if (iGUEST) {
echo $locale['121']."<br>
<input type='text' name='shout_name' value='$shout_name' class='sb' maxlength='30' style='width:140px;'><br>
".$locale['122']."<br>\n";
}
echo" <input type='text' name='shout_message' rows='4' class='sbtexbox'>$shout_message";

echo" </td>

<td >
<input type='submit' name='post_shout' value='' class='sbbutton'>";
echo" </td>

<td>";if (iMEMBER) {


echo "<a href='".INFUSIONS."shoutbox_panel/shoutbox_archive.php' class='side'><img border='0' src='".THEME."images/sbarchiwum.gif'></a> ";

} else {
echo "<div align='left'></div>\n";
}
echo "</td>

</tr>
</table></form></div>\n";
echo"<script>show_hide(ShowHide7)</script>";
}
echo"\n";
} else {
echo"<center>".$locale['125']."</center>\n";
}
$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:95%;height:120px;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) {
$gouest_opt = dbarray(dbquery("SELECT * FROM ".$db_prefix."colors WHERE user_level=0"));
while ($data = dbarray($result)) {
echo"<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> <span class='shoutboxdate'><font style='font-style:italic;font-family:arial;font-size:7;color:#777777;'>".$locale['135']." ".showdate("shortdate", $data['shout_datestamp'])."</font></span><br>\n";
} else {
echo"<span style='color:#".$gouest_opt['user_color']."'>".$gouest_opt['user_prefix'].$data['shout_name']."</span>\n";
}
echo"</span>";


echo"<img src='".THEME."images/sbkropki.png' height=\"2\" alt=''><br>";
$mes = str_replace(" [", "[", $data[shout_message]);
$mes = nl2br(parseubb(parsesmileys($mes)));
echo "<span class='shoutbox'>".$mes ."</span>";
echo "<br><br><img src='".THEME."images/sbkreski.png' height=\"5\" alt=''><br><br>\n";
}
} 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=\"".THEME."images/up.png\" border=\"0\"></a> ";
echo "<a href=\"#\" onMouseover=\"movedown()\" onMouseout=\"clearTimeout(movedownvar)\"><img src=\"".THEME."images/down.png\" border=\"0\"></a>";
echo "</td></table>";


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>";


echo "
     </td>



Parašė MAnjack· 2009 Kov. 2 18:03:09
#3

Kokia klaidą rodo?

Parašė Tomcis· 2009 Kov. 2 18:03:31
#4

Rodo texto lauką, button'ą rašyti ir rašo apačioje.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3




Parašė MAnjack· 2009 Kov. 2 18:03:36
#5

global daly $settings pabandyk įrašyt.

Parašė Tomcis· 2009 Kov. 2 18:03:49
#6

pala. pasirodė žinutės, bet pabandžiau parašyt ir nerašosi. wtf?
išvis daba nei ten, nei ten žinutės nesirašo. :]

Redagavo Tomcis· 2009 Kov. 2 18:03:23

Parašė MaFetas· 2009 Kov. 2 18:03:45
#7

o nenori includint faila i headeri? butu daug paprasciau

Parašė Tomcis· 2009 Kov. 2 18:03:45
#8

Hello. Gal kas turi shoutbox'o panelės kodą, kuri galėtų būti įklijuota į headerį ir norma veiktų. Aš inklūdinau Infusions/shoutbox'ą, bet tada sql klaida. Reiktų tokios, pvz: www.thegtaplace.lt. +10.
Nereik nukreipinėt į phpfusion.lt arba į aš, nes ten jau viską apnaršiau. Dėkuj.



Skaityk paryškintą.

Parašė Tomcis· 2009 Bal. 3 14:04:50
#9

Na ką, gal atsakysit? :)

Parašė samsung123· 2009 Bal. 3 14:04:54
#10

Black pshyho ar koks ten nykas buvo muzikos dyzaina su shoutboxu idejas.

Parašė Tomcis· 2009 Bal. 3 16:04:15
#11

Neveikia ta tema, bandžiau. :s

Parašė Manijakass· 2009 Bal. 8 21:04:51
#12

Tau puikiai paaiskino kapstykis pats.

Parašė ozzWANTED· 2009 Bal. 8 21:04:46
#13

Už 10 eurų PayPal'u manau patvaryčiau tau tą modą.

Parašė Tomcis· 2009 Bal. 8 22:04:28
#14

Ei tu. Parsidavėli ašWANTED (da bestas in da fusion), tu tik už pinigus tesugebi.
Beje, jei pagalbos per visą mėnesį nesulaukiu tai ką žn kas per supportas. x]
Apšalęs. Adminas užuot, rodęs pavizdį nariams ir padėdinėdamas kitiems, prašo už tokį menkniekį bapkių.
NET NEKEISTA, PIRMAS PRANEŠIMAS BUVO IŠTRINTAS, GAL IR ŠITĄ IŠTRINS.

Parašė gamz· 2009 Bal. 9 08:04:53
#15

aišku trins ;D man ir sitas puslapis jau nelb ;) kur daugiau pamastyti reikia niekas nepadeda ;D anksciau kaip buvau visiskai zalias ir kur man reikejo labai paaprastu dalyku padejo :D

Parašė 123456788999999999· 2009 Bal. 24 19:04:46
#16

Theme yra tema Clan theme su tokia saukykla headeri išsiimk kodą