vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Hide Admin Profiles From Mods & supermods (https://vborg.vbsupport.ru/showthread.php?t=46624)

LOTR 12-13-2002 09:03 AM

Hide Admin Profiles From Mods & supermods
 
Does anyone can help me on how i can hide my admins profiles from the mods and supermods so the admins can have their
own privacy :) ?

So when a mods or supermods login through the mods control panels they cant view the admins profiles?

Sorry i have search the entire web, cant find the hacks..
would anyone please help me? ???
10Q...

WetWired 12-13-2002 02:22 PM

Open up mod/user.php.

Find the line:
PHP Code:

// ###################### Start viewuser ####################### 

Then find the line
PHP Code:

$user=$DB_site->query_first("SELECT userid,usergroupid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,styleid,invisible,usertitle,customtitle,FROM_UNIXTIME(joindate) AS joindate,cookieuser,daysprune,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,posts,timezoneoffset,emailnotification,emailonpm,receivepm,ipaddress FROM user WHERE userid=$userid"); 

Add this below it
PHP Code:

  if($user[usergroupid]==6){
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  } 

As always, be sure to back up files you modify before modifying them. I may have made a typo, etc.

Chris M 12-13-2002 02:50 PM

If you want to do it on a "per-user" basis, try this:)

Open mod/user.php
Find:
Code:

require("./global.php");

modlog(iif($userid!=0,"user id = $userid",""));

Underneath add:
Code:

if (($userid=="1") && ($bbuserinfo[usergroupid]!="6")) {
echo"<p>You cannot view this profile!</p>";
exit;
}

It works just as well as Logician's code, except this can target specific users as well;)

Satan

WetWired 12-13-2002 03:23 PM

Why add the check for if it's an admin? Admins use admin/user.php, mods use mod/user.php . That's why my code just says if the user who's profile you're trying to view is an admin, give an error message.

LOTR 12-15-2002 12:14 AM

thanx guys :).. works well with WetWired... although i cant find
this code by hellsatan..

PHP Code:

modlog(iif($userid!=0,"user id = $userid","")); 

but it works with Wetwired..:)

Chris M 12-15-2002 06:22 PM

@Wet Wired - My code is on a per-user basis;)

Besides...What I posted has 2 advantages;)

a.) It can be used in the admin/user.php file, by just changing:
Code:

$bbuserinfo[usergroupdid]!="6"
to
Code:

$bbuserinfo[userid]!="x"
and turn it into a user check (replace "x" with your userid, and to add more users, just add before the first closing bracket:
Code:

or $bbuserinfo[userid]!="x"
as many times as you need (replacing "x" with userids allowed to view it)

b.) I sometimes browse the users with the mod/user.php file;)

@LOTR - Ah;) Just put it below:
Code:

require("./global.php");
I forgot that the "modlog" information is from a hack I installed by NTLDR:)

Satan


All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01804 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete