[DEV]Forum/Topic Ban

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.
war-hawk
Registered User
Posts: 309
Joined: Sat Dec 11, 2004 4:48 pm
Contact:

[DEV]Forum/Topic Ban

Post by war-hawk » Tue Jul 12, 2005 2:10 am

I created this mod so admins wouldn't have to lock a topic when a user starts to post incorrect stuff. Instead the admin can ban the user from that specific topic or a specific forum.

New Features
  • dropdown boxes for forum and group
    input username now instead of id
    ability to ban a group
    fixed the files from last time (uploaded the wrong ones)
If you have any more ideas for this or find any problems please let me know.

The download can be found on my site
http://cool-downloads.uni.cc
Backup site
http://cool-downloads.no-ip.org


current version: 0.1.0
Need to update to 0.1.1
Current Known Errors
Fix for is_group error (version 0.1.0Here
Last edited by war-hawk on Fri Dec 02, 2005 9:57 pm, edited 4 times in total.
My Computer Help Site | Also known as Burian
No Support PMs Please UNLESS its about one of my mods!!!
THAT MEANS CONTACT THROUGH AIM AND MSN

My Mods| Member Area | Form to Post | User Message| Forum/Topic Ban |

afterlife_69
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

Post by afterlife_69 » Tue Jul 12, 2005 5:01 am

wow, very nice idea.

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo » Tue Jul 12, 2005 7:00 am

Awesome. Keep up the development.
I write articles on community building
@ The Infinity Program.

ClaR
Registered User
Posts: 6
Joined: Tue Jul 12, 2005 6:26 am

Post by ClaR » Tue Jul 12, 2005 7:44 am

seems like there's a missing template when i go to Forum/Topic Ban

Template->make_filename(): Error - template file not found: admin/forum_topic_list.tpl

there's only 2 .tpls in the zip file

forum_topic_ban_edit.tpl
forum_topic_ban_list.tpl

Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec » Tue Jul 12, 2005 8:51 am

there's the topic permissions mod that has topic bans
except that one allows moderators and topic starters also to topic ban and is configurable through group/forum/user specific permissions plus some general ones...

User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer » Tue Jul 12, 2005 11:31 am

^^^ You mean this:

Code: Select all

###############################################
##   Hack Title:   Thread Kicker
##   Hack Version:   1.0.3
##   Author:      Majorflam <majorflam@blueyonder.co.uk>
##   Description:  This hack allows Administrators or Forum Moderators to kick users from individual
##                 threads (topics). People who start threads may also kick anyone except Administrators
##                 and Moderators from the thread, but only if Admin allows them these powers. Users are
##                 kicked/unkicked by clicking the appropiate image next to their posts.
##
##
##
##   Compatibility:   2.0.10
##
##   Support: http://www.majormod.com/viewforum.php?f=9
Always Under Construction !

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo » Tue Jul 12, 2005 11:37 am

I think he's talking about his own MOD, actually: Topics Permissions. I've downloaded and plan to use it, but I need to get a topic ban button for Boyz and subBleak.
I write articles on community building
@ The Infinity Program.

DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing » Tue Jul 12, 2005 12:26 pm

Good job to all three of the people mentioned here. No offense given, but I think I like Swizec's topic ban better, because it has more features. But I'm sure that if war-hawk puts more features in, it'll be better.

-DKing
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search

Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec » Tue Jul 12, 2005 12:42 pm

DKing wrote: Good job to all three of the people mentioned here. No offense given, but I think I like Swizec's topic ban better, because it has more features. But I'm sure that if war-hawk puts more features in, it'll be better.

-DKing


agreed, you could mainly try to make the code cleaner than I did :)
I'm basicly ashamed of topic permissions mod, even though it works good :oops:

war-hawk
Registered User
Posts: 309
Joined: Sat Dec 11, 2004 4:48 pm
Contact:

Post by war-hawk » Tue Jul 12, 2005 5:11 pm

ClaR wrote: seems like there's a missing template when i go to Forum/Topic Ban

Template->make_filename(): Error - template file not found: admin/forum_topic_list.tpl

there's only 2 .tpls in the zip file

forum_topic_ban_edit.tpl
forum_topic_ban_list.tpl


Thanks for the catch. Please change it in the admin_forum_topic_ban.php from admin/forum_topic_list.tpl to admin/forum_topic_ban_list.tpl

I quickly wrote this mod up (about 5 min) and I plan to add more features to it.

Swizec your mod looks good, but it takes 45min to install while mine takes 2 min.

Please tell me of any other features you would like me to add to this mod and I will try to implement them.
My Computer Help Site | Also known as Burian
No Support PMs Please UNLESS its about one of my mods!!!
THAT MEANS CONTACT THROUGH AIM AND MSN

My Mods| Member Area | Form to Post | User Message| Forum/Topic Ban |

ClaR
Registered User
Posts: 6
Joined: Tue Jul 12, 2005 6:26 am

Post by ClaR » Tue Jul 12, 2005 5:30 pm

np glad i could help... and ty :)

this might sound stupid can you give me a example to fill up the fields?

User ID
Forum ID
Topic ID


:)

[edit] is there any feature that you can unban a member?

war-hawk
Registered User
Posts: 309
Joined: Sat Dec 11, 2004 4:48 pm
Contact:

Post by war-hawk » Tue Jul 12, 2005 5:40 pm

I am working at the moment to simplify that process. Right now you have to either look in the database for the user_id in phpbb_users, find the forum_id in phpbb_forums, and find the topic_id in phpbb_topics

Or you can find out the id's by looking at the end of the urls that you click to view the stuff and find out the id. For example, if I want to find the user_id of a user, I go to the users profile and look in the URL bar for this

Code: Select all

mode=viewprofile&u=34
The user that I clicked has a user_id of 34.

You can repeat that process by clicking on a topic and looking for

Code: Select all

viewtopic.php?t=421
and for

Code: Select all

viewforum.php?f=5
For unbanning a member, just delete the thing in the Admin control panel that has the ban.
My Computer Help Site | Also known as Burian
No Support PMs Please UNLESS its about one of my mods!!!
THAT MEANS CONTACT THROUGH AIM AND MSN

My Mods| Member Area | Form to Post | User Message| Forum/Topic Ban |

ClaR
Registered User
Posts: 6
Joined: Tue Jul 12, 2005 6:26 am

Post by ClaR » Tue Jul 12, 2005 5:51 pm

just tested my test account to ban a specific forum/topic.. and it works good :)

again.. how can i unban them again?

:)

war-hawk
Registered User
Posts: 309
Joined: Sat Dec 11, 2004 4:48 pm
Contact:

Post by war-hawk » Tue Jul 12, 2005 5:56 pm

In the page that lists the bans in the admin control panel, to the right of the screen there is a button in the row called delete. Just click that.
My Computer Help Site | Also known as Burian
No Support PMs Please UNLESS its about one of my mods!!!
THAT MEANS CONTACT THROUGH AIM AND MSN

My Mods| Member Area | Form to Post | User Message| Forum/Topic Ban |

BenP
Registered User
Posts: 29
Joined: Wed Apr 28, 2004 7:09 pm

Post by BenP » Tue Jul 12, 2005 6:00 pm

Great to see you released this, just a few things to say about it :)

Your language entry is wrong - it should be:

Code: Select all

//Forum/Topic Ban
$lang['banned'] = 'You have been banned from this specific forum or topic.<br />Please contact the webmaster or board administrator for more information about why you were banned.<br /><br />Click %sHere%s to return to index';
//Forum/Topic Ban
And both instances of message_die(GENERAL_ERROR, 'banned'); should be like this:

Code: Select all

message_die(GENERAL_ERROR, sprintf($lang['banned'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
That ensures people that rely on their sid in the URL can use this, and for people whos php extention is not .php.

Also, you do the following:
$userdata = session_pagestart($user_ip, $forum_id ,$user_id);

There is no need for $user_id to be placed in this function, because it does nothing.

In admin/admin_forum_topic_ban.php, in the SQL queries, you use:
$sql = "SELECT *
FROM phpbb_forum_topic_ban
WHERE ban_id = $ban_id";

Where it should read
$sql = "SELECT *
FROM ". FORUM_TOPIC_BAN_TABLE ."
WHERE ban_id = $ban_id";


Just my 2ps worth :)

Post Reply

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