vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Puzzled by parse_bbcode function - help :( (https://vborg.vbsupport.ru/showthread.php?t=72202)

cinq 11-26-2004 08:03 AM

Puzzled by parse_bbcode function - help :(
 
I can trying to parse the content using the parse_bbcode function.
However the page is loading very slow because of the parsing , and I cannot figure out why.
If I use the bottom code instead ( ie. dont parse but the result is not what I want ), the page loads fast.

How come ?

Code:

$newsmain['content'] = parse_bbcode($newsmain['content'], '1', 1, 0, '', 1, 0);
$newscontent = $newsmain['content'];

vs.

Code:

$newscontent = $newsmain['content'];

Revan 11-26-2004 12:03 PM

Hm, I would suggest using the parse_bbcode2 function. I do not know the difference, I just know that using the bbcode2, it takes alot less arguements than that above there, and it loads fast enough.

:)

burnist 11-26-2004 04:24 PM

Turn your vB into Debug mode and have a look at the secret settings in there. That should tell you why bbcode_parse should not be used and bbcode_parse2 should

cinq 11-26-2004 11:44 PM

What debug mode ?

Anyways, I tried this :
Code:

$newsmain['content'] = parse_bbcode2($newsmain['content'], 0, 1, 1, 1, 0, 1);
But it still is the same case of slow loading.

What am i doing wrong ?

Revan 11-27-2004 03:01 PM

heres a small snippet of code from the RPG Integration Hack:
Code:

parse_bbcode2($battletext, 0, 0, 1, 1);
It does not parse HTML
It does not parse IMG
It parses smileys
It parses BBCode

You do not need to set the two final attributes in your parse_bbcode, because the values you input are the same as vB has for default.



//peace

cinq 11-27-2004 11:41 PM

Revan, even doing that I still face the same problem.
That's why I am puzzled.
There seems nothing wrong with the querying.

Brad 11-29-2004 06:16 PM

Quote:

Originally Posted by Revan
Hm, I would suggest using the parse_bbcode2 function. I do not know the difference, I just know that using the bbcode2, it takes alot less arguements than that above there, and it loads fast enough.

:)

parse_bbcode is used with a cache like the posting cache. If done correct with a cache you can avoid having the parse bbcode on everypage view.

parse_bbcode2 takes raw vBcode and converts it to html for the browser when the page is called. It also dose image checking if allowed.

parse_bbcode is used to pass raw html built by parse_bbcode2 to the browser while still checking it for permissions. By storing the html in a mysql table on the first page view and calling it on all page views afterwards you avoid multiple preg_replace function calls, and save alot of generation time.

cinq 11-29-2004 11:43 PM

Brad, so how does that fix my problem ? :D


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