MyBB Community Forums

Full Version: Intergration with site?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is ther any ssi or any way to get post sent to a home page?

<!--#include virtual="./SSI.php?ssi_function=news" -->
What do you mean... you want to include a post within a page outside of your forum directory?
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!
Sorry but there's no mod for that purpose yet.
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.
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-imageurl(syn-recentposts-row1.png);
}
div.syn-recentposts-row2 {background-imageurl(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 ;
    while(
$recentposts mysql_fetch_array($query)){��// go through all the results.

    
if ($recentpostsinc == ){
    
$recentpostsinc ;            //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>