vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do BBCodes know where their templates are? Where do you define it? (https://vborg.vbsupport.ru/showthread.php?t=121806)

NeilFawcett 07-22-2006 06:17 AM

How do BBCodes know where their templates are? Where do you define it?
 
I've got some coding that when it tries converting the BBCodes it does most of them, but QUOTE and CODE ones are not. Infact even the text in them disappears.

Looking around it seems these two in particular use templates. It hits me that maybe my code is calling the BBCode stuff, but it can't find the template(s) hence the stuff is not being converted (& disappears).

Any idea if/what should be set up to point to the templates?

Here's some of my code (again it converts most BBCode, except QUOTE and CODE completely disappears):-
Code:

$NewsTemplate = LoadTemplate("news.html");
 
// Collect Data
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
 
while($News = $db->fetch_array($NewestNews)){
$neils_text = $bbcode_parser->do_parse($News['pagetext'], false, true, true);

$Data .= ParseTemplate($NewsTemplate,
 array(
  'threadid' => $News['threadid'],
  'threadname' => $News['title'],
  'postuserid' => $News['postuserid'],
  'postusername' => $News['postusername'],
  'post' => $neils_text,
  'comments' => vb_number_format($News['replycount']),
 )
);
}


Looking at the actual code for do_parse QUOTE and CODE use fetch_template, most of the others are hard coded conversions. Surely this must be pointing to my problem?


All times are GMT. The time now is 11:18 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.01033 seconds
  • Memory Usage 1,708KB
  • 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
  • (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