Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved how to show 10 latest threads outside the forum directory
#1
Not Solved
How to show 10 latest threads outside the forums directory in php pages ? from all the forums.
#2
Not Solved
for example, make file: grab.php
this is for latest post discussion..
for latest thread, change t.lastpost --> t.tid

<?php
define("IN_MYBB", 1);
require_once "./global.php";

	$query = $db->query("
		SELECT t.*
		FROM ".TABLE_PREFIX."threads t
		ORDER BY t.lastpost DESC 
		LIMIT 0,10"
	);
	while($thread = $db->fetch_array($query))
	{
		$thread['subject'] = htmlspecialchars_uni($thread['subject']);
		$thread['threadlink'] = get_thread_link($thread['tid']);
		echo "<a href=\"http://www.yourforum.com/".$thread['threadlink']."\">".$thread['subject']."</a><br>";
	}

?>
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
#3
Not Solved
Instead of using http://www.yourforum.com , it would be better to use $mybb->settings['bburl']
#4
Not Solved
thanks Yaldaram Wink
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
#5
Not Solved
awesome mod,thanks.
You can see this mod in action at http://www.flashvoicevideochat.com/index.php at the bottom.
can we do more modification like show by post ?
#6
Not Solved
Just what I need for a future site, thank you very much!
I fold for team 52482. Do you fold?


Forum Jump:


Users browsing this thread: 1 Guest(s)