/** * Constructor. Sets up the tag permissions list. * * @param vB_Registry Reference to registry object * @param array The tag_list array for the parent class parser * @param integer The permssions number for the user from their usergroup i.e. $vbulletin->userinfo['permissions'] * @param integer The user this signature belongs to. Required * @param boolean Whether to append custom tags (they will not be parsed anyway) */ function vB_SignatureParser_CharCount(&$registry, $tag_list, $usergroup_signature_permission, $userid, $append_custom_tags = true) { parent::vB_SignatureParser($registry, $tag_list, $usergroup_signature_permission, $userid, $append_custom_tags); foreach ($this->tag_list['option'] AS $bbcode_name => $data) { $tag_callback = (in_array($bbcode_name, $this->block_tags) ? 'handle_block_tag' : 'handle_standard_tag'); $this->tag_list['option']["$bbcode_name"]['callback'] = $tag_callback; unset($this->tag_list['option']["$bbcode_name"]['html']); } foreach ($this->tag_list['no_option'] AS $bbcode_name => $data) { $tag_callback = (in_array($bbcode_name, $this->block_tags) ? 'handle_block_tag' : 'handle_standard_tag'); $this->tag_list['no_option']["$bbcode_name"]['callback'] = $tag_callback; unset($this->tag_list['no_option']["$bbcode_name"]['html']); } if (isset($this->tag_list['option']['size'])) { $this->tag_list['option']['size']['callback'] = 'handle_bbcode_size'; } if (isset($this->tag_list['option']['list'])) { $this->tag_list['option']['list']['callback'] = 'handle_bbcode_list'; } if (isset($this->tag_list['no_option']['list'])) { $this->tag_list['no_option']['list']['callback'] = 'handle_bbcode_list'; } $this->tag_list['no_option']['_wrapper'] = array( 'strip_empty' => false, 'callback' => 'handle_standard_tag' ); }