MyBB Community Forums

Full Version: I DON'T UNDERSTAND THIS!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Please read the instructions about the admin/users.php file and make some sense out of it for me. It doesn't say exactly where it wants what needs to be added. I'm just extremely confused in general and really need this to work.

Thanks,
Well I'll start you off:

Quote:To begin open up ./admin/adminoptions.php

Find this code:
Code:
"canedithelp" => addslashes($newperms['canedithelp']),

After that add:

Code:
"canbanusers" => addslashes($newperms['canbanusers']),

Let's break it down into 3 parts:

Quote:To begin open up ./admin/adminoptions.php
All you have to do here is open up admin/adminoptions.php in an editor like Notepad.

Quote:Find this code:
Code:
"canedithelp" => addslashes($newperms['canedithelp']),
Use the find feature of your editor to search for the text below the word Code:. So you would be searching for:
"canedithelp" => addslashes($newperms['canedithelp']),

Quote:After that add:

Code:
"canbanusers" => addslashes($newperms['canbanusers']),
Now this instruction tells you to add the snippet of code after what you have found above.

So you would end up with code like this

// ... the rest of the page
"canedithelp" => addslashes($newperms['canedithelp']), // this is what you 'found' in the second instruction
"canbanusers" => addslashes($newperms['canbanusers']), // this is what you added in the third instruction.
// ... the rest of the page

It's pretty simple really, all the steps are listed in order. All you have to do is go through and find and add whatever is given.
Dennis:

I already did everything above except for the part where I do stuff to the admin/users.php. That is where I got lost.

Thanks,
Find the part where you want to check the admin's permission, and place that code in.

For example, for the 'can ban users' permission, you would put the checkadminpermissions code after:
if($mybb->input['action'] == "banned")
{
if($mybb->input['action'] == "manageban")
{
if($mybb->input['action'] == "liftban")
{
if($mybb->input['action'] == "do_manageban")
{
When you say after, do you mean next to or below?
Below.
Thanks, I know I may sound like a retard, but this is one of my first installations of a modification. I'm used to plugins. So would you be able to show me exactly where the "("canbanusers");" permission code gets placed?

(Show me screenies like Dennis did except please place the "("canbanusers");" permission code where its supposed to be so I can get a better understanding of this.)

Thanks,
I think this is what you mean:

[attachment=3381]
A screenie like that would be great, but I need to know where to put this:

checkadminpermissions("canbanusers");

If you can provide a screenie for that too, I'd be most appreciative.
OK, this shows you how to add the code after the
if($mybb->input['action'] == "banned")
{

You add the same code after all the other's in Dennis' post in the same way:

[attachment=3382]
Pages: 1 2