[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 » Fri Aug 12, 2005 12:41 am

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 ]------------------------------------------ 
# 

ADMIN@YOURDOMAIN.COM

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

Email address of admin

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

Regards,

Yujin

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

Post by Paul » Fri Aug 12, 2005 8:32 am

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 » Fri Aug 12, 2005 9:14 am

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: 3412
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Fri Aug 12, 2005 3:17 pm

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.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

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

Post by Paul » Fri Aug 12, 2005 3:22 pm

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: 3412
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Fri Aug 12, 2005 3:24 pm

One more thing, the default ADMIN(user_id=2) should be able to ban both admins and mods in extreme situations.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
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 » Fri Aug 12, 2005 6:24 pm

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: 3412
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Fri Aug 12, 2005 7:27 pm

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.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3412
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Thu Sep 08, 2005 4:24 pm

Any progress?
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
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 » Sat Sep 10, 2005 6:59 am

Is this mod still in development?

TeddyKGB
Registered User
Posts: 7
Joined: Mon Feb 27, 2006 5:30 am

Post by TeddyKGB » Tue Feb 28, 2006 4:47 am

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 » Sun Jun 25, 2006 11:09 pm

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 » Sun Jun 25, 2006 11:10 pm

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 » Mon Dec 11, 2006 10:46 am

Any progress on this?

carley
Registered User
Posts: 69
Joined: Mon May 22, 2006 11:12 am

Post by carley » Fri Jan 26, 2007 3:53 pm

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”

Who is online

Users browsing this forum: No registered users and 21 guests