PDA

View Full Version : 2 vars in postbits, wont work.


Iceman86
05-17-2002, 06:21 PM
Ok, i have this script.


#BEGIN HACK#
$fids = "forumid=5 OR forumid=8";

// User id en Team id in de respectievelijke vars $usrid en $tmid zetten.
$sql1 = "SELECT * FROM user WHERE userid=$bbuserinfo[userid] ORDER BY userid DESC";
$result1 = mysql_query($sql1);
while($usr= mysql_fetch_array($result1)){
$usrid = $usr[userid];
$tmid = $usr[teamid];
}


$sql2 = "SELECT * FROM thread WHERE postuserid=$usrid AND ($fids) ORDER BY threadid DESC";
$result2 = mysql_query($sql2);
$usr[pubstro] = mysql_num_rows($result2);

// Als er geen team is word
if ($tmid != "0"){
$sql3 = "SELECT * FROM groepen WHERE id='$tmid' ORDER BY id ASC";
$result3 = mysql_query($sql3);
while ($object3 = mysql_fetch_array($result3)){
$teamtitel = $object3[titel];
}
$usr[team]= "<a href=\"groepen.php?s=$session[sessionhash]&oneteam=1&teamname=$teamtitel\">$teamtitel</a>";
}else{
$usr[team]="none";
}
# END HACK#


I placed the code in showtread.php (just above: eval("dooutput(\"".gettemplate("showthread")."\");");

i placed Total: $usr[pubstro] <BR> Team: $usr[team] in postbits.
But. It doesnt work.

Can annyone explane to me how i should do it?.

Steve Machol
05-18-2002, 12:31 AM
Iceman86, please go to this (http://www.vbulletin.com/members/vbulletin.org.php) page and enter your username, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.