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.

Clan=US= 08-28-2008 10:21 PM

Anyone no how to do this?????

Opserty 08-28-2008 10:34 PM

You have to put them in a usergroup (either the default Administrator usergroup or you own custom usergroup) but they must have the usergroup permission as given in post #2. vBulletin adds the user to addition tables (administrator is the name I think - which holds the extra permissions/options). You can't get around this... (at least not easily) they need access to the AdminCP if you are going to give them Administrator permissions.

Clan=US= 08-28-2008 10:43 PM

Yea that is what everyone told me about making it so the Super Moderates could edit Users in the ModCP and i did it so i know there has to be a way. If it is a default thing that can edit. Or something in the database.

Opserty 08-28-2008 11:15 PM

Look through the PHP code that associated with the page you want them to appear on. See how/what vBulletin gets and make sure you have data where it needs it. Then find out where it saves it and make sure it saves yours too.

There is a way but the only way you're going to find it is by looking yourself really.

Clan=US= 08-28-2008 11:19 PM

Yea i know that lol i just want help finding that file or place in the database. Thats all.

Marco van Herwaarden 08-29-2008 07:59 AM

Quote:

Originally Posted by Spank (Post 1607822)
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.

The rules regarding this are outlined in the License Agreement. It is not allowed to distribute your vB files. All that you can do is to provide instructions on how to modify your own copy of vB.

PS Adding moderators to the Admin permissions tables, could give strange results on the long term, and i would not suggest to try this.

Clan=US= 08-29-2008 08:47 PM

Can you give me the name of the table and where to find it so i can just try. I can change it back if i need to.

Ok thank you i will email you when i get a chance

Opserty 08-30-2008 08:29 AM

A query was given in the PHP code in post #4. ;)

Clan=US= 08-30-2008 05:45 PM

Ok thank you i will try it and get back saying what it did

indiancinema 11-23-2008 10:08 PM

any info on this?


All times are GMT. The time now is 04:24 AM.

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.01134 seconds
  • Memory Usage 1,768KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete