Announcement
Collapse
No announcement yet.
Reading a thread outside of the dirrectory.
Collapse
X
-
We can not provide support for custom source code. Please check with vbulletin.org - the official resource web site.
-
Reading a thread outside of the dirrectory.
I'm trying to create a page to read the last post of a specific forrum and when i run the file i get the following error.
Fatal error: Call to a member function on a non-object in /vservers/lustiesn/htdocs/main.php on line 4
PHP Code:<?php
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'test');
chdir('/vservers/lustiesn/htdocs/vbulletin');
require_once('./global.php');
$getnews = $DB_site->query_first("SELECT * FROM thread left join post on (post.postid=thread.firstpostid) where thread.forumid=18 order by thread.threadid desc limit 1"); //this is line 5.
$subject = $getnews['title'];
$article = fetch_censored_text(parse_bbcode($getnews[pagetext], $getnews['forumid'], 1));
$date = date('l F d, Y h:i a ',$getnews[dateline]);
echo "<font face=Verdana size=2 color=#A06F1B>";
echo $date;
echo "<br><u>$subject</u></font><br><p><b><font face=Verdana size=2 color=#A06F1B>";
echo $article;
?>Last edited by jetalomar; Wed 15 Feb '06, 8:56pm.Tags: None
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Leave a comment: