| Author |
Message |
dark-dude Worker


Joined: Jun 29, 2003 Posts: 146 Location: Oklahoma
|
Posted:
Sun May 02, 2004 6:29 pm |
|
Raven I took your Info Block and another one and made one and Now I have a question. I am new to this so tryin to learn how to make them. Mine has the old code: | Code: | //Filtering Administrator add more admin names if needed
if (($session[uname] == XXXXX) or ($session[uname] == xxxxx)) {
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/admin.gif\">\n";
}
//Filtering Staff 1 add more admin names if needed
elseif (($session[uname] == XXXXX) or ($session[uname] == xxxxx)){
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/staff.gif\">\n";
}
//Filtering Staff 2
elseif (($session[uname] == XXXXXX) or ($session[uname] == xxxxx)){
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/staff.gif\">\n";
}
//Filtering Staff 3
elseif (($session[uname] == XXXXX) or ($session[uname] == xxxxx)){
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/staff.gif\">\n";
}
else {
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>\n";
}
$who_online_now .= ( $i != $member_online_num ? "" : "" );
$i++;
}
} | Now whenever i replace the first one | Code: | //Filtering Administrator add more admin names if needed
if (($session[uname] == XXXXX) or ($session[uname] == xxxxx)) {
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/admin.gif\">\n"; | with the XXXXX i put dark-dude and then the xxxxx i put dark-dude. Now admin shows beside my nick but...also any member that logs in also shows as admin and not staff. Any ideas what is wrong here? And how it would determine Admin from Staff from user? |
|
|
 |
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Sun May 02, 2004 6:32 pm |
|
Your syntax is incorrect if it's exactly as shown. It should be like this
if (($session[uname] == 'XXXXX') or ($session[uname] == 'xxxxx'))
and for safety you should surround the uname with ticks also. |
|
|
|
 |
dark-dude Worker


Joined: Jun 29, 2003 Posts: 146 Location: Oklahoma
|
Posted:
Sun May 02, 2004 7:10 pm |
|
OK i found this in CZ new block | Code: | // Get user ID's of online registered users
$resultuser_id = sql_query( "SELECT user_id, user_level FROM ".$prefix."_users where username='$session[uname]'", $dbi );
list( $user_id, $user_level ) = sql_fetch_row( $resultuser_id, $dbi );
//Filtering Administrator
if ($user_level == 2){
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/admin.gif\">\n";
}
//Filtering Staff
elseif ($user_level == 3){
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a> <img src=\"images/DDUser/staff.gif\">\n";
}
else {
$who_online_now .= "<br>$zi.<a href=\"messages-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> <A HREF=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\">$session[uname]</a>\n";
}
$who_online_now .= ( $i != $member_online_num ? "" : "" );
$i++;
}
} | And everything werks now...except...what dtermines a level 3 user? I added or changed someone to a site admin in the forums and made them an admin in Control Panel...but they don't get the admin gif or the staff gif...what is a level 3? |
|
|
 |
 |
dark-dude Worker


Joined: Jun 29, 2003 Posts: 146 Location: Oklahoma
|
Posted:
Mon May 03, 2004 6:07 pm |
|
|
 |
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
|
Posted:
Tue May 04, 2004 3:26 am |
|
If I remember correctly, level 2 is Admin, level 3 is Moderator |
|
|
|
 |
dark-dude Worker


Joined: Jun 29, 2003 Posts: 146 Location: Oklahoma
|
Posted:
Tue May 04, 2004 8:00 am |
|
ok i made a person an admin...but it never changed thier level...any reason why? |
|
|
 |
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue May 04, 2004 8:08 am |
|
Use phpMyAdmin and change their user level to 2. |
|
|
|
 |
dark-dude Worker


Joined: Jun 29, 2003 Posts: 146 Location: Oklahoma
|
Posted:
Tue May 04, 2004 9:12 am |
|
ok where is that at? and do they have to be made admin to be a level 2 ....meaning do I have to change em to an admin before i change the levels? |
|
|
 |
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Tue May 04, 2004 9:18 am |
|
|
|
 |
BrainSmashR New Member


Joined: May 06, 2004 Posts: 16 Location: Louisiana, USA
|
Posted:
Fri May 07, 2004 5:47 am |
|
Will be trying to add more to it this week-end myself......can't ever have to much site info, right?
So look forward to more questions on this topic |
|
|
 |
 |
peace Worker


Joined: Mar 11, 2004 Posts: 209
|
Posted:
Sun May 09, 2004 9:32 pm |
|
i wonder when u built a block for example site info there is lots of kind around and all says copyright so when u built one how u code them u use their codes ? or what  |
|
|
|
 |
ballymuntrev Hangin' Around

Joined: Mar 22, 2004 Posts: 49
|
Posted:
Mon May 10, 2004 5:28 am |
|
| dark-dude wrote: | | ok where is that at? and do they have to be made admin to be a level 2 ....meaning do I have to change em to an admin before i change the levels? |
Look here at this post for info on how to change the admin levels in PhpMyAdmin... |
|
|
|
 |
|
|
|
|