MyBB Community Forums

Full Version: Latest News Mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I install the latest news mod for RC3.
When I try to access the forums, I get the following message.

mySQL error: 1054
Unknown column 'lastthreadtid' in 'field list'
Query: SELECT lastthreadtid FROM forums WHERE fid='4' AND active!='no'

Can someone help? Thanks.
I was checking another installation text and it said to run dbupdate.php.

Ran the dbupdate that came with latest news file.

When i turn on the latest news, I can't access threads.
The latest thread will only be shown after a new thread has been posted in the forum you have specified as the forum to pull the announcements from. Wink
ok..got the first latest news out...
but, now whenever you open any thread, it goes to the lastest news thread...Smile

Do you know what could cause this?
Yes. Sorry about this, I noticed a small bug in the Install.txt file.

Once you have installed the mod, go to global.php and find this block of code...

// Latest News MOD start:
if($settings['boardclosed'] != "yes")
{
	if($settings['latestnews'] != "off")
	{
		$query = $db->query("SELECT lastthreadtid FROM forums WHERE fid='$settings[latestnewsfid]' AND active!='no'");
		$tid = $db->result($query, 0);
		$query = $db->query("SELECT * FROM threads WHERE tid='$tid'");
		while($thread = $db->fetch_array($query))
		{
			eval("\\$latestnews = \\"".$templates->get("latestnews")."\\";");
		}
	}
}
// Latest News MOD end

...and replace it with this...

// Latest News MOD start:
if($settings['boardclosed'] != "yes")
{
	if($settings['latestnews'] != "off")
	{
		$query = $db->query("SELECT lastthreadtid FROM forums WHERE fid='$settings[latestnewsfid]' AND active!='no'");
		$latesttid = $db->result($query, 0);
		$query = $db->query("SELECT * FROM threads WHERE tid='$latesttid'");
		while($thread = $db->fetch_array($query))
		{
			eval("\\$latestnews = \\"".$templates->get("latestnews")."\\";");
		}
	}
}
// Latest News MOD end
I'm trying to download the Latest News mod from http://mods.mybboard.net/download.php?did=11 but I keep getting a file not found. Can someone re upload it?
The download should now be fixed.