3 tier shoutbox for wapdesire v2

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

11 replies · 1,660 views · started 16 years ago · 1 min read

TL;DR · summary of 11 replies
  • the code provided had syntax errors that caused a parse error
  • brand suggested posting main.php to help diagnose issues
  • blades posted their main.php for further assistance
  • brand provided working code for a 3-tier shoutbox system

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

3 participants
blades Junior · 23 posts #1

hi anyone have the codeing for the 3 tier shoutbox plz

brand Senior · 391 posts #2

blades wrote: hi anyone have the codeing for the 3 tier shoutbox plz

if(align()!=center)$main.="<div class=\"center\">\n";
else $main.="<div class=".align().">\n";
if(points(getuid_sid($sid))>14){$main.="<form action=\"./shoutbox/shout.php?sid=$sid\" method=\"post\">\n";}
$main.="<img src=\"./phpThumb/phpThumb.php?src=../images/$banner\" alt=\"-------\"/><br/>
<b><img src=\"./phpThumb/phpThumb.php?src=../images/box.gif\" alt=\"-------\"/></b><br/>\n";
    if($who =="")
    {
        $sql = "SELECT id, shout, uid, shtime  FROM shouts ORDER BY shtime DESC LIMIT 3";
}else{
    $sql = "SELECT id, shout, uid, shtime  FROM shouts  WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT 3";
}

    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
        $shnick = getnick_uid($item[2]);
        $sht = getbbcode($item[1], $sid, 1);
        $shdt = date("d m y-H:i", $item[3]);
      $lnk = "<a href=\"./profile.php?who=$item[2]&sid=$sid\">$shnick Says</a>: $sht<br/>$shdt";
     if(delshout(getuid_sid($sid),$lshout[2])){
$main.=" <a href=\"./shoutbox/delete.php?delete=$item[0]&sid=$sid\">
<img src=\"./images/error.gif\" alt=\"[x]\"/></a>\n";
}else{
        $dlsh = "";
      }
      $main.="$lnk $dlsh<br/>";
    }
    }
$main.="<br/><a href=\"./shoutbox/history.php?sid=$sid\">History</a>\n";
if(points(getuid_sid($sid))<15){
$points="points";
if(points(getuid_sid($sid))==14){$points="point";}
$main.="<br/>You need ".(15-points(getuid_sid($sid)))." more $points to shout!<br/>
<img src=\"./phpThumb/phpThumb.php?src=../images/$banner\" alt=\"-------\"/>
</div>\n";

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

centi Developer · 159 posts #3

y is the people asking the same code again n again

😳 .................................... http://photomag.lk/ .................................... 🤨

blades Junior · 23 posts #5

cause i cant find one that works this as errors to thanks anyway bud

brand Senior · 391 posts #6

blades wrote: cause i cant find one that works this as errors to thanks anyway bud

the one i put on should not give errors as i copied it from my site that i have it on

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

blades Junior · 23 posts #7

understand that bud but here is the error i get everytime Parse error: syntax error, unexpected T_CLASS in /home//public_html/main.php on line 89

brand Senior · 391 posts #8

blades wrote: understand that bud but here is the error i get everytime Parse error: syntax error, unexpected T_CLASS in /home//public_html/main.php on line 89

post a copy of ya main.php n i will have a look for you

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

blades Junior · 23 posts #9

here it is m8 addonline(getuid_sid($sid),"Main Menu","main.php"); echo head_tag(getnick_sid($sid)."@".sitename(),1,getnick_sid($sid)); $title="<img src="./phpThumb/phpThumb.php?src=../images/$logo" alt="".sitename().""/>

".date("g:ia",strtotime("-0 hours"))." ".date("l jS F",strtotime("-0 hours"))."

".$row_users["username"]." You're Back ;o)"; if($count_popup[0]>0){ $rname=mysql_fetch_array(mysql_query("SELECT name FROM chatrooms WHERE id='".$rid."'")); $popsenabled=mysql_fetch_array(mysql_query("SELECT popups FROM users WHERE id='".getuid_sid($sid)."'")); $pminfo=mysql_fetch_array(mysql_query("SELECT id, text, byid, timesent, toid, reported FROM popups WHERE unread='1' AND toid='".getuid_sid($sid)."'")); mysql_query("UPDATE popups SET unread='0' WHERE id='".$pminfo[0]."'"); if(isspam($pminfo[1])){mysql_query("UPDATE popups SET reported='1' WHERE id='".$pminfo[0]."'");} $sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='".$pminfo[2]."'")); if($sex[0]=="M"){$usersex="<img src="./images/male.gif" alt="(M)"/>";$color="#0000FF";} if($sex[0]=="F"){$usersex="<img src="./images/female.gif" alt="(F)"/>";$color="#FF0066";} if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);} $main=" Popup Message

From $usersex".getnick_uid($pminfo[2])."

(".date("H:i-D jS M y",$pminfo[3]).") \n"; $main.=getbbcode($pminfo[1],$sid,1)."

<form action=\"./popups.php?send=1&amp;who=$pminfo[2]&amp;sid=$sid\" method=\"post\"> **Reply**

<input name="message" maxlength="500"/>

<input type="submit" value="Send"/>

</form> \n"; $location=mysql_fetch_array(mysql_query("SELECT link FROM online WHERE uid='".getuid_sid($sid)."'")); $main.="

<a href="./$location[0]?sid=$sid">Skip Msg</a> \n"; //$main.="<a href="inbxproc.php?action=rptpop&sid=$sid&pmid=$pminfo[0]">Report</a> "; if($rid!=""){$main.="<a href="./chat/chat.php?sid=$sid&rid=$rid$pass">Back To $rname[0]</a> \n";} } if(align()!=center)$main.="\n"; else $main.="\n"; if(points(getuid_sid($sid))>14){$main.="<form action="./shoutbox/shout.php?sid=$sid" method="post">\n";}

$main.="<a href="rent.php?action=rent&sid=$sid">Sites 4 Rent </a>\n";

$main.="<img src="./phpThumb/phpThumb.php?src=../images/$banner" alt="-------"/>

ShoutBox \n"; $lshout=mysql_fetch_array(mysql_query("SELECT shout, uid, id FROM shouts ORDER BY shtime DESC LIMIT 1")); $sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='".$lshout[1]."'")); if($sex[0]=="M"){$usersex="<img src="./images/male.gif" alt="(M)"/>";$color="#0000FF";} if($sex[0]=="F"){$usersex="<img src="./images/female.gif" alt="(F)"/>";$color="#FF0066";} if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);} $shnick=getnick_uid($lshout[1]); $main.="$usersex*<a href="./profile.php?who=$lshout[1]&sid=$sid" style="color:$color;">".$shnick."</a>*

".getbbcode($lshout[0],$sid,1); if(delshout(getuid_sid($sid),$lshout[2])){ $main.=" <a href="./shoutbox/delete.php?sid=$sid&delete=$lshout[2]"> <img src="./images/error.gif" alt="[x]"/></a>\n"; } $main.=" <a href="./shoutbox/history.php?sid=$sid">History</a>\n"; if(points(getuid_sid($sid))<15){ $points="points"; if(points(getuid_sid($sid))==14){$points="point";} $main.=" You need ".(15-points(getuid_sid($sid)))." more $points to shout!

<img src="./phpThumb/phpThumb.php?src=../images/$banner" alt="-------"/> \n"; }else{ $main.=" ShoutBox Message:

<input name="shtxt" maxlength="100"/>

<input type="submit" value="Add Shout"/>

<img src="./phpThumb/phpThumb.php?src=../images/$banner" alt="-------"/>

</form> \n"; } $main.=" \n"; if(getbbcode(greeting(),$sid,0)!=""){$main.=getbbcode(greeting(),$sid,0)." \n";}

if(isowner(getuid_sid($sid))){ $main.=" <a href="./admin/tools.php?type=tools&sid=$sid">Owner Tools</a>\n"; }else if(isheadadmin(getuid_sid($sid))){ $main.="<a href="./admin/tools.php?type=tools&sid=$sid">Head Admin Tools</a> \n"; }else if((ismod(getuid_sid($sid)))||(isadmin(getuid_sid($sid)))){ $main.="<a href="./admin/tools.php?type=tools&sid=$sid">Admin Tools</a> \n"; }else if(use_tools(getuid_sid($sid))){ $main.="<a href="./admin/tools.php?type=tools&sid=$sid">Hidden Tools</a> \n"; } if(isowner(getuid_sid($sid))||isheadadmin(getuid_sid($sid))||isadmin(getuid_sid($sid))||ismod(getuid_sid($sid))||use_tools(getuid_sid($sid))){ if(align()!=center)$main.=" \n"; else $main.=" \n"; $main.="<img src="./phpThumb/phpThumb.php?src=../images/$banner" alt="-------"/> \n"; } $noi=mysql_fetch_array(mysql_query("SELECT count() FROM users WHERE validated='0'")); if((validate(getuid_sid($sid)))&&($noi[0]>0)){ $main.="<a href="./admin/validate.php?sid=$sid">$noi[0] Members Awaiting Validation</a> \n"; } $noi=mysql_fetch_array(mysql_query("SELECT count() FROM download_files WHERE active='0'")); if((download_tools(getuid_sid($sid)))&&($noi[0]>0)){ $main.="<a href="./downloads/downloads.php?sid=$sid">$noi[0] Files Awaiting Validation</a> \n"; } if(use_tools(getuid_sid($sid))){ $adminclub="1"; $ismem=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM clubmembers WHERE clubid='".$adminclub."' AND uid='".getuid_sid($sid)."'")); if($ismem[0]==0){ $main.="<a href="./clubs/join.php?id=$adminclub&sid=$sid">Join Admin Club Now!</a> \n"; }else{ $clinfo=mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, points, created FROM clubs WHERE id='".$adminclub."'")); $clubname=htmlspecialchars($clinfo[0]);

brand Senior · 391 posts #10
if(points(getuid_sid($sid))>14){$main.="<form action=\"./shoutbox/shout.php?sid=$sid\" method=\"post\">\n";}
$main.="<img src=\"./phpThumb/phpThumb.php?src=../images/$banner\" alt=\"-------\"/><br/>
<b><img src=\"./phpThumb/phpThumb.php?src=../images/box.gif\" alt=\"-------\"/></b><br/>\n";
    if($who =="")
    {
        $sql = "SELECT id, shout, uid, shtime  FROM shouts ORDER BY shtime DESC LIMIT 3";
}else{
    $sql = "SELECT id, shout, uid, shtime  FROM shouts  WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT 3";
}

    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
        $shnick = getnick_uid($item[2]);
        $sht = getbbcode($item[1], $sid, 1);
        $shdt = date("d m y-H:i", $item[3]);
      $lnk = "<a href=\"./profile.php?who=$item[2]&sid=$sid\">$shnick Says</a>: $sht<br/>$shdt";
     if(delshout(getuid_sid($sid),$lshout[2])){
$main.=" <a href=\"./shoutbox/delete.php?delete=$item[0]&sid=$sid\">
<img src=\"./images/error.gif\" alt=\"[x]\"/></a>\n";
}else{
        $dlsh = "";
      }
      $main.="$lnk $dlsh<br/>";
    }
    }
$main.="<br/><a href=\"./shoutbox/history.php?sid=$sid\">History</a>\n";
if(points(getuid_sid($sid))<15){
$points="points";
if(points(getuid_sid($sid))==14){$points="point";}
$main.="<br/>You need ".(15-points(getuid_sid($sid)))." more $points to shout!<br/>
<img src=\"./phpThumb/phpThumb.php?src=../images/$banner\" alt=\"-------\"/>
</div>\n";
}else{
$main.="<br/>ShoutBox Message:<br/>
<input name=\"shtxt\" maxlength=\"100\"/><br/>
<input type=\"submit\" value=\"Add Shout\"/><br/>
<img src=\"./phpThumb/phpThumb.php?src=../images/$banner\" alt=\"-------\"/>
</form>
</div>\n";
}

this works i just put it on a testing site

to see it working click testing site and login using demo for username and password

if you still having problems please upload ya main.php on here and i will look to see where ya getting error

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

blades Junior · 23 posts #11

thats great m8 thanks works a treat

brand Senior · 391 posts #12

i now it works as i done it on my tester site lol but glad you sorted now

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close