![]() |
Ban Users from a Thread
1 Attachment(s)
This is a modification of AcidX's original "Ban Threads User" plugin for vBulletin 3.7. It has been for the most part rewritten with a focus on performance. Major changes include:
### VERSION HISTORY ### 1.0 (Initial Release) 1.1 (Added mod log actions, now fully phrased) ### FEATURES ### This plugin allows moderators to ban users from individual threads. To ban a user, the appropriate option should be selected from the dropdown menu within the post. To unban, either clear all thread bans from the moderation tools menu, unban the user through the dropdown, or click on the username at the top of the thread. Whenever you're viewing a thread from which users have been banned, a list of usernames will be shown at the top of the thread. This plugin supports permanent bans as well as n-day bans. Valid durations for temporary bans are between 0 and 364 days. The default duration may be set in the "User Banning Options" page, but you can assign custom values by editing the actual ban url and pasting it in your browser. Moderators will ONLY be able to use this feature in forums for which they can_moderate(). Super mods and admins will be able to use it in all forums. ### HOW THIS DIFFERS FROM THE ORIGINAL ### *Big-board friendly: does not add any additional queries to showthread, doesn't do unnecessary computation, and stores ban data individually for each thread instead of globally in the datastore. Queries are only made when a user is being banned or unbanned; unserialization is only done if there are any bans within the thread. *Support for expiring bans: you can choose to ban users permanently or for n days (default # of days is configurable via User Banning Options) *Easy to oversee: banned usernames are shown at the top of the thread to moderators *Flexible permissions: any moderator with permissions in a particular forum can use this facility. Not limited to admins or super mods. *Removed the ability to clear all bans from all threads. If you really need to do this, simply uninstall and reinstall the plugin. *Removed: global view of all thread bans. Not needed. ### INSTALLATION ### -Import one product file -Make 3 template edits Tested on vBulletin 3.8.7, likely compatible with 3.6.x+, or 4.x with slight code changes. Installation instructions are attached. Enjoy! |
will you consider releasing one for vB 4.x.x ?
can I assume that all previous posts made by the banned member will not be removed ? |
Do you plan a modification of this code to ban users from a single forum?
That would be a brilliant mod. |
Quote:
|
Quote:
All this mod does is prevent the banned user from viewing the thread or replying to it. Therefore, you're right- their posts are never modified. |
install and make template modifications, but i dont see link for ban user :(
|
In the instructions, the code you say to place in postbit legacy is missing a final </if>. Saving template throws an if/then parsing error. Adding an additional </if> to the end of your new code block fixes it.
|
Seems to be working otherwise. Thanks for hooking this up for 3.8x, and the addressing performance issues.
|
Is it Possible to Include an Option to Ban Usergroups From a Thread? :confused:
Sometimes in a Forum that All UserGroups (or Some Usergroups) can Access would be Great to be able to Ban an Entire Usergroup from Viewing the Content of Certain Thread or Threads in Particular. ;) I Hope that Additional Option can be Possible to be Included in an Update. :up: Thank You Very Much For Sharing this Updated Version of this Great Mod for vB3.8x. :up: My Best Regards. :) |
Same here; any idea?
Where have we to put the code in the navbar template? Thanks for helping! Quote:
|
Forget my my post; i forgot to edit one template. It´s just working fine!
Thanks for that stuff! |
Quote:
|
Quote:
With that said, it would only take a few extra lines of code to implement it, but you'd have to add some conditionals to check whether or not a key in $btu represents a userid or a usergroup. |
Quote:
|
very nice mod ty :)
|
Tagged, does this mod make it easy to see who created the thread ban? I am using AcidX's version currently but as far as I can tell there is no way to see who thread banned a user. Is that possible with this mod?
|
I have written a version 1.1 of this mod which logs who performs the ban using the standard modlog. It has not yet been released, however.
|
Quote:
|
It's pretty much ready to go- I just have to package it. I'll release it when I have some extra time in the very near future.
I'm not planning on adding ban reasons, but you're welcome to re-use the code to implement the feature. The easiest way to do it would be to trigger an AJAX popup before submitting the request to ban the user, and then POST the data to the inlinemod script. |
New version posted!
|
hi there, is there a upgrade instruction from v1.0 to v1.1?
Also, it is possible to add forum ban option as well? I am a PHP Developer, and if I can get hints, I can code vB plugin. Thanks. |
The upgrade instructions are the same as the install instructions :)
Forum bans are already built into vbulletin. Just go your your user editor and modify a user's access masks so that they cannot view the forums you want to ban them from. |
I've installed and it doesn't work. All installation instructions have been followed.
|
The only thing questionable is the last instructions: Open Navbar and append: ect.
Is there a specific place to "append"?? I get NO errors; but I also get nothing from this installation; no erros; failures, ect. Just nothing happens. the options to ban are not there. |
I am on the same boat...
Append is to add to the end of something so i thought just add it at the end of the code already in the Navbar section but i get nothing.... Quote:
|
Quote:
|
I have redone mine like 18 times already and nothing.
|
Me too. Literally. I've tried everything I personally know and am skilled at;;;which isn't much... but yeah..
c'mon OP |
If you can't see the options, you must have put the postbit edit in the wrong place. Make sure you double-check that one.
Also, this might sound trivial, but you have to have moderating permissions in the forum you're trying to use this in. |
I marked this as installed, but there's a big issue in my forums at AndroidCentral. Tapatalk users can still post.
|
I guess you will have to open the php file in tapatalk responsible for adding new posts, and add a call to the newreply_start hook.
I knew that tapatalk was insecure, despite their claims that they go through the vb framework! |
I just checked reply_post.php in tapatalk and they conveniently have the hook commented out on line 190...
Add this code if you want thread bans to work: PHP Code:
|
I want something similar to this... but
I need a mod that: 1. Doesn't allow any members from usergroup x to see any threads on the forum accept ones from x forum 2. I want a mod that allows an admin to add users to specific threads through thread tools, only then can those users view those threads. I know in edit permissions or permission masks, you can edit permissions on specific forums but i want this done through the forum and on threads, not forums. Can someone help with this? |
nice but a global list of all users who have been banned from all threads is usefull, not the way the original mod used to display them.
but maybe in the Admin CP -> View Banned Thread Users or something similar |
Quote:
SELECT threadid, title, threadbans FROM " . TABLE_PREFIX . "thread WHERE threadbans != ''" And then unserialize threadbans. |
MoMan -- thanks so much!! My mods were so excited when I installed this and were so upset when I uninstalled it. Now all will be good again :)
|
How do I make it so only admins can ban users from a thread?
|
In the threadmanage_start hook, change
PHP Code:
PHP Code:
|
Quote:
|
And how can you make a lock to be able to read this topic, but could not write with the withdrawal of the notification banning.???
Help |
All times are GMT. The time now is 06:09 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|