Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New is_super_admin Function Details »»
New is_super_admin Function
Version: 1.00, by Majik? Majik? is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 05-09-2004 Last Update: Never Installs: 3
 
No support by the author.

New is_super_admin Function
Version: 1.0
vB-version: 3.0.0
Developer: Majik?
Install difficulty: Easy
File edits: 2
Template edits: 0


Description of the Hack:
This hack creates a new function similar to is_member_of which can be used to check if a user's a Super Administrator.

Examples:
PHP Code:
if (is_super_admin($bbuserinfo['userid']))
{
// user is a super admin so do it
}
else
{
// user isn't a super admin
// so do something else or nothing at all

Code:
<if condition="is_super_admin($bbuserinfo['userid'])">
<!-- user's a super admin so do something -->
<else />
<!-- user's not a super admin so do something else -->
</if>
HACK INSTALLATION DETAILS:
Files modified for this Hack:
/includes/adminfunctions_template.php
/includes/functions.php


Thanks to Boofo for allowing me to use part of his code for this.

Show Your Support

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

Comments
  #2  
Old 05-10-2004, 01:50 AM
???`S?LV?R???`'s Avatar
???`S?LV?R???` ???`S?LV?R???` is offline
 
Join Date: Aug 2003
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

interesting
Reply With Quote
  #3  
Old 05-10-2004, 02:35 AM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Different, I do not see much use for it, unless you have alot of admins.
Reply With Quote
  #4  
Old 05-10-2004, 02:51 AM
Majik?'s Avatar
Majik? Majik? is offline
 
Join Date: Mar 2004
Location: Thunder Bay, ON, Canada
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by insanctus
Different, I do not see much use for it, unless you have alot of admins.
I only have one admin other than myself at the moment, but the admin permissions don't always restrict everything I want. So, I use it for some of those as well as some other stuff I may want only myself or other SAdmins (if I add any) to see or access, but not other normal admins in templates (on the main site) or other parts of the site that aren't covered by the admin permissions.

If you can use, use it.. If not, don't. ;p Was mainly done for my own use/needs anyhow.
Reply With Quote
  #5  
Old 05-10-2004, 05:03 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Majik?
I only have one admin other than myself at the moment, but the admin permissions don't always restrict everything I want. So, I use it for some of those as well as some other stuff I may want only myself or other SAdmins (if I add any) to see or access, but not other normal admins in templates (on the main site) or other parts of the site that aren't covered by the admin permissions.

If you can use, use it.. If not, don't. ;p Was mainly done for my own use/needs anyhow.
Isn't the variable $superadministrators set in the config.php file? And therefor usable in array in template conditionals already?
Reply With Quote
  #6  
Old 05-10-2004, 05:05 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by floris
Isn't the variable $superadministrators set in the config.php file? And therefor usable in array in template conditionals already?
Yes..
Reply With Quote
  #7  
Old 05-10-2004, 05:26 PM
Majik?'s Avatar
Majik? Majik? is offline
 
Join Date: Mar 2004
Location: Thunder Bay, ON, Canada
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by floris
Isn't the variable $superadministrators set in the config.php file? And therefor usable in array in template conditionals already?
I've gotten errors using arrays in the template conditionals. So, I use this and no problems.
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 02:17 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.14522 seconds
  • Memory Usage 2,262KB
  • Queries Executed 20 (?)
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)bbcode_code
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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