vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Moderators Functions - Ban Users from a Thread (https://vborg.vbsupport.ru/showthread.php?t=260080)

MoMan 03-08-2011 10:00 PM

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!

sulasno 03-09-2011 05:30 AM

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 ?

Zylantex 03-09-2011 12:32 PM

Do you plan a modification of this code to ban users from a single forum?
That would be a brilliant mod.

MoMan 03-09-2011 05:50 PM

Quote:

Originally Posted by Zylantex (Post 2171355)
Do you plan a modification of this code to ban users from a single forum?
That would be a brilliant mod.

This is already supported by vBulletin - just edit the user and disallow access to a forum via access masks :)

MoMan 03-09-2011 05:52 PM

Quote:

Originally Posted by sulasno (Post 2171249)
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 ?

You can try installing this on 4.x- it might work, but I haven't tested it.

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.

xorex 03-09-2011 09:10 PM

install and make template modifications, but i dont see link for ban user :(

tfw2005 03-10-2011 03:13 PM

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.

tfw2005 03-10-2011 03:19 PM

Seems to be working otherwise. Thanks for hooking this up for 3.8x, and the addressing performance issues.

inciarco 03-10-2011 05:36 PM

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.

:)

klaush 03-10-2011 07:12 PM

Same here; any idea?

Where have we to put the code in the navbar template?

Thanks for helping!

Quote:

Originally Posted by xorex (Post 2171614)
install and make template modifications, but i dont see link for ban user :(



All times are GMT. The time now is 09:47 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
  • Page Generation 0.01751 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete