The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
parse_bbcode
Hi, i'm new to hacking/modifying VB. Can someone tell me why the following code returns {i}test{/i}: (Note: i changed [ ] to { } so this forum doesnt parse it)
<?php require_once("forums/includes/functions.php"); require_once("forums/includes/functions_bbcodeparse.php"); echo parse_bbcode("{i}test{/i}"); ?> |
#2
|
||||
|
||||
parse_bbcode parses code depending on the signature settings, or specific forumsettings
if you want to explicitly parse some code, you have to use parse_bbcode2 |
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
functions_bbcodeparse.php
|
#5
|
|||
|
|||
Thanks Xenon,
<?php require_once("forums/includes/functions.php"); require_once("forums/includes/functions_bbcodeparse.php"); echo parse_bbcode2('test', 0, 0, 0, 1, 0, 1); ?> I wish i could say that worked but I get an error saying call to a member of a non-existant object. Looked into it, seems it tries to use the DB_Sql_vb class in db_mysql.php... So i figured if i instantiated that class and included config.php and db_mysql.php maybe the problem would go away... <?php require_once('forums/includes/config.php'); require_once('forums/includes/db_mysql.php'); $DB_site = new DB_Sql_vb; $DB_site->appname = 'vBulletin'; $DB_site->appshortname = 'vBulletin (' . VB_AREA . ')'; $DB_site->database = $dbname; $DB_site->connect($servername, $dbusername, $dbpassword, $usepconnect); require_once("forums/includes/functions.php"); require_once("forums/includes/functions_bbcodeparse.php"); echo parse_bbcode2('test', 0, 0, 0, 1, 0, 1); ?> When i do that i get the VB error: There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. |
#6
|
||||
|
||||
When I tried that with this it gave me an error:
PHP Code:
|
#7
|
||||
|
||||
bob, you may look at the signature of that function first
@nsanden: you should require global.php before |
#8
|
||||
|
||||
Quote:
|
#9
|
|||
|
|||
You actually got it to work? Can you show me your working code?
I still can't get it to work... http://www.savingadvice.com/forums/test.php http://www.savingadvice.com/forums/test.php?source=1 |
#10
|
|||
|
|||
Wow i take that back! Finally works!!! Appreciate the help guys.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|