Funmobile Avatar

Started on the old forum in February 2008 · view the original in the archive · old links redirect here

6 replies · 592 views · started 18 years ago · 1 min read

2 participants
Guest #1

I need code for view user avatar in the posts. Please help. p.s. jbg valjda ce neko skontati sta je pisac htio reci...

amylee Principal · 1,092 posts #2

use the code from view profile?

amylee Principal · 1,092 posts #4

the mood icons from chatrooms might work but i dotn realy see a point in doing it tbh would just add crap more script load for your users if you have images everywhere

Guest #5

Lavalair index.php

//////////////////////////////////View Topic

else if($action=="viewtpc")

{

addonline(getuid_sid($sid),"Viewing Forum Topic","");

$tid = $_GET["tid"];

$go = $_GET["go"];

$tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));

if(!canaccess(getuid_sid($sid), $tfid[0]))

{

    echo "<card id=\"main\" title=\"lavalair.net\">";

  echo "

";

  echo "You Don't Have A Permission To View The Contents Of This Forum

";

  echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

  echo "

";

  echo "</card>";

getAd(); echo "</wml>";

  exit();

}



$tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));

$tnm = htmlspecialchars($tinfo[0]);

echo "<card id=\"main\" title=\"$tnm\">";

echo "

";

$num_pages = getnumpages($tid);

if($page==""||$page<1)$page=1;

if($go!="")$page=getpage_go($go,$tid);

$posts_per_page = 5;

if($page>$num_pages)$page=$num_pages;

$limit_start = $posts_per_page *($page-1);

echo "<a href=\"index.php?action=post&amp;sid=$sid&amp;tid=$tid\">Post reply</a>";

$lastlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;go=last\">Last Page</a>";

$firstlink = "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;page=1\">First Page</a> ";

$golink = "";

if($page>1)

{

  $golink = $firstlink;

}

if($page<$num_pages)

{

  $golink .= $lastlink;

}

if($golink !="")

{

  echo "

$golink";

}

echo "

";

echo "

";

$vws = $tinfo[4]+1;

$rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));

echo "Replies: $rpls[0] - Views: $vws

";

///fm here



if($page==1)

{

  $posts_per_page=4;

  mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE  id='".$tid."'");

  $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));

  $unick = getnick_uid($ttext[0]);

  if(isonline($ttext[0]))

{

  $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";

}else{

    $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";

}

$usl = "

<a href="index.php?action=viewuser&sid=$sid&who=$ttext[0]">$iml$unick</a>";

$topt = "<a href=\"index.php?action=tpcopt&amp;sid=$sid&amp;tid=$tid\">*</a>";

if($go==$tid)

{

  $fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";

}else{

  $fli ="";

}

$pst = parsemsg($ttext[1],$sid);

echo "$usl: [b]I NEED VIEW AVATAR HERE $fli$pst $topt

";

$dtot = date("d-m-y - H:i:s",$ttext[2]);

echo $dtot;

echo "

";

if($ttext[3]>0)

{

  echo "<a href=\"index.php?action=viewtpl&amp;sid=$sid&amp;who=$tid\">POLL</a>

";

}

}

if($page>1)

{

$limit_start--;

}

$sql = "SELECT id, text, uid, dtpost, quote FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";

$posts = mysql_query($sql);

while($post = mysql_fetch_array($posts))

{

$unick = getnick_uid($post[2]);

if(isonline($post[2]))

{

  $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";

}else{

    $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";

}

$usl = "

<a href="index.php?action=viewuser&sid=$sid&who=$post[2]">$iml$unick</a>";

$pst = parsemsg($post[1], $sid);

$topt = "<a href=\"index.php?action=pstopt&amp;sid=$sid&amp;pid=$post[0]&amp;page=$page&amp;fid=$tinfo[5]\">*</a>";

if($post[4]>0)

{

    $qtl = "*<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;pst=\">(quote:p=blaze,d=16-04-2006)</a>*";

}

if($go==$post[0])

{

  $fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";

}else{

  $fli ="";

}

echo "$usl: [b]I NEED VIEW AVATAR HERE $fli$pst $topt

";

$dtot = date("d-m-y - H:i:s",$post[3]);

echo $dtot;

echo "

";

}

///to here

echo "

";

echo "

";

$tmsg = getpmcount(getuid_sid($sid));

$umsg = getunreadpm(getuid_sid($sid));

if($umsg>0)

{

echo "<a href="inbox.php?action=main&sid=$sid">Inbox($umsg/$tmsg)</a> ";

}

if($page>1)

{

  $ppage = $page-1;

  echo "<a href=\"index.php?action=viewtpc&amp;page=$ppage&amp;sid=$sid&amp;tid=$tid\">«PREV</a> ";

}

if($page<$num_pages)

{

  $npage = $page+1;

  echo "<a href=\"index.php?action=viewtpc&amp;page=$npage&amp;sid=$sid&amp;tid=$tid\">Next»</a>";

}

echo "

$page/$num_pages ";

if($num_pages>2)

{

  $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";

    $rets .= "<anchor>[GO]";

    $rets .= "<go href=\"index.php\" method=\"get\">";

    $rets .= "<postfield name=\"action\" value=\"$action\"/>";

    $rets .= "<postfield name=\"tid\" value=\"$tid\"/>";

    $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";

    $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";

    $rets .= "</go></anchor>";

    echo $rets;

}

echo " ";

echo "<a href=\"index.php?action=post&amp;sid=$sid&amp;tid=$tid\">Post reply</a>";

echo "

";

echo "

";

$fid = $tinfo[5];

$fname = getfname($fid);

$cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));

$cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));

$cname = $cinfo[0];

echo "<a href=\"index.php?action=main&amp;sid=$sid\">";

echo "Home</a>>";

$cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));

if($cid[0]>0)

{

$cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));

$cname = htmlspecialchars($cinfo[0]);

echo "<a href=\"index.php?action=viewcat&amp;sid=$sid&amp;cid=$cid[0]\">";

echo "$cname</a>

";

}else{

    $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM ibwf_forums WHERE id='".$fid."'"));

    $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_clubs WHERE id='".$cid[0]."'"));

    $cname = htmlspecialchars($cinfo[0]);

echo "<a href=\"index.php?action=gocl&amp;sid=$sid&amp;clid=$cid[0]\">";

echo "$cname Club</a>

";

}

$fname = htmlspecialchars($fname);

echo "&gt;<a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a>&gt;$tnm";

echo " "; getAd(); echo "</card>";

}

wapkralj Developer · 237 posts #6

I need code for view user avatar in the posts. Please help. p.s. jbg valjda ce neko skontati sta je pisac htio reci...

Add this code

$av = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'"));
echo "
<img src=\"$av[0]\" alt=\"avatar\"/>

between lines

$pst = parsemsg($ttext[1],$sid);

AND

    echo "$usl: $fli$pst $topt
";

in index.php,you can put it where ever you want

I tested this in last lavalair script that amylee posted on this forum druze valjda znas sta trebas....imas pozzzz

Guest #7

Add this code

$av = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'"));
echo "
<img src=\"$av[0]\" alt=\"avatar\"/>

between lines

$pst = parsemsg($ttext[1],$sid);

AND

    echo "$usl: $fli$pst $topt
";

in index.php,you can put it where ever you want

I tested this in last lavalair script that amylee posted on this forum druze valjda znas sta trebas....imas pozzzz

PozZ pa jesil ti ziv? External image (may be gone) rjesio sam problem na drugi nacin evo pogledaj http://united1x2.com/forum

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