vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   State of post when parsed by BBCode? (https://vborg.vbsupport.ru/showthread.php?t=168682)

MrApples 01-24-2008 11:03 PM

State of post when parsed by BBCode?
 
If I were to add a custom BBCode through the appropriate plugin, would the code be in HTML when it reached that function? Or would it still be in BBCode.

Specifically I need to know if <br />'s have been added. THank you in advance.

Eikinskjaldi 01-25-2008 02:55 AM

An odd question. Are you thinking vb does something magical where the post goes from no html to all html in the twinkling of an atomic eye?

the bbcode parser is stack based, and it moves through the post replacing bbcode with html as it goes. Whether there would be any html by the time it reaches your custom code depends on where in the post your custom tag is.

MrApples 01-25-2008 05:09 PM

I am not referring to it replacing BBCode with HTML, but newline and long spaces( and quotes too I think) - are they replaced with HTML?

And of course I know it doesn't magically do that... "when it reached that function".

"<br />" and " " - how are they handled?

I'm building a parser for a different coding language which isn't tag-based.

Opserty 01-26-2008 12:13 PM

vBulletin probably makes use the PHP nl2br() function, although I'm not 100% sure. You could just search the class_bbcode.php file for nl2br and see if you get any hits. For things like coding languages though, you will want to split off the code so that the newlines are not converted into Line Breaks and instead make use of the HTML <pre> tag.

MrApples 01-27-2008 02:07 AM

Ok thank you.

It looks like that is used.


All times are GMT. The time now is 12:57 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
  • Page Generation 0.00942 seconds
  • Memory Usage 1,714KB
  • 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
  • (5)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