vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Problem with external vB page (https://vborg.vbsupport.ru/showthread.php?t=120637)

Behemoth 07-08-2006 09:21 AM

Problem with external vB page
 
Alright, I'm trying to create an external vB page so I can parse the BBCode in the news articles that get posted, but I'm having no luck.

The PHP code I have is (at the top of the page):
PHP Code:

<?php

error_reporting
(E_ALL & ~E_NOTICE);

define('THIS_SCRIPT''index');
define('FWD''/home/tgaming/trickgaming.org/forum');
define('BWD', (($getcwd getcwd()) ? $getcwd '.'));

$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();

chdir(FWD);
require_once(
'./global.php');
chdir(BWD);

?>

Then a bunch of irrelevant stuff, and then further down:
PHP Code:

<?php

require_once(DIR '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());

$do_html false$do_smilies true$do_bbcode true;
$do_imgcode true$do_nl2br true$cachable false;

$forumid 2;
$newslimit 5;

$query_sel_news $db->query_read("SELECT * FROM thread WHERE forumid='$forumid' ORDER BY threadid DESC LIMIT {$newslimit}");

while (
$r $db->fetch_array($query_sel_news))
{
$title $row['title'];
$date $row['dateline'];
$username $row['postusername'];
$threadid $row['threadid'];
$firstpostid $row['firstpostid'];
$views $row['views'];
$replies $row['replycount'];

$query_sel_news $db->query_read("SELECT * FROM post WHERE postid='$dfirstpostid'");

while (
$r $db->fetch_array($query_sel_news))
{
    
$pagetext $parser->do_parse(
        
$r['pagetext'],
        
$do_html$do_smilies$do_bbcode,
        
$do_imgcode$do_nl2br$cachable
    
);

    include (
'inc/news.php');
}
}

$db->free_result($query_sel_news);
$db->close();

?>

However, this gives me the errors:
Code:

Fatal error: Call to a member function query_read_slave() on a non-object in /home/.cessie/tgaming/trickgaming.org/forum/includes/class_bbcode.php on line 198

Fatal error: Call to a member function unlock_tables() on a non-object in /home/.cessie/tgaming/trickgaming.org/forum/includes/functions.php on line 4680

I'm running 3.6.0 B3, and I'm pretty sure the code was written for 3.5.3, but I don't see anything that should have changed since then. Any help?

nhatrang 08-11-2006 02:58 AM

I am having the same error.


All times are GMT. The time now is 12:30 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.01790 seconds
  • Memory Usage 1,732KB
  • 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)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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