![]() |
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); Code:
$newscontent = $newsmain['content']; |
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.
:) |
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
|
What debug mode ?
Anyways, I tried this : Code:
$newsmain['content'] = parse_bbcode2($newsmain['content'], 0, 1, 1, 1, 0, 1); What am i doing wrong ? |
heres a small snippet of code from the RPG Integration Hack:
Code:
parse_bbcode2($battletext, 0, 0, 1, 1); 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 |
Revan, even doing that I still face the same problem.
That's why I am puzzled. There seems nothing wrong with the querying. |
Quote:
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. |
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|