[BETA] Moderator Ban User

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
flashweb
Registered User
Posts: 309
Joined: Sun Apr 20, 2003 4:15 pm
Location: India
Contact:

[BETA] Moderator Ban User

Post by flashweb »

MOD Title: Moderator Ban User

MOD Version: 1.0.0

MOD Description: This MOD will allow moderators to ban/un ban abusers with out admin privilege.

You can download it from

http://www.netfreehost.com/mod/moderator_ban_user.zip

MOD Header:

Code: Select all

###############################################
## MOD Title: Moderator Ban User
## MOD Author: Yujin Boby < info [at] netfreehost.com > (N/A) http://www.netfreehost.com
## MOD Description: 	Allows moderators to Ban/Unban abusers
## MOD Version: 	1.0.0 [phpBB 2.0.x]
## 
## Installation Level: 	Easy 
## Installation Time: 	5 Minutes
## Files To Edit (2): 	viewtopic.php
##                      viewforum.php
## Included Files:      ban.php
###############################################
## Author Notes: 
##
##	This mod allow moderators to ban, unban abusers
## 
###############################################
## MOD History: 
##
##   2005-08-12 - Version 1.0.0 
##      - Initial Release 
## 
###############################################
## Before Adding This MOD To Your Forum, You Should Back Up All
## Files Related To This MOD 
###############################################

# 
#-----[ OPEN ]------------------------------------------ 
# 

viewtopic.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
  
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$s_auth_can .= "<BR>You <b>can</b> <a href=\"ban.php?sid=" . $userdata['session_id'] . "\">ban abuser in this forum</a>";


# 
#-----[ OPEN ]------------------------------------------ 
# 

viewforum.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
  
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$s_auth_can .= "<BR>You <b>can</b> <a href=\"ban.php?sid=" . $userdata['session_id'] . "\">ban abuser in this forum</a>";

# 
#-----[ COPY ]------------------------------------------------- 
#

copy ban.php to /

#
#-----[ OPEN ]------------------------------------------
#

ban.php

# 
#-----[ FIND ]------------------------------------------ 
# 

[email protected]

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

Email address of admin

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM

Regards,

Yujin
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28654
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Post by Paul »

Why you don't use $lang entrys for your $auth? If you want it in the moddb, it is required!

Code: Select all

$phpbb_users = $table_prefix."users";
$phpbb_banlist = $table_prefix."banlist";
$phpbb_sessions = $table_prefix."sessions";
Thats the same.
You must use USERS_TABLE BANLIST_TABLE and SESSIONS_TABLE.

Code: Select all

if($user_level == 1 OR $user_level == 2) {
What if my admin user_level is three?
I can't see this page! Use MOD and ADMIN instead.
ANd why you don't use the template featere of phpbb?
Every page must use it.
You must also use long_arrays(NO $_POST but $HTTP_POST_VARS).
And you must also use dbal($db class), for your sql querys. ANd message_die(), for your error handling. And if I cannot read english? Where must I translated this? Not in the lang_files :) Also you must use the emailer class, that handle the mail :)
DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing »

Wow, there, paul! Calm down. All the things you said were correct, and he needs to do each and every one of the things stated above, but you jsut got a little exited! Calm down! ;)

And nice idea for a MOD.
-DKing
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

I'm not sure if it's because you didn't create some default vanilla Ban settings, but when I try to use this with paul999's Extended Ban Manager the banned user logs in and is told they are banned but then their ban is removed because you didn't put in something. If I ban them and then look in the Ban Manager it says "This ban is will be never been passed." under the time column. If it has more to do with the EBM could you possibly offer an addon that would allow it to work. Also you should add the search for username popup that's in the user management.
Last edited by bonelifer on Fri Aug 12, 2005 3:22 pm, edited 1 time in total.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28654
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Post by Paul »

bonelifer wrote: I'm not sure if it's because you didn't create some default vanilla Ban settings, but when I try to use this with paul999's Extended Ban Manager the banned user logs in and is told they are banned but then their ban is removed because you didn't put in something. If I ban them and then look in the Ban Manager it says "This ban is will be never been passed." under the time column.
Thats true, becuase my ban manager, use e new field, for the time. If that is 0 or a empty field, the ban will never been passed.
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

One more thing, the default ADMIN(user_id=2) should be able to ban both admins and mods in extreme situations.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
User avatar
flashweb
Registered User
Posts: 309
Joined: Sun Apr 20, 2003 4:15 pm
Location: India
Contact:

Post by flashweb »

Thanks all for suggestions. The purpose of the MOD is to enable forum Moderators to ban user with out Admin privilege. One of my forum moderators asked this facility, so he can control spam on the forum. I want a solution other than giving him Admin privilege. I go through all MOD's in MOD DB, but can't find any one that can do this.

The MOD is working fine on my forum. I will not modify as per phpBB MOD's standard, so i will have my first real phpBB MOD.

paul999, i have modifed the script with phpBB constants. I have to find out how to use mail function and replace the mysql functions.

Do i need to use phpBB template for very simple page like this to be valid mod ? Since this is small page, it will load much faster, may be in a small popup window.

Shortly i will post modified version of this MOD, all your suggestions highly appreciated.
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

A popup would probably be best. You should take a look at the popup for the name search for PM's. That would show you the minimum styling needed by this mod as a popup. If you don't go with a popup the reason for using styling is congruent look throughout the forum and a way to get back to the forum, as it stands if you don't specifically open it in a new window you can't easily get back to where you were.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

Any progress?
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Post by beggers »

Is this mod still in development?
TeddyKGB
Registered User
Posts: 7
Joined: Mon Feb 27, 2006 5:30 am

Post by TeddyKGB »

Has anyone tired this mod? Does it work or do we know of a working mod for this?
pengunio
Registered User
Posts: 78
Joined: Wed Jun 21, 2006 8:24 pm

Post by pengunio »

i installed it fine but how does it work. Is there a button to ban or is it in mod cp or what?
User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Post by MHobbit »

Hello,

We see that you've posted your MOD's contents in your topic starter. Please instead offer your MOD as a textfile download (uploading your MOD's install textfile to a server and giving a direct link, with no registration restrictions), rather than posting the MOD's contents in your post, as you have done.

Thank you for your cooperation,
The phpBB MOD Team
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."
User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Post by beggers »

Any progress on this?
carley
Registered User
Posts: 69
Joined: Mon May 22, 2006 11:12 am

Post by carley »

I too would like to know if anyone has used this & how it works.

I already have ban control on my site, but would like to give mods the permission to ban users...hopefully they will work togerther without problems.
Post Reply

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