Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2002, 09:38 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default The wonderful remove feature - Where is the feature to remove that???

Ok...

Some of you may know that we have had some bad times over the last few weeks...

I would like to know how I can :

a.) make the remove feature not work for any admin unless they are userid 1 or 3
b.) male it so that it only shows for members unless they are userid 1 or 3...

i.e. Only myself and the owner can remove admins, but other admins can remove anyone except other admins...

This is because myself and the owner are not a security leak, but the other admins could be...

Can it be done?

Satan
Reply With Quote
  #2  
Old 06-28-2002, 09:43 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure it is, go into /admin/user.php

Find
PHP Code:
// ###################### Start Remove #######################

if ($action=="remove") { 
Add below:
PHP Code:

if (($bbuserinfo[userid]!=AND $bbuserinfo[userid]!=3)) {
  echo 
"<p>You cannot edit profiles.</p>";
  
cpfooter();
  exit;

I dont really get your second request, but. That should do what you want.

[edit] I think its if (($bbuserinfo[userid]!=1 OR $bbuserinfo[userid]!=3)) ... it might be AND. I get mixed up with those things... And I changed my mind, I set it at and... eurgh *head hurts*

Actually, dont trust that. lol, firefly or someone else, can you tell me if its OR or AND? @_@;
Reply With Quote
  #3  
Old 06-28-2002, 10:04 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeh...

It is AND...

Thanks for the first bit

Now to get it so that Admins can remove members, mods, super mods etc, but not other Admins...

Satan
Reply With Quote
  #4  
Old 06-28-2002, 10:24 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, you can put something like OR $user[usergroupid]==<admin group> in there... I think

hehe ^_^
Reply With Quote
  #5  
Old 06-28-2002, 10:32 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, but AND, not or
Reply With Quote
  #6  
Old 06-28-2002, 10:43 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, for the usergroup part, wouldnt you want to be doing

"If userid isnt 1 and userid isnt 3 or usergroupid is 1"

hmm, it might not be $user[usergroupid] that you want to use.. I dunno

/me <-- stupid
Reply With Quote
  #7  
Old 06-28-2002, 10:55 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yo have to find this lines:
PHP Code:
if ($HTTP_POST_VARS['action']=="kill") {

  
$user=$DB_site->query_first("SELECT username FROM user WHERE userid='$userid'"); 
replace them with this:
PHP Code:
if ($HTTP_POST_VARS['action']=="kill") {

  
$user=$DB_site->query_first("SELECT username,usergroupid FROM user WHERE userid='$userid'");
if (
$bbuserinfo[userid]!=AND $bbuserinfo[userid]!=AND $user[usergroupid]==6) {
  echo 
"<p>You cannot delete Admin users.</p>";
  
cpfooter();
  exit;

Reply With Quote
  #8  
Old 06-28-2002, 12:04 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

Thanks

Satan
Reply With Quote
  #9  
Old 06-28-2002, 04:16 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

np, hope you'll have more luck in the future than in past...
Reply With Quote
  #10  
Old 06-28-2002, 09:40 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

Thanks...

So do I

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 01:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04532 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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