PDA

View Full Version : Question about bb codes that use templates


nerbert
08-22-2013, 08:33 PM
On a couple of occasions I've tried to help someone make a bb code that's visible only to designated usergroups. I can't find any reliable way to do it without building a bb code that uses a template, like quote or the three code displaying bb codes, but I don't know how to do it.

Right now I'm stuck on a part in includes/class_bbcode.php. In function fetch_tag_list() there are blocks of code like this


if (($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_COLOR) OR $force_all)
{
// [COLOR=XXX]
$tag_list['option']['color'] = array(
'html' => '<font color="%2$s">%1$s</font>',
'option_regex' => '#^\#?\w+$#',
'strip_empty' => true
);
}


Does anyone know where ALLOW_BBCODE_COLOR and other defined variables are set?

Or better yet, does anyone know of a mod that creates a bb code with a template?

tbworld
08-23-2013, 02:44 AM
Does anyone know where ALLOW_BBCODE_COLOR and other defined variables are set?



The bitfields are set at the beginning of 'class_core.php'

nerbert
08-23-2013, 10:06 AM
The bitfields are set at the beginning of 'class_core.php'

Thanks, but no thanks.

Okay, that explains what's going on but I'll have to bypass using bitfields for something like this. I was hoping settings like forum permissions were filled in with XML and you could slip a new setting in with an added file but you would actually have to hack it in. So I'll just use options to control this.

tbworld
08-24-2013, 02:27 AM
Sorry, I was running late to a meeting so I just answered your immediate question.

I have to apologize, the last time I tried to assist you, you were working on some log-in software. I was called away on an immediate overseas meeting that lasted over a week. Again, I apologize for leaving you hangingl it was not my intent.

nerbert
08-24-2013, 04:24 AM
Oh, nothing to apologize for. Once I saw those defined variables were bits I could change plans a little and move on. I'm slowly chipping away at the overall problem.

Thanks for the help.

Scanu
08-24-2013, 06:40 AM
Sorry i don't have the time to search it for you right now but i remember there is a mod for this

kh99
08-24-2013, 11:37 AM
Yeah, nhawk has one: https://vborg.vbsupport.ru/showthread.php?t=266744 .