Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.2
Author Message
dark-dude
Worker
Worker



Joined: Jun 29, 2003
Posts: 146
Location: Oklahoma

PostPosted: Sun May 02, 2004 6:29 pm Reply with quote

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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<img src=\"images/DDUser/staff.gif\">\n";         
            }
      else {
         $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<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?

_________________
DaRk-DuDe 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun May 02, 2004 6:32 pm Reply with quote

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.
 
View user's profile Send private message
dark-dude







PostPosted: Sun May 02, 2004 7:10 pm Reply with quote

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-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<img src=\"images/DDUser/admin.gif\">\n";
                  }
//Filtering Staff
   elseif ($user_level == 3){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>&nbsp;<img src=\"images/DDUser/staff.gif\">\n";         
            }
      else {
         $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/DDUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;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







PostPosted: Mon May 03, 2004 6:07 pm Reply with quote

Any ideas on this Raven?
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue May 04, 2004 3:26 am Reply with quote

If I remember correctly, level 2 is Admin, level 3 is Moderator
 
View user's profile Send private message Send e-mail
dark-dude







PostPosted: Tue May 04, 2004 8:00 am Reply with quote

ok i made a person an admin...but it never changed thier level...any reason why?
 
Raven







PostPosted: Tue May 04, 2004 8:08 am Reply with quote

Use phpMyAdmin and change their user level to 2.
 
dark-dude







PostPosted: Tue May 04, 2004 9:12 am Reply with quote

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







PostPosted: Tue May 04, 2004 9:18 am Reply with quote

In the nuke_users table.
 
BrainSmashR
New Member
New Member



Joined: May 06, 2004
Posts: 16
Location: Louisiana, USA

PostPosted: Fri May 07, 2004 5:47 am Reply with quote

Will be trying to add more to it this week-end myself......can't ever have to much site info, right? Twisted Evil

So look forward to more questions on this topic

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger ICQ Number
peace
Worker
Worker



Joined: Mar 11, 2004
Posts: 209

PostPosted: Sun May 09, 2004 9:32 pm Reply with quote

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 Rolling Eyes
 
View user's profile Send private message
ballymuntrev
Hangin' Around



Joined: Mar 22, 2004
Posts: 49

PostPosted: Mon May 10, 2004 5:28 am Reply with quote

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... Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.2

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©