2006-04-09, 10:11 PM
2006-04-10, 05:50 AM
What do you mean... you want to include a post within a page outside of your forum directory?
2006-04-11, 05:10 PM
Yea! I'd like to use Joomla as the CMS and MyBB as the board. I want to have a forum for news post, and i would like to display those post as news on Joomla front page. I can do it with phpbb and smf but i realy like MyBB. Thanks!
2006-04-11, 08:18 PM
Sorry but there's no mod for that purpose yet.
2006-04-11, 11:10 PM
You can include latest posts with the code found at:
htttp://community.mybboard.net/showthread.php?tid=6952
you could modify that code a bit to do what you want.
htttp://community.mybboard.net/showthread.php?tid=6952
you could modify that code a bit to do what you want.
2006-04-12, 09:51 AM
You could use this thing i made a while ago. Perhaps pull the post from mybb_posts by using the tid?
PHP Code:
<html>
<head>
<style type="text/css">
div.syn-recentposts {}
div.syn-recentposts-row1 {background-image: url(syn-recentposts-row1.png);
}
div.syn-recentposts-row2 {background-image: url(syn-recentposts-row2.png);
}
</style>
</head>
<div class="syn-recentposts">
<div class="syn-recentposts-top"><img src="syn-recentposts-top.png" /></div>
<?php
//
//
// This will output the recent posts from your database.
//
//
# ---- [ setup]
// mybb
$forumpath = "mybb/"; // Path to your forums root directory (with trailing slash)
require $forumpath."inc/config.php";
# ---- [ Database pokeage
mysql_select_db($config['database'], mysql_connect($config['hostname'], $config['username'], $config['password']));
$query = mysql_query(
"SELECT `mybb_threads`.`tid`, `mybb_threads`.`subject` , `mybb_threads`.`username`
FROM mybb_threads
WHERE (`mybb_threads`.`visible` =1)
ORDER BY `mybb_threads`.`tid` DESC
LIMIT 4"
)
or die(mysql_error());
#--- [ Print out data]
$recentpostsinc = 1 ;
while($recentposts = mysql_fetch_array($query)){��// go through all the results.
if ($recentpostsinc == 3 ){
$recentpostsinc = 1 ; //keeps rows alternating between 1 and��2
}
echo (" <div class=\"syn-recentposts-row".$recentpostsinc."\"><a href=\"".$forumpath."showthread.php?tid=".$recentposts['tid']."\" target=\"_blank\">".$recentposts['subject']."</a></div>") ;
$recentpostsinc ++ ;
}
?>
<div class="syn-recentposts-tbot"><img src="syn-recentposts-bot.png" /></div>
</div>
</html>