vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Parsing bbcode not working on all tags. (https://vborg.vbsupport.ru/showthread.php?t=281182)

Kyojii 04-06-2012 05:50 AM

Parsing bbcode not working on all tags.
 
I'm parsing bbcode like so...
Code:

$bbcode_parser =& new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),false);
echo $bbcode_parser->do_parse($vbulletin->GPC['article']);

However this isn't working for all bbcode, for example the video code doesn't work. And custom bbcode in general don't work. Does anyone know why? I've been looking through the vB documentation but haven't found anything yet.


EDIT:
I found the answer for custom tags here: http://members.vbulletin.com/api/vBu...nd_custom_tags

$bbcode_parser->append_custom_tags(); and that's resolved, the video tag is still just returning a link though.

EDIT:

I've been messing around with the handle_bbcode_video() function but I haven't been able to get it to work yet. I've tried using regex to get the video url and pass that in, however that didn't work and I've tried giving it the whole post, however that didn't work either.

--------------- Added [DATE]1333747841[/DATE] at [TIME]1333747841[/TIME] ---------------

*sigh* not sure why but this function doesn't seem to work no matter what data I throw at it. I think I'm calling it wrong or something. I've tried...

Code:

$bbcode_parser = new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),false);
$bbcode_parser->handle_bbcode_video('http://www.youtube.com/watch?v=zTpsrqvGL2Q');

and
Code:

$bbcode_parser = new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),false);
$bbcode_parser->handle_bbcode_video('[video]http://www.youtube.com/watch?v=zTpsrqvGL2Q[/video]');

Which is how the documentation says it should be used, however the same error always gets returned.

Quote:

Fatal error: Call to a member function handle_bbcode_video() on a non-object


All times are GMT. The time now is 05:02 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.01032 seconds
  • Memory Usage 1,713KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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