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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2008, 10:29 PM
Clan=US= Clan=US= is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding Super Mods to admin list???

Well i would like to add my super moderators to the Administrator Permissions list in the AdminCP without adding them to the Administrator group. I know it can been done becasue its all in code and anything can happen.

I want to make it so that they can edit users. Now i have done all the coding myself and i have made it so that Super Mods can edit users and can save them in the ModCP but i would like to know where the file is to edit the Administrator Permissions or the user group id number 5 (Super moderators) so that i can add them to the Administrator Permissions list in the AdminCP.

Coders or anyone know where this file is or something i can do to make this happen?
Reply With Quote
  #2  
Old 08-26-2008, 10:33 PM
Zamurick X Zamurick X is offline
 
Join Date: Dec 2007
Location: Canada (BC)
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can edit the super moderator usergroup, and set Can Access Control Panel (is Administrator) to Yes.
Reply With Quote
  #3  
Old 08-26-2008, 10:40 PM
Clan=US= Clan=US= is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don;t want to give them access to the adminCP. That would
Reply With Quote
  #4  
Old 08-26-2008, 10:53 PM
Zamurick X Zamurick X is offline
 
Join Date: Dec 2007
Location: Canada (BC)
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well there is some interesting code in admincp/adminpermissions.php...

PHP Code:
    $user $db->query_first("
        SELECT administrator.*, IF(administrator.userid IS NULL, 0, 1) AS isadministrator,
            user.userid, user.username
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "administrator AS administrator ON(administrator.userid = user.userid)
        WHERE user.userid = " 
$vbulletin->GPC['userid']
    );

    if (!
$user)
    {
        
print_stop_message('no_matches_found');
    }
    else if (!
$user['isadministrator'])
    {
        
// should this user have an administrator record??
        
$userinfo fetch_userinfo($user['userid']);
        
cache_permissions($userinfo);
        if (
$userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
        {
            
$admindm =& datamanager_init('Admin'$vbulletinERRTYPE_SILENT);
            
$admindm->set('userid'$userinfo['userid']);
            
$admindm->save();
            unset(
$admindm);
        }
        else
        {
            
print_stop_message('invalid_user_specified');
        }
    } 
Not sure what it all means, but it's sure something to look at.
Reply With Quote
  #5  
Old 08-26-2008, 11:09 PM
Clan=US= Clan=US= is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea but i don't know what to edit in that. If it is it
Reply With Quote
  #6  
Old 08-26-2008, 11:57 PM
Zamurick X Zamurick X is offline
 
Join Date: Dec 2007
Location: Canada (BC)
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've done some looking around, and I believe all you need to do is find the file which adds administrators to the administrator SQL table, and change the code for it to include super moderators.

If you find that file, please post the name of it so someone can edit it for your needs. I looked for a while but failed to figure out which one it was.
Reply With Quote
  #7  
Old 08-27-2008, 12:07 AM
Spank Spank is offline
 
Join Date: Jan 2007
Location: Scotland
Posts: 809
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Clan=US= View Post
Well i would like to add my super moderators to the Administrator Permissions list in the AdminCP without adding them to the Administrator group. I know it can been done becasue its all in code and anything can happen.

I want to make it so that they can edit users. Now i have done all the coding myself and i have made it so that Super Mods can edit users and can save them in the ModCP but i would like to know where the file is to edit the Administrator Permissions or the user group id number 5 (Super moderators) so that i can add them to the Administrator Permissions list in the AdminCP.

Coders or anyone know where this file is or something i can do to make this happen?
Would you mind telling me the code to allow super mods to edit users in the modcp, cos I would really like this.
Reply With Quote
  #8  
Old 08-27-2008, 12:15 AM
Clan=US= Clan=US= is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zamurick X View Post
I've done some looking around, and I believe all you need to do is find the file which adds administrators to the administrator SQL table, and change the code for it to include super moderators.

If you find that file, please post the name of it so someone can edit it for your needs. I looked for a while but failed to figure out which one it was.
Yea that has been my problem finding the files. I will see what i can do. Let me know if you find it


Quote:
Originally Posted by Spank View Post
Would you mind telling me the code to allow super mods to edit users in the modcp, cos I would really like this.

Sure um what are the rules on how i give you file of vbulletin? Because it is pretty much 6 big file with a some small edits everywhere.
Reply With Quote
  #9  
Old 08-27-2008, 01:07 AM
Spank Spank is offline
 
Join Date: Jan 2007
Location: Scotland
Posts: 809
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure on the rules for that tbh, you could email me them, I would really appreciate it cos I've been looking to do this for a while.
Reply With Quote
  #10  
Old 08-27-2008, 01:43 AM
Clan=US= Clan=US= is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea i have been looking on these forum for almost a month and there is just sot after post of it can't be doe so i just gave it a try and got it. But yea i will email it to you just give me a day or 2.

If anyone knows how to add the SPmods to that admin lsit PLEASE let me know. This could help out so many people not just myself.
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:49 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.06109 seconds
  • Memory Usage 2,268KB
  • 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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (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_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