vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Ban User From A Thread (https://vborg.vbsupport.ru/showthread.php?t=109416)

Christine 08-12-2006 10:35 PM

Append postings.php?do=btu_view_all to your forum URL

Stoebi 09-13-2006 09:38 PM

Quote:

Originally Posted by Jayphen
It qould be cool if the thread creator could ban a user from their thread..

Hi

Do i need the permission to make the changed product .xml file public here?


The threadstarter can now ban/unban users from his thread. Threadstarters can't use "view all thread bans" and "clear all threads bans".

Thanks to KirbyDE for his help.



1.
AdminCP -> Plug-ins & Products -> Plugin Manager

Look for btu_manager -> (Hook) threadmange_start

Open and search for (line 98)
PHP Code:

if (!$show['btu_canban']) 

After
PHP Code:

if ($_REQUEST['do'] == 'btu_ban')


And replace with
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid)) 

Save


2.
Add New Plugin:
Product -> Ban Thread User
Hook Location (Hook) -> postbit_display_complete
Title -> btu_canban threadstarter
Execution Order -> 5
Plugin PHP Code ->
PHP Code:

$show['btu_canban'] = ($this->registry->userinfo['userid'] AND $post['userid'] AND $post['userid'] != $this->registry->userinfo['userid'] AND (($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['ismoderator']) OR ($thread['postuserid'] == $this->registry->userinfo['userid']))); 

Plugin is Active? -> Yes

Save



Kind Regards,

St?bi

sola 09-20-2006 02:43 AM

Quote:

Originally Posted by beano33
I have it ported, there was just one query change from 3.5 to 3.6. But I still can't figure out how make it so that moderators can ban users from threads in the forums they moderate (in addition to admins & supermods).

Thanks for porting this to 3.6 Beano. You have no idea how I fretted over not having this in my forums.

beano33 09-21-2006 05:13 AM

Quote:

Originally Posted by sola
Thanks for porting this to 3.6 Beano. You have no idea how I fretted over not having this in my forums.

You're welcome!

beano33 09-21-2006 05:18 AM

Quote:

Originally Posted by RFViet
I want to give moderator this power. How can i do that ??

I'm sure there's a cleaner way to do it, but this worked for me. I edited the plugin 'btu_canban' by adding this line at the end:

PHP Code:

$show['btu_canban'] = iif(can_moderate(), truefalse); 


Stoebi 09-21-2006 06:00 AM

Hi

Do i need the permission to make the changed product .xml file public here?
If i get permission, i can make a new product with more options.

Allow moderator also to ban or unban users from a thread. Moderators can't use "view all thread bans" and "clear all threads bans".

1.
AdminCP -> Plug-ins & Products -> Plugin Manager

Look for btu_manager -> (Hook) threadmange_start:
Open and serach for (line 3)
PHP Code:

if (!$show['btu_canban']) 

After
PHP Code:

if ($_REQUEST['do'] == 'btu_clear')


Replace with
PHP Code:

if (!$show['btu_canban'] AND !can_moderate($thread['forumid'])) 


Search for (line 98)
PHP Code:

if (!$show['btu_canban']) 

After
PHP Code:

if ($_REQUEST['do'] == 'btu_ban')


Replace with
PHP Code:

if (!$show['btu_canban'] AND !can_moderate($thread['forumid'])) 


2.
Add New Plugin:
Product -> Ban Thread User
Hook Location (Hook) -> postbit_display_complete
Title -> btu_canban moderator
Execution Order -> 5
Plugin PHP Code ->
PHP Code:

$show['btu_canban'] = ($this->registry->userinfo['userid'] AND $post['userid'] AND $post['userid'] != $this->registry->userinfo['userid'] AND (($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['ismoderator']) OR can_moderate($thread['forumid']) OR can_moderate($thread['forumid']))); 

Plugin is Active? -> Yes

Save



Kind Regards,

St?bi

wpeloquin 09-23-2006 06:28 PM

thx stobi for the moderator ban ability.

beano33 09-25-2006 03:39 PM

Quote:

Originally Posted by Stoebi
Hi

The threadstarter can now ban/unban users from his thread. Threadstarters can't use "view all thread bans" and "clear all threads bans".

I'd like to use this, but restrict it by usergroup (paid subscribers). Is it simply a matter of changing this
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid)) 

to
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid) AND !is_member_of($bbuserinfox)) 

where x is the usegroup I want to give permission to?

Stoebi 09-26-2006 05:55 AM

Quote:

Originally Posted by beano33
I'd like to use this, but restrict it by usergroup (paid subscribers). Is it simply a matter of changing this
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid)) 

to
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid) AND !is_member_of($bbuserinfox)) 

where x is the usegroup I want to give permission to?

Hi,

the threadstarter and a member of a group can now ban/unban users from his/a thread.


1.
AdminCP -> Plug-ins & Products -> Plugin Manager

Look for btu_manager -> (Hook) threadmange_start

Open and search for (line 98)
PHP Code:

if (!$show['btu_canban']) 

After
PHP Code:

if ($_REQUEST['do'] == 'btu_ban')


Replace with
PHP Code:

if (!$show['btu_canban'] AND !is_first_poster($threadid) AND !is_member_of($vbulletin->userinfox

x = your UsergroupID

Save



2.
Add New Plugin:
Product -> Ban Thread User
Hook Location (Hook) -> postbit_display_complete
Title -> btu_canban threadstarter
Execution Order -> 5
Plugin PHP Code ->
PHP Code:

$show['btu_canban'] = ($this->registry->userinfo['userid'] AND $post['userid'] AND $post['userid'] != $this->registry->userinfo['userid'] AND (($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['ismoderator']) OR $thread['postuserid'] == $this->registry->userinfo['userid'] OR is_member_of($this->registry->userinfox))); 

Plugin is Active? -> Yes

x = your UsergroupID

Save



Kind Regards,

St?bi

nymyth 09-29-2006 05:40 PM

After upgrading to 3.6.1, I cannot get this to work. The option isnt appearing when the username is clicked....any ideas?

Peace

IGNORE THIS...IM AN ASS...lol


All times are GMT. The time now is 01:14 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.01483 seconds
  • Memory Usage 1,795KB
  • 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
  • (20)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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