The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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']; Code:
$newscontent = $newsmain['content']; |
#2
|
||||
|
||||
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.
|
#3
|
||||
|
||||
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
|
#4
|
||||
|
||||
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 ? |
#5
|
||||
|
||||
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 |
#6
|
||||
|
||||
Revan, even doing that I still face the same problem.
That's why I am puzzled. There seems nothing wrong with the querying. |
#7
|
|||
|
|||
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. |
#8
|
||||
|
||||
Brad, so how does that fix my problem ?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|