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