Version 1.2.9 is now available for download.
Please upgrade to ensure your version of this mod is bug free.

Moderator CP

Title: Moderator CP
Authors: Phill Sparks (http://milk-hub.net/)
kooky (http://www.myphpbb.zaup.org/)
Description:

This mod will add a Moderator Control Panel for all moderators.
They can disallow usernames, edit smilies, manage users accounts, ...
They have a similar link at the bottom, like the Admin.
Moderators are not allowed to edit Admin's accounts.
Admin is protected against mess made by moderators.
Admin can enable/disable each module.

Versions: 1.2.9, 1.2.8, 1.2.7, 1.2.6, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.1.3, 1.1.0.
Installation Level: Easy
Installation Time: 5 minutes
History: (+)
  • 2007-06-04 - Version 1.2.2 (Phill Sparks)
    • Combed over modcp/functions_modcp.php
  • 2007-05-27 - Version 1.2.1 (Phill Sparks)
    • Fixed a bug in admin/admin_modcp.php
    • Remade all modcp/admin_*.php files
Download: modcp_1.2.2em.zip (23 downloads)

For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered in the phpBB MOD-Database, located at: http://www.phpbb.com/mods/

Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD

Author Notes

1. Copyright and special thanks!-----------This program is free software, you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation.

This mod was originally made by Niels for his phpBB2 pre-loaded version.This individual part and the package were made by me with courtesy of Niels.This individual Mod is quite different from the original... and was improved...For any support about this mod, please don't contact/ask Niels.

If you want to add this Mod to any database, please don't addmy e-mail address to a topic, just point to my website (see above).(for spamming prevention)

2. Feature list-----------This MOD tries to enhance the Moderator Control Panel.* Added user_ban control for Mods (they couldn't ban ADMIN)* Mods cannot edit ADMIN or other MODs profile* Mods cannot delete users account (only disable account)* Fixed online status for a more real online status (modcp/index.php)* Added Username Color by default (modcp/index.php)* Disable Database size stat for Mods (modcp/index.php)* MODs (by default) can:* Disallow username* Mass email* Edit ranks* Edit smilies* Ban users (unabled to ban ADMIN)* Edit user profile (unabled to edit ADMIN or other MODs)* Words censor* Admin enables/disables modules via AdminCP* Third part of the TRI FORCE (Username Color, User Level & ModCP)http://www.phpbb.com/phpBB/viewtopic.php?t=205252

if for any reason you want to remove or add other options, just delete/addthe file in the modcp directory.

3. Compatibility / EasyMOD-----------This MOD is compatible with phpBB 2.0.19It will only work with PHP version 4.0.x and higher.

It is also compatible with EasyMOD of Nuttzy and can beinstalled by it but is not yet certified EMC (EasyMOD Compliant)!http://sourceforge.net/project/showfiles.php?group_id=136984

4. Official last version link-----------Contact with email address quoted above without [nospam]Check this official link for latest updates...http://www.myphpbb.zaup.org/

Comments

  1. The_White_Eagle The_White_Eagle wrote:

    how can I make this mod working

    click here

    Mon 1st October, 2007

  2. Phill Sparks Phill Sparks wrote:

    Hi there,

    The instructions in "How to add new Modules" should help you here. Basically change all of the admin/ in the install script and within the php files to modcp/.

    Phill

    Mon 1st October, 2007

  3. The_White_Eagle The_White_Eagle wrote:

    I have done that but they still say that it isn't right installed

    Tue 2nd October, 2007

  4. Phill Sparks Phill Sparks wrote:

    Hi there,

    I've successfully updated the mod following the previously linked instructions and tested installing it with EasyMod. For your convenience I've uploaded the working changes to 1255_modcp.zip.

    Phill

    Tue 2nd October, 2007

  5. The_White_Eagle The_White_Eagle wrote:

    thnx

    It works

    you are very good

    the only thing that I ahd done wrong was that I have changed the name of inactive users
    I had changed it to mod_inactive_users.php

    Tue 2nd October, 2007

  6. wrote:

    I installed your mod, and when a moderator goes to the moderator panel, it is just a blank white page, any ideas?

    I am running:

    phpBB 2.0.23

    Thanks,
    Dillon

    Fri 13th March, 2009

  7. Phill Sparks Phill Sparks wrote:

    Wow it's been a long time since I had a ModCP help... I'm guessing that you're using a template other than subSilver? You need to make sure that the modcp files got installed for your template. Have a look in your template and see if there is a modcp directory, if not copy it from subSilver (or from the modcp download) and finger's crossed everything will work fine.

    Sat 14th March, 2009

  8. wrote:

    Hi, thanks for replying, I set the template as subsilver, and checked the directory, and the modcp folder is in there with all the files, that didnt fix it _

    -Dillon

    Wed 18th March, 2009

  9. wrote:

    Hy, Milkman! Thanks for your great MOD

    Can you please tell me if this instruction (from your FAQ) is still accurate?

    Q: How to make my template compliant with the Mod CP?
    A: You can replace all files in templates/your_theme/modcp with your files from templates/your_theme/admin
    except for user_select_body.tpl and user_edit_body.tpl, all other files are exactly the same.

    Thanks you!
    Daniel (Romania)

    Fri 3rd April, 2009

  10. Phill Sparks Phill Sparks wrote:

    Hi Daniel, that is still correct. If you have a look through the user_edit_body compared to the one in admin you'll find that there's a lot of extra code to just display fields instead of input fields when a Moderator looks at an Admin's profile. You can use your own user_select_body if you like, the one provided with modcp has been moded to include a dropdown list to make it easier to find users.

    Sat 4th April, 2009

  11. wrote:

    Hy, Milkman! Thanks for reply.

    It's working now, but moderators see hidden users, wich I don't like. I would like it if only admin could see hidden users, like in the forum index. I've tryed to take some code from viewonline.php but couldn't manage get it to work, untill now. Can you please give me a hand?

    Daniel

    Sun 5th April, 2009

  12. wrote:

    Hy, Milkman! I got another support question for you. Moderators can't edit admins and other mods profiles. I want them to be able to change other mods, but not admins. So I need to change this part (in admin_users.php):

    1. // Disable edition for special levels
    2. if( defined('MAIN_MOD') )
    3. {
    4.     //  Need to swap MAIN_MOD and MOD over so that <= works
    5.     $this_user_level_rank = ($this_userdata['user_level'] != MAIN_MOD) ? (($this_userdata['user_level'] != MOD) ? $this_userdata['user_level'] : MAIN_MOD ) : MOD;
    6.     $user_level_rank = ($userdata['user_level'] != MAIN_MOD) ? (($userdata['user_level'] != MOD) ? $userdata['user_level'] : MAIN_MOD ) : MOD;
    7. }
    8. else
    9. {
    10.     $this_user_level_rank = $this_userdata['user_level'];
    11.     $user_level_rank = $userdata['user_level'];
    12. }
    13. $can_edit = ($user_level_rank == ADMIN) || ($userdata['user_id'] == $this_userdata['user_id']) || ($this_user_level_rank <= $user_level_rank && $this_user_level_rank != ADMIN && $user_level_rank != USER);
    14. if( !$can_edit )
    15. {
    16.     redirect('modcp/admin_users.php');
    17. }

    I want them to be able to edit other mods profiles. Thanks!

    Mon 6th April, 2009

  13. Phill Sparks Phill Sparks wrote:

    Hi Daniel,

    Your second request is (I think) easier than your first, so I'll start there. In line 13 of the code you have pasted above change the <= to a < and I think that should allow moderators to edit each other. Remember that there are two blocks of code that use $can_edit and you should edit both of them.

    Your first request is not so easy... I'm assuming you're referring to a user's online visibility, in which case they will still be in the memberlist (unless you have modded that too). The first thing to do is remove people from the select list. Near the bottom of admin_users.php you'll find a SQL query. You need to make it look like this (note the new line at 4):

    1. $sql = 'SELECT user_id, username
    2. FROM ' . USERS_TABLE . '
    3. WHERE user_id != ' . ANONYMOUS . '
    4. AND user_allow_viewonline = 1
    5. ORDER BY username';

    Next you need to edit the bit of code you pasted above, for your second point. Make that line look like this (a new && clause at the end of the line) :

    1. $can_edit = ($user_level_rank == ADMIN) || ($userdata['user_id'] == $this_userdata['user_id']) || ($this_user_level_rank < $user_level_rank && $this_user_level_rank != ADMIN && $user_level_rank != USER && $this_userdata['user_allow_viewonline'] == 1);

    Finally, after the second $can_edit = you should add (to stop moderators even seeing hidden profiles):

    1. if ($this_userdata['user_allow_viewonline'] == 0) {
    2.     redirect('modcp/admin_users.php');
    3. }

    Do test this thoroughly but I think it should cover what you need. It won't effect the "Find Username" popup box, that's a core part of phpbb that I don't want to tweak as it'll break things like Private Messages too.

    Mon 6th April, 2009

  14. wrote:

    Hy, Milkman! Thanks for reply.

    About my first request, I've just tryed your sugestion and it does not work, moderastors still can not edit other moderators profiles.

    About my second request, now. Sorry, but I think you did not understand very well what I want. Probably because of my bad english. Please take a look at this pics:

    Untitled
    Untitled

    When looking at the index page, on the viewonline section, at the bottom, moderators do not see hidden users. They see what simple users see. Only admin see hidden users, and they see them in italic mode (like <i>this</i>;). But when looking in the view online section from the moderator panel, moderators see hidden users. What I want is to make the viewonline section from the mod panel, same as on index page. So that moderators will not see hidden users.

    Thanks for your effort, but I do want moderators to edit hidden users profiles and to see them in the selection box, so I can't really use your code. But someone reading this, maybe will need it.

    Mon 6th April, 2009

  15. Phill Sparks Phill Sparks wrote:

    Ah, I see what you mean now! Let's have another try at fixing the $can_edit problem first... Remove both of these

    1. if( defined('MAIN_MOD') )
    2. {
    3.     //  Need to swap MAIN_MOD and MOD over so that <= works
    4.     $this_user_level_rank = ($this_userdata['user_level'] != MAIN_MOD) ? (($this_userdata['user_level'] != MOD) ? $this_userdata['user_level'] : MAIN_MOD ) : MOD;
    5.     $user_level_rank = ($userdata['user_level'] != MAIN_MOD) ? (($userdata['user_level'] != MOD) ? $userdata['user_level'] : MAIN_MOD ) : MOD;
    6. }
    7. else
    8. {
    9.     $this_user_level_rank = $this_userdata['user_level'];
    10.     $user_level_rank = $userdata['user_level'];
    11. }

    And replace both of the $can_edit lines with this:

    1. $can_edit = $userdata['user_level'] == ADMIN || $this_userdata['user_level'] != ADMIN;

    For your other problem have a look in modcp/index.php and find (line 385 for me)

    1. if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
    2. {
    3.     $registered_users++;
    4.     $hidden = FALSE;
    5. }
    6. else
    7. {
    8.     $hidden_users++;
    9.     $hidden = TRUE;
    10. }

    And replace it with:

    1. if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
    2. {
    3.     $registered_users++;
    4.     $hidden = FALSE;
    5. }
    6. else
    7. {
    8.     $hidden_users++;
    9.     $hidden = TRUE;
    10.     continue;
    11. }

    Mon 6th April, 2009

You need to login before you can leave a comment. If you do not have an account you can register for free.