vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding Super Mods to admin list??? (https://vborg.vbsupport.ru/showthread.php?t=189214)

Clan=US= 08-26-2008 10:29 PM

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?

Zamurick X 08-26-2008 10:33 PM

You can edit the super moderator usergroup, and set Can Access Control Panel (is Administrator) to Yes.

Clan=US= 08-26-2008 10:40 PM

I don;t want to give them access to the adminCP. That would

Zamurick X 08-26-2008 10:53 PM

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.

Clan=US= 08-26-2008 11:09 PM

Yea but i don't know what to edit in that. If it is it

Zamurick X 08-26-2008 11:57 PM

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.

Spank 08-27-2008 12:07 AM

Quote:

Originally Posted by Clan=US= (Post 1607715)
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.

Clan=US= 08-27-2008 12:15 AM

Quote:

Originally Posted by Zamurick X (Post 1607773)
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 (Post 1607783)
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.

Spank 08-27-2008 01:07 AM

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.

Clan=US= 08-27-2008 01:43 AM

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.


All times are GMT. The time now is 11:51 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.01201 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete