vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Question about bb codes that use templates (https://vborg.vbsupport.ru/showthread.php?t=301507)

nerbert 08-22-2013 08:33 PM

Question about bb codes that use templates
 
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

Code:

                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

Quote:

Originally Posted by nerbert (Post 2440428)
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

Quote:

Originally Posted by tbworld (Post 2440460)
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 .


All times are GMT. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00964 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete