Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Only SuperAdmin Can Add New Admin Details »»
Only SuperAdmin Can Add New Admin
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.0.5 Rating:
Released: 02-03-2005 Last Update: Never Installs: 15
 
No support by the author.

Modded by tnguy3n @ http://www.all4actions.net

Description:
This mod allows only super adminstrator to add a new admin or modifying an existing user to become admin.
This mod is useful for forums that have more than one admin or user groups that have access to admin cp and you don't want normal admin to add new admin or modify/promote a user to an admin group (or any group you assigned).

Installation time: 1-2 mins (easy)
File mod: 1
1 new phrase

Note:
- change value 1 in $superadmin to your own userid.
- if you have more than 1 super admin, you can use array to do the trick.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-04-2005, 02:41 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very timely! THANKS!
Reply With Quote
  #3  
Old 02-04-2005, 02:46 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool hack idea. But I have a couple questions.

I added my user id into the $superadmin variable, but it still gives me the no permission message. Is that supposed to happen?
Reply With Quote
  #4  
Old 02-04-2005, 02:50 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Megareus Rex
Cool hack idea. But I have a couple questions.

I added my user id into the $superadmin variable, but it still gives me the no permission message. Is that supposed to happen?
if you'r the only super admin, you can use this code instead
Code:
// only super admin can add admin (and/or smod)
	$cant_add_groups = array(5,6); // use comma to seperate usergroups
	if (($bbuserinfo['userid'] != '1') AND in_array($user['usergroupid'], $cant_add_groups))
	{
		print_stop_message('cant_add_admin');
	}
and I assumed your userid is 1 .
Reply With Quote
  #5  
Old 02-04-2005, 06:57 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
if you'r the only super admin, you can use this code instead
Code:
// only super admin can add admin (and/or smod)
	$cant_add_groups = array(5,6); // use comma to seperate usergroups
	if (($bbuserinfo['userid'] != '1') AND in_array($user['usergroupid'], $cant_add_groups))
	{
		print_stop_message('cant_add_admin');
	}
and I assumed your userid is 1 .
Actually no, there are 2 s-admins. So, what would I do then?
Reply With Quote
  #6  
Old 02-04-2005, 10:11 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

then using this code:
PHP Code:
// only super admin can add admin (and/or smod)
    
$cant_add_groups = array(5,6); // use comma to seperate usergroups
    
$superadmins = array(1,2); // use comma to seperate more sadmin
    
if (!in_array($bbuserinfo['userid'], $superadmins) AND in_array($user['usergroupid'], $cant_add_groups))
    {
        
print_stop_message('cant_add_admin');
    } 
Reply With Quote
  #7  
Old 02-05-2005, 06:11 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you lots!!! It works perfectly now!

Not that I don't trust the other admin, but I like security...lol. >.>
Reply With Quote
  #8  
Old 02-07-2005, 11:47 AM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i notice a slight problem with this... whats to stop the admin adding the 'admin' group as a member group of the user? Something else thats along this line, could we prevent normal admins from editing access masks to certain forums? ie the super admin only forum?
Reply With Quote
  #9  
Old 02-08-2005, 04:09 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what you ask is a standard feature you have to be superadmin to edit admininistrator permissions

also people be VERRY CAREFULL with giving super admin a super admin is like root on linux he cando anything he likes .... forumpermissions can be set seperatly ...
Reply With Quote
  #10  
Old 02-08-2005, 07:01 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Delphiprogrammi
what you ask is a standard feature you have to be superadmin to edit admininistrator permissions

also people be VERRY CAREFULL with giving super admin a super admin is like root on linux he cando anything he likes .... forumpermissions can be set seperatly ...
incorrect. superadmins are the only ones who can give admin PERMISSIONS however regular admins can move other users into the admin usergroup.

What i'm wondering is if theres anyway to make a superadmin forum that normal admins cannot see or grant access to. I also want to make a superadmin only ugroup for purposes of the show groups page... this would work but it dosn't check againt member groups...
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 03:15 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.07801 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete