The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Im making my own simple script for the front page of my website. Ive managed to get it to grab and display the first post of 10 threads in forumid 1.
How do I get it to parase the BBCode in the posts so it displays the smilies and the urls etc properly? What code/files do I need to include and what do I need to wrap around my variable to get it done. The variable which does this is $threadpost and its grabbed from $post['pagetext']. What function will I have to wrap around $threadpost to get it to fix the BBCode? |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
wow...cheers
ok...that didnt seem to work I get a database error when I point it to the forum directory with a slash at the start of the address for the server and I get an error for getting global.php when removing the 1st slash.....im totally stumped |
#4
|
|||
|
|||
![]()
anyway to do this without loading global.php. I tried to load just init.php and i got
$globaltemplates = array( 'bbcode_code', 'bbcode_html', 'bbcode_php', 'bbcode_quote', ); cache_templates($globaltemplates, $style['templatelist']); unset($globaltemplates); $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); function parse_bbcode($txt, $fid) { global $bbcode_parser; return $bbcode_parser->do_parse($txt, false, true, true, true, true, false); } but it doesnt get put Quote: this was quoted from blahblah or something like that the quoted text Then the post here. It just puts : the quoted text Then the post here. anyway to get this to work without global. As i cant seem to get global to work right the site. It just gives blank pages. Hmm, ok i found a way around it but i dont really like it. Still wondering if there is a way around using global. Right now i am just including global when it shows up as an actually webpage. if (strstr($_SERVER['REQUEST_URI'],'html') === 'html') then i include global otherwise i include the init script instead. |
#5
|
|||
|
|||
![]()
Bah I cant get anything to work....
|
#6
|
||||
|
||||
![]()
Did you use the full path to your forum?
C:\sites\yoursite\httpdocs\forums |
#7
|
|||
|
|||
![]()
yeah I did
|
#8
|
|||
|
|||
![]()
do a echo getcwd();
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|