Hello,
I have created some additional node permissions in the "Permission Definitions" section of the Admin Control Panel. Therefore I created a new Interface Group called "Forum BBCode Permissions" and added some permissions with the Permission Group "Forum Permissions" and the Interface Group "Forum BBCode Permission".
I want do this because I want to enable/disable additional BBCodes for different forums.
Afterwards I created a "Template Hook" event listener, here the code:
	
	
	
		
I want to check the BBCode permissions and change the content according to this. How I can get my forum permissions there? The $hookParams and $template->getParams(); variables don't help me. Does anyone have a good idea how I can get my forum permissions in this template hook? Or is this the wrong location for a permission check? After the permission check I want to pass an array with the enabled BBCodes to the template and enable the allowed BBCodes with JS.
				
			I have created some additional node permissions in the "Permission Definitions" section of the Admin Control Panel. Therefore I created a new Interface Group called "Forum BBCode Permissions" and added some permissions with the Permission Group "Forum Permissions" and the Interface Group "Forum BBCode Permission".
I want do this because I want to enable/disable additional BBCodes for different forums.
Afterwards I created a "Template Hook" event listener, here the code:
		PHP:
	
	class AddOns_AdditionalBbCodes_Listener_TemplateHook
{
    public static function listener($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
    {
        switch ($hookName)
        {
            case 'editor':
            // --> modify the editor settings
            break;
        }
  }
}I want to check the BBCode permissions and change the content according to this. How I can get my forum permissions there? The $hookParams and $template->getParams(); variables don't help me. Does anyone have a good idea how I can get my forum permissions in this template hook? Or is this the wrong location for a permission check? After the permission check I want to pass an array with the enabled BBCodes to the template and enable the allowed BBCodes with JS.
 
 
		