PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
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 Back to top

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>&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-.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-.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-.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-.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-.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?
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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
dark-dude
Worker
Worker


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

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

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>&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-.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-.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?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
dark-dude
Worker
Worker


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

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

Any ideas on this Raven?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

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


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

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

ok i made a person an admin...but it never changed thier level...any reason why?
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: 16987
Location: Kansas

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

Use phpMyAdmin and change their user level to 2.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
dark-dude
Worker
Worker


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

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

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?
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: 16987
Location: Kansas

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

In the nuke_users table.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
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 Back to top

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
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 Back to top

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 Back to top

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 to the forums!
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum