[BETA] The TRI FORCE (User Class + Moderator CP)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

[BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Fri May 25, 2007 3:18 pm

The History
The TRI FORCE was originally a collection of three mods, however the Username Color + User Level have been combined into one mod, the User Class.

The Present
MOD Title: User Class
MOD Description:
  • This mod will add new levels:
    • Main Moderator
    • Support Team
    • VIP (Very Important People)
    • Bot
  • Main Mod can moderate all forums like Admin.
  • Manage each level permissions via AdminCP (View, read...).
  • Edit each color for each template you have in AdminCP.
  • Set user level in User Admin/permissions (dropdown menu).
  • Also show username color everywhere and other features...
MOD Version: 1.0.4a
MOD Title: Moderator CP
MOD 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.
    It is not really a MOD/hack, it is rather an add-on for phpBB.
MOD Version: 1.2.8

Last Stable version: 1.0.4

The Future
Sadly, the previous author of these mods, Kooky, is too busy to continue the work on these at the moment (Read The End). So I'm going to try my best to keep them up-to-date. Much of these mods is already phpBB3 so development of these any further may not happen.

FAQ - Moderator CP
Q: I cannot see the link to the moderator control panel, what did I do wrong?
A: Please check that you've enabled at least one module from the admin panel, and that the settings are being kept.

Q: is it possible to remove the need for mods to re-enter there password/username to log into the mod cp?
A: Yes, the contrib called "No Re-login" should do this.

Any other problems please have a read through the [2.0.10] Moderator CP topic first as your question may already be answered. If you do not find an answer to your question please create a new topic and include your phpBB version, ModCP version, whether you installed by hand or using EasyMod and whether you have any other conflicting mods installed.

If the mod team could be so kind as to lock the existing TRI FORCE topic and point people here that would be most appreciated.
Last edited by milkman on Sun Oct 28, 2007 2:17 pm, edited 6 times in total.
Milkman [MilkHub]

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Wed May 30, 2007 10:47 am

Moderator CP is now 1.2.1, sorry for any inconvenience caused to people who installed the faulty 1.2.0...

2007/05/27 - Version 1.2.1 (Milkman)
  • Fixed a bug in admin/admin_modcp.php
  • Remade all modcp/admin_*.php files
2007/05/23 - Version 1.2.0 (Milkman)
  • Updated to be compliant with phpBB 2.0.22
  • Improved security in modcp/admin_users.php
  • Disabled modules are now disabled for Admins too
  • Added new language values
    • Modcp_updated
    • Click_return_modcp_config
  • Fixed issues with Moderators that have another user_level not getting Moderator access.
Download from milk-hub.net.
Last edited by milkman on Mon Jun 04, 2007 12:28 pm, edited 1 time in total.
Milkman [MilkHub]

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by cavallino » Wed May 30, 2007 3:04 pm

Wow!
thanks for this update, I miss this mod!

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Mon Jun 04, 2007 12:30 pm

Moderator CP is now 1.2.2, if you're not using user class and have not noticed and problems there's no need to update.

2007/06/04 - Version 1.2.2 (Milkman)
  • Combed over modcp/functions_modcp.php
Download from milk-hub.net.
Milkman [MilkHub]

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by jalaln » Mon Jun 04, 2007 1:38 pm

Hi milkman,

I have a question: Is it possible to make it so that only one moderator (not all moderators) can access the Moderator CP? I mean, you can choose who from the moderators has access to the ModCP from all the moderators.

Also, which CP Mod do you recommend installing? 1.0.4 stable (modcp_1.0.5aem.zip) or 1.2.2 beta?

Thanks.
No more spambots for phpBB2 and phpBB3.

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Mon Jun 04, 2007 2:07 pm

Yes it is possible, but not quite how you'd like. The best way of doing something like that would be to install the User Class and elevate those mods to a different level. Sadly, I've not had a chance to see if this will install cleanly on phpbb 2.0.22 yet. Since it makes extensive changes to add colours and new permissions it'll take me a while to test.

I would suggest that you install the beta ModCP as it's got some improvements, especially in the admin panel. Also, if you install this version I can suggest a second way of allowing certain users access... You need to find the user_id of each user that you want to give access to (since this will be hard-coded). I've used the example user_id of 2 (which is typically the board founder), just swap this with the user id you want to grant access to.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
modcp/functions_modcp.php
#
#-----[ FIND ]------------------------------------------
#
}
		// Are their perms on the userd list?
#
#-----[ BEFORE, ADD ]------------------------------------------
#
		// Give specific users access to this module;  Add more tests for each user
		else if ( $userdata['user_id'] == 2 )
		{
			return $userdata['user_level'] != USER; // Let's make sure they are not a user
		}
#
#-----[ FIND ]------------------------------------------
#
	// Admin has full access.
	if ( $level == ADMIN )
		return true;
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Give specific users access to this module;  Add more tests for each user
	else if ( $userdata['user_id'] == 2 )
	{
		return $userdata['user_level'] != USER; // Let's make sure they are not a user
	}
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM
For each user after the first, remember to put in the right user_ids...

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
modcp/functions_modcp.php
#
#-----[ FIND ]------------------------------------------
#
else if ( $userdata['user_id'] == 2
#
#-----[ IN-LINE FIND ]------------------------------------------
#
== 2
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 || $userdata['user_id'] == 2

#
#-----[ FIND ]------------------------------------------
#
else if ( $userdata['user_id'] == 2
#
#-----[ IN-LINE FIND ]------------------------------------------
#
== 2
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 || $userdata['user_id'] == 2
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM
Milkman [MilkHub]

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by jalaln » Sat Jun 09, 2007 7:42 am

I've installed the MOD twice on my localhost, first manually and then using EasyMOD, and still it doesn't work. When I log-on as a moderator I can't see any link that lead you to the M-CP , also the footer is slightly broken.
No more spambots for phpBB2 and phpBB3.

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Sat Jun 09, 2007 8:02 am

I take it that you have installed just the Moderator CP? And that your version of phpbb is the latest. If you have no other mods installed then I am slightly baffled since the only problems people have had with EasyMod installations was using a dodgy release of ModCP.

Have you been into the administrator panel and enabled at least one module from the list? Can you confirm that this selection has remained (it should move to the top half of the page and have the relevant boxes checked).

Also, could you upload your page_tail.php to pastebin so that I can have a look at it and see what's been scrambled.
Milkman [MilkHub]

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by jalaln » Sat Jun 09, 2007 8:41 am

Sorry, sorry it worked now, I didn't notice the M-CP configuration in admin's panel.

Btw, when sending a mass e-mail, the following error will be displayed:

Image

and when adding a new rank:

Image
No more spambots for phpBB2 and phpBB3.

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Sat Jun 09, 2007 11:03 am

Moderator CP is now 1.2.3, please update the files listed below as they were broken in previous 1.2.x releases.

2007/06/09 - Version 1.2.3 (Milkman)
  • Fixed errors in some modcp/admin files
    • modcp/admin_mass_email.php
    • modcp/admin_ranks.php
    • modcp/admin_words.php
Download from milk-hub.net.

Thanks to jalaln for pointing this problem out to me.
Milkman [MilkHub]

Gephri
Registered User
Posts: 158
Joined: Wed Feb 23, 2005 4:17 pm

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by Gephri » Tue Jun 26, 2007 7:20 pm

I've installed ModeratorCP but getting the following message when I (as a moderator) click the Moderator CP navigation link

"No input file specified."

I'm sure its because of the coding I have on login.php

Code: Select all

// MOD Moderator CP (start)
 // (original code)
 // if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
 // (moderator cp replacement)
	include_once($phpbb_root_path . 'modcp/functions_modcp.'.$phpEx);
	if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && ($userdata['user_level'] == ADMIN || has_perms())))
// MOD Moderator CP (end)
or on includes/page_tail.php

Code: Select all

// MOD Moderator CP & ChangeLog Link(start)
include_once($phpbb_root_path . 'modcp/functions_modcp.'.$phpEx);
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/playground/templates/SuperStar/images/icon_mini_a.gif" width="13" height="13" border="0" class="imgspace" alt="icon_mini_a.gif" title="Click to Admin Panel" hspace="1" align="absmiddle" /> ' . $lang['Admin_panel'] . '</a><br /> <a href="changelog.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/images/icons/change13.gif" width="13" height="13" border="0" class="imgspace" alt="change13.gif" title="Click to Change Log" hspace="1" align="absmiddle" />&nbsp;' . $lang['change_log'] . '</a>' : (has_perms() ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . ' <img src="/playground/templates/SuperStar/images/icon_mini_faq13.gif" width="13" height="13" border="0" class="imgspace" alt="icon_mini_a.gif" title="Click to Moderator Panel" hspace="3" align="absmiddle" /><img src="/playground/images/misc/spacer.gif" width="3" height="1" border="0" alt="spacer.gif" title="">' . $lang['Mod_CP'] . '</a><script type="text/javascript" src="' . $phpbb_root_path . 'templates/mw3.js"></script>' : '');
// MOD Moderator CP & ChangeLog Link(end)
Can you please provide a little guidance on how to get this to work?

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Tue Jun 26, 2007 11:01 pm

login.php looks fine from what I can see. You can tell if the modcp's working as an admin by going to the admin control panel and replacing /admin/ with /modcp/ in the address bar. If that works then the modcp is fine and your page_tail is broken.

Perhaps if you can show me your original $admin_link link from the page_tail I might be able to see what's what.
Milkman [MilkHub]

Gephri
Registered User
Posts: 158
Joined: Wed Feb 23, 2005 4:17 pm

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by Gephri » Wed Jun 27, 2007 7:43 pm

very clever diagnostics Milkman.

So replaced /admin/ with /modcp/ and as able to get in.

So here's the from my page_tail.php

Code: Select all

// MOD Moderator CP & ChangeLog Link(start)
include_once($phpbb_root_path . 'modcp/functions_modcp.'.$phpEx);
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/playground/templates/SuperStar/images/icon_mini_a.gif" width="13" height="13" border="0" class="imgspace" alt="icon_mini_a.gif" title="Click to Admin Panel" hspace="1" align="absmiddle" /> ' . $lang['Admin_panel'] . '</a><br /> <a href="changelog.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/images/icons/change13.gif" width="13" height="13" border="0" class="imgspace" alt="change13.gif" title="Click to Change Log" hspace="1" align="absmiddle" />&nbsp;' . $lang['change_log'] . '</a>' : (has_perms() ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . ' <img src="/playground/templates/SuperStar/images/icon_mini_faq13.gif" width="13" height="13" border="0" class="imgspace" alt="icon_mini_a.gif" title="Click to Moderator Panel" hspace="3" align="absmiddle" /><img src="/playground/images/misc/spacer.gif" width="3" height="1" border="0" alt="spacer.gif" title="">' . $lang['Mod_CP'] . '</a><script type="text/javascript" src="' . $phpbb_root_path . 'templates/mw3.js"></script>' : '');
// MOD Moderator CP & ChangeLog Link(end)
Thanks for your help with this

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by milkman » Wed Jun 27, 2007 8:08 pm

I can't see anything wrong with the output in page_tail.php... I've tidied it up a bit for clarity...

Code: Select all

if ($userdata['user_level'] == ADMIN) {
    // Admin Panel
    $admin_link = '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/playground/templates/SuperStar/images/icon_mini_a.gif" width="13" height="13" border="0" class="imgspace" alt="" title="Go to Admin Panel" hspace="1" align="absmiddle" /> ' . $lang['Admin_panel'] . '</a>';
    // Change Log
    $admin_link .= '<br /> <a href="changelog.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . '<img src="/images/icons/change13.gif" width="13" height="13" border="0" class="imgspace" alt="" title="Go to Change Log" hspace="1" align="absmiddle" /> ' . $lang['change_log'] . '</a>';
}
else if (has_perms()) {
    // Moderator Panel
    $admin_link = '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . ' <img src="/playground/templates/SuperStar/images/icon_mini_faq13.gif" width="13" height="13" border="0" class="imgspace" alt="" title="Go to Moderator Panel" hspace="3" align="absmiddle" /> ' . $lang['Mod_CP'] . '</a>';
    // Random JS?
    $admin_link = '<script type="text/javascript" src="' . $phpbb_root_path . 'templates/mw3.js"></script>';
}
else {
    $admin_link = '';
} 
Is the error when you try to login to the moderator cp or after you have re-logged in and try to view the moderator cp?
Milkman [MilkHub]

Gephri
Registered User
Posts: 158
Joined: Wed Feb 23, 2005 4:17 pm

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Post by Gephri » Wed Jun 27, 2007 8:57 pm

thanks for cleaning up my code Milkman!

so I'm now using the cleaned-up code and when I log in as a moderator I'm not seeing the moderator cp text link in my navigation panel
source code from lang_main.php

Code: Select all

$lang['Mod_CP'] = 'Control Panel';
Admin text link shows up fine when logged in as an admin.

Think I could have messed up permissions or something-not-to-do-with-your-code?

Post Reply

Return to “[2.0.x] MODs in Development”