Hi ,
I want to show my mybb forum contents to my website index like latest thread from a particular board from my forum, my forum is installed in a separate directory like "forums" and i want to show the contents to my root index.php like
http://www.mydomain.com/index.php on some blocks like side boxes on my index page to show the contents of my forum like latest threads.
please anybody help
what is wrong with this code my global.php is in my forum folder and i have placed MyBB Integrator in the root of my website. wrote the below code but nothing showing up just a blank page.
<?php
define('IN_MYBB', NULL);
require_once '/home/user/public_html/forums/global.php';
require_once 'class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
// Following code fetches the latest active threads and shows the thread titles
$latest_active_threads = $MyBBI->getLatestActiveThreads(2, 5, true);
foreach ($latest_active_threads as $latest_active_thread)
{
echo $latest_active_thread['subject'].'<br />';
}
?>
i have seen this thing before with banner rotator script when ever i include any file from any separate directory like
<?php include directory/file.php; ?> it shows nothing but if the file is placed on the same place i mean for example on root it will work but why the include statement do not work when the file is in another directory ? is there any other statement or command to perform the same task ? i wonder how these forum scripts work when most of the files are placed in separate directories.
Anybody can solve this please ? i am not using jhoomla or any other cms for my site my index page is just a normal php page.My server's php version is 5.2.12