DeadMan384AD
11-14-2002, 06:22 AM
Alright... I'm working on having ranks on my board, with my own script.
Us admins and the supermods have their own designated rank, but that bit of code doesnt seem to be working. I dont know a whole lot of php, so I figure somethings wrong in my IF statement, or I'm not referring to the correct thing, trying to call the usergroup id...
Here's the code:
if ($post[usergroupid] == 6) {
$post[rank] = "<img src=\"images/ranks/adminrank.gif\" border=0>";
}
elseif ($post[usergroupid] == 5) {
$post[rank] = "<img src=\"images/ranks/smodrank.gif\" border=0>";
}
elseif ($post[posts] >= 1000) {
$post[rank] = "<img src=\"images/ranks/8.gif\" border=0>";
}
Also, theres this one guy who wants his posts always to show as 0. :ermm: Dont ask me why, cause I dont know.
This does not work:
elseif ($post[userid] = 71) {
$post[rank] = "<img src=\"images/ranks/1.gif\" border=0>";
$post[posts] = 0;
where do I modify the code for $post[posts] ? I looked around for it, but couldnt find it.
btw, I'm editing showthread.php and functions.php(in the admin folder) I'm still using 2.2.6
Us admins and the supermods have their own designated rank, but that bit of code doesnt seem to be working. I dont know a whole lot of php, so I figure somethings wrong in my IF statement, or I'm not referring to the correct thing, trying to call the usergroup id...
Here's the code:
if ($post[usergroupid] == 6) {
$post[rank] = "<img src=\"images/ranks/adminrank.gif\" border=0>";
}
elseif ($post[usergroupid] == 5) {
$post[rank] = "<img src=\"images/ranks/smodrank.gif\" border=0>";
}
elseif ($post[posts] >= 1000) {
$post[rank] = "<img src=\"images/ranks/8.gif\" border=0>";
}
Also, theres this one guy who wants his posts always to show as 0. :ermm: Dont ask me why, cause I dont know.
This does not work:
elseif ($post[userid] = 71) {
$post[rank] = "<img src=\"images/ranks/1.gif\" border=0>";
$post[posts] = 0;
where do I modify the code for $post[posts] ? I looked around for it, but couldnt find it.
btw, I'm editing showthread.php and functions.php(in the admin folder) I'm still using 2.2.6