vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Conditional BBCODES (https://vborg.vbsupport.ru/showthread.php?t=275127)

TEAMSlowpitch 12-06-2011 07:18 PM

Conditional BBCODES
 
Hello all,

Thanks for the help upfront. I was hoping to do a bbcode that allowed me to put some sort of conditional statement as to what the user inputs, however after searching for awhile it looks like conditional statements are not allowed in bbcode using bulletin 4.0. This leaves me to believe it can be achieved via vBcode, however i'm not sure where to start.

What i'm looking to do is have the same function as a bbcode but with conditional statements (with a button added to the editor, etc.). Could someone point me in the right direction on how I would go about doing that.

Thanks so much,
Brad

kh99 12-06-2011 09:06 PM

Yeah, conditionals aren't allowed, and if they were they probably wouldn't work like you'd expect because of post caching. The message text (and bbcode) is processed and saved so it doesn't have to be done every time someone views a post. But what you can do is fake it by writing a plugin and doing your own processing (like a str_replace()) on the message text before it's displayed (and that's obviously going to add some overhead). Also, you'd be on your own for providing a button in the editor.

What do you mean by "as to what the user inputs"? What input did you want to check exactly?


All times are GMT. The time now is 12:17 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.00899 seconds
  • Memory Usage 1,705KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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