View Full Version : Adding Super Mods to admin list???
Clan=US=
08-26-2008, 10:29 PM
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...
$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', $vbulletin, ERRTYPE_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
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
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
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 (marksilverthorne@empyron.com) 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
I'm not sure on the rules for that tbh, you could email me (marksilverthorne@empyron.com)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 (http://www.vbulletin.com/order/license_agreement.php). 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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.