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