vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   BBCode on External Pages? (https://vborg.vbsupport.ru/showthread.php?t=123935)

frandy 08-14-2006 03:40 PM

BBCode on External Pages?
 
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?

calorie 08-14-2006 03:55 PM

https://vborg.vbsupport.ru/showpost....56&postcount=2 :)

frandy 08-14-2006 03:58 PM

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

Kungfu 08-15-2006 03:17 AM

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.

frandy 08-15-2006 09:03 PM

Bah I cant get anything to work....

Kirk Y 08-15-2006 10:34 PM

Did you use the full path to your forum?

C:\sites\yoursite\httpdocs\forums

frandy 08-16-2006 02:51 PM

yeah I did

Kungfu 08-19-2006 04:19 PM

do a echo getcwd();


All times are GMT. The time now is 11:52 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
  • Page Generation 0.01063 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete