![]() |
Quote:
HTML Code:
<valign="center">{param} |
Quote:
|
|
Quote:
Quote:
So I'm afraid you can't restrict these two custom bbcodes :( |
its a pain in the ass to restrict them you have to hard code them. damn.
heres the code go to class_bbcode add theses some where Code:
/** { // Code:
$tag_list['no_option']['code'] = array( [CODE]if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ADMINWARN) { //[CODE] $tag_list['no_option']['admin'] = array( 'callback' => 'handle_bbcode_admin', 'strip_empty' => true, 'disable_smilies' => true, 'disable_wordwrap' => true, 'strip_space_after' => 1 ); } if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_MODWARN) { // Code:
$tag_list['no_option']['mod'] = array( Code:
define('ALLOW_BBCODE_HTML', 512); Code:
define('ALLOW_BBCODE_MODWARN', 1024); open class_bbcode_alt.php find: Code:
function handle_bbcode_code($code) Code:
function handle_bbcode_admin($code) |
i figured it out
|
Wild-Wing - thanks.... I think!
I understand the file edits but after editing the files how do you create a tag that can only be used by an admin or mod? |
Wild-Wing - I realise what you meant - create templates called bbcode_admin and bbcode_mod for the code to display a "moderator box".
However I see that you add this: define('ALLOW_BBCODE_MODWARN', 1024); define('ALLOW_BBCODE_ADMINWARN', 2048); So I presume somehow once I've made the modifications I would need to give permission to the admin and mod groups so they could use the tags? |
oh i forgot to add that part damn.
you have to be in developer mode to to the next step go to the bbcode settings where the Enabled Built-in BB Codes area is you should see a edit and delete links (note: you will only see this if you are in developer mode.) add this to the bottom of the option code box above the span tag Code:
<label for=\"bb1024\"><input type=\"checkbox\" name=\"setting[$setting[varname]][]\" id=\"bb1024\" value=\"1024\" tabindex=\"1\" " . iif(bitwise($setting['value'],1024), 'checked="checked"') . " />[MOD]</label><br /> |
Thanks.
I've now done that however now if I try to display a post that uses one the tags the page just doesn't display (I just get a completely blank page and the browser indicates it is busy). If I switch off the mod and admin bbcodes in the vBulletin options page then the page displays but of course the tag is just shown as text. (For testing purposes all my template is a single <div> with the words TEST ADMIN TAG in it.) Any ideas? |
All times are GMT. The time now is 11:31 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|