Solved: 14 Years, 3 Months, 3 Weeks ago Admin Permissions
#21
Solved: 14 Years, 3 Months, 3 Weeks ago
That code isn't needed as this plugin doesn't have an admin language file.

Just noticed an error in the code I provided, have edited all current code snippets, including quotes; if I've edited your post, that's all I've changed.

Try this file:

.php   ems.php (Size: 21.9 KB / Downloads: 154)

Look at the bottom of the file, see if you can make sense of what I've added. Note that it won't appear to work if you test this with your main admin account as you'll be a super admin and you'll override it.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#22
Solved: 14 Years, 3 Months, 3 Weeks ago
Its so confusing, I just cant cope! This is really starting to [----] me off!

I know its not your fault, because you didnt develop MyBB, but in MyBB 1.6 there need to be an easy way to do this! Quality Assurance, I hope your reading this. I just cannot do this, Its so confusing, because i need to do this for other plugins not just EMS and it changes for every plugin! Language files? What the? "Can Manage EMS?"? Huh? Confused
MyBB Extras = Nope.
#23
Solved: 14 Years, 3 Months, 3 Weeks ago
(2010-05-29, 10:16 PM)groovybluedog Wrote: Its so confusing, I just cant cope! This is really starting to [----] me off!

I know its not your fault, because you didnt develop MyBB, but in MyBB 1.6 there need to be an easy way to do this! Quality Assurance, I hope your reading this. I just cannot do this, Its so confusing, because i need to do this for other plugins not just EMS and it changes for every plugin! Language files? What the? "Can Manage EMS?"? Huh? Confused
I am not sure how this is the fault of MyBB as if someone is to blame it is either you or the plugin developer. It's up to the developers to put the code in or not and it's not so hard to add a simple code snippit to a plugin.
#24
Solved: 14 Years, 3 Months, 3 Weeks ago
Its not the actual putting in im confused with. Its using different plugins.

Language files? What are they? What do i put in if it does have a language file? How do i tell if it has one or not?

In that file,

Quote:// plugin hook
$plugins->add_hook("admin_config_permissions", "ems_admin_config_permissions");

// function
function ems_admin_config_permissions($admin_permissions)
{
global $lang;

$admin_permissions['ems'] = "Can manage EMS?";

return $admin_permissions;
}
?>

I get the can manage ems part, Its the name of the option, Ok. I can see where the name of the plugin goes, ok, Its just this language files i dont get yet.
MyBB Extras = Nope.
#25
Solved: 14 Years, 3 Months, 3 Weeks ago
(2010-05-29, 10:44 PM)groovybluedog Wrote: Its not the actual putting in im confused with. Its using different plugins.

Language files? What are they? What do i put in if it does have a language file? How do i tell if it has one or not?

In that file,

Quote:// plugin hook
$plugins->add_hook("admin_config_permissions", "ems_admin_config_permissions");

// function
function ems_admin_config_permissions($admin_permissions)
{
global $lang;

$admin_permissions['ems'] = "Can manage EMS?";

return $admin_permissions;
}
?>

I get the can manage ems part, Its the name of the option, Ok. I can see where the name of the plugin goes, ok, Its just this language files i dont get yet.
Did you try applying the same method to another plugin?
#26
Solved: 14 Years, 3 Months, 3 Weeks ago
I'm not really sure how we could make it much simpler, and we're not going to rewrite the plugin system in the middle of a beta. You'll know if a plugin has a language file as it'll have a file in the ./inc/languages/english/ and/or ./inc/languages/english/admin/ folder, for example ems.lang.php; note this plugin doesn't have any language files. The code I said to remove loads the language file, the admin one in this case, but if the plugin hasn't got any language files, it's not necessary to have that code as it won't be doing anything. I've hardcoded text in there instead of loading a language file.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#27
Solved: 14 Years, 3 Months, 3 Weeks ago
Okay, I get this now, Thanks alot, But how can i restrict admins from Reaching Certain Categorys in settings. Like this:

"Board Online / Offline (2 Settings)
General Configuration (21 Settings)
Server and Optimization Options (17 Settings)
Date and Time Formats (5 Settings)
Forum Home Options (9 Settings)"

How can i restrict people to actual setting groups not the whole settings page?
MyBB Extras = Nope.
#28
Solved: 14 Years, 3 Months, 3 Weeks ago
It's not possible to limit individual settings like that, only main modules. That would need it's own plugin.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#29
Solved: 14 Years, 3 Months, 3 Weeks ago
I don't get it, why do you want to restrict everything from your admins? If you don't trust them than they shouldn't be admins.


Forum Jump:


Users browsing this thread: 1 Guest(s)