View Full Version : Making use of the bbcodeparse() function externally
TWTCommish
07-09-2001, 03:50 PM
Ok, I've got a script seperate from vBulletin, and I want to be able to have certain data parsed for vB code as vB's messages are. I have a require() command pointing to the admin/functions.php file, so as to make the two functions (that I know of) available to me...
...I figured I could simply pass my text like this:
$text = bbcodeparse($text);
...but that won't work. Any idea what's up?
TWTCommish
07-12-2001, 04:45 AM
I hate to bump, but I have no choice. :(
Redmak
07-15-2001, 05:24 PM
Check my reply here
http://www.vbulletin.com/forum/showthread.php?s=&postid=139629#post139629
TWTCommish
07-15-2001, 06:13 PM
Hmmm, something's wrong. I started getting errors, so I tried to use chdir() to fix them. Here's what I'm using now. I have these two lines:
chdir("/usr/home/web/path/to/forums");
require("/usr/home/web/path/to/forums/global.php");
And then, I do this:
$comments = bbcodeparse2($comments,"1","1","1","1");
I get this error:
Fatal error: Call to a member function on a non-object in /usr/home/web/path/to/forums/admin/functions.php on line 75
Any idea what's wrong? Thanks for your help either way! :)
TWTCommish
07-23-2001, 02:09 PM
I hate having to bump things, but I'm totally stuck on this.
JamesUS
07-23-2001, 02:42 PM
I don't have the vB source handy so I can't check myself but it sounds like the $DB_site class is being used in the bbcodeparse2 function. You need to change all calls to these to reference the mysql_query/mysql_fetch_array functions or remove them altogethor.
TWTCommish
07-23-2001, 06:35 PM
Thanks -- I copied over a few functions and changed their name, and it works great. Really helps to tie the rest of the site into the forums. Thanks! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.