Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2002, 09:03 AM
LOTR's Avatar
LOTR LOTR is offline
 
Join Date: Dec 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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...
Reply With Quote
  #2  
Old 12-13-2002, 02:22 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 12-13-2002, 02:50 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 12-13-2002, 03:23 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 12-15-2002, 12:14 AM
LOTR's Avatar
LOTR LOTR is offline
 
Join Date: Dec 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #6  
Old 12-15-2002, 06:22 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:47 PM.


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.11166 seconds
  • Memory Usage 2,218KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete