2010-10-01, 06:39 PM
Hello ppl,
I am back after a long period. so long that i have missed two releases of the mybb bulletin board.
now i was trying to move my website to another location and discovered that previous modification (not mods) is not working anymore.
in my website index page I applied a mod which should display latest posts in each forum.
that was some source code found somewhere..
now..
it simply stopped working, probably due to my brand new installation from 1.4 to 1.6.
said that...
could you please help me out doing what I would like to?
simply take latest post in each forum and display their titles (with relative link to the forum) in the index page.
thank you!
PS: the error i receive isthe following:
I am back after a long period. so long that i have missed two releases of the mybb bulletin board.
now i was trying to move my website to another location and discovered that previous modification (not mods) is not working anymore.
in my website index page I applied a mod which should display latest posts in each forum.
define('IN_MYBB', NULL);
require_once 'mybb/global.php';
require_once 'class.MyBBIntegrator.php';
...
$latest_posts = $MyBBI->getLatestThreads(2, '*', 2, true);
foreach ($latest_posts as $latest_post)
{
$mess_temp = "";
$mess = str_word_count($latest_post['message'],1);
$mess_l = count($mess);
if($mess_l >= 31){
for($i=0;$i<30;$i++){
$mess_temp .= $mess[$i]." ";
}
$mess_temp .= "...";
}
else{
$mess_temp = $latest_post['message'];
}
$mess_forum .= "<fieldset><legend><b>".nome($latest_post['username'])."</b></legend><b> ".$latest_post['subject']."</b><br />".$mess_temp.'</fieldset><hr />';
}
if(count($latest_posts) > 0) $mess_forum = "<img src='immagini/index_annunci.png'>".$mess_forum;
that was some source code found somewhere..
now..
it simply stopped working, probably due to my brand new installation from 1.4 to 1.6.
said that...
could you please help me out doing what I would like to?
simply take latest post in each forum and display their titles (with relative link to the forum) in the index page.
thank you!
PS: the error i receive isthe following:
Quote:Fatal error: Call to a member function getLatestThreads() on a non-object in /membri/sessionkeeperol/index.php on line 68