no, you don't want an RSS feed to your own page.
Basically, you need to use the news export, but tweak it to get it from all forums.
find function auto_run()
add a new case:
CODE
case 'recent':
$this->do_recent();
break;
then add the function...
CODE
/**
* Do Recent
*
* Shows recent posts
*/
function do_recent()
{
//----------------------------------------
// INIT
//----------------------------------------
$perpage = intval($this->ipsclass->input['show']) > 0 ? intval($this->ipsclass->input['show']) : 15;
$perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage;
$to_echo = "";
//----------------------------------------
// Get post parser
//----------------------------------------
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
$parser = new parse_bbcode();
$parser->ipsclass =& $this->ipsclass;
$parser->allow_update_caches = 0;
//-----------------------------------------
// Load the template...
//-----------------------------------------
$template = $this->load_template("recent.html");
//-----------------------------------------
// Get the topics, member info and other stuff
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => 't.*',
'from' => array( 'topics' => 't' ),
'where' => "t.forum_id NOT IN(4,15) AND t.approved=1",
'order' => 't.tid DESC',
'limit' => array( 0, $perpage ),
'add_join' => array( 0 => array( 'select' => 'm.members_display_name as member_name, m.mgroup, m.id as member_id,m.title as member_title',
'from' => array( 'members' => 'm' ),
'where' => "m.id=t.starter_id",
'type' => 'left' ),
1 => array( 'select' => 'p.*',
'from' => array( 'posts' => 'p' ),
'where' => "t.topic_firstpost=p.pid",
'type' => 'inner' ) )
) );
$this->ipsclass->DB->exec_query();
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$parser->parse_html = ( $this->ipsclass->cache['forum_cache'][ $row['forum_id'] ]['use_html'] and $this->ipsclass->cache['group_cache'][ $row['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
$parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
$row['post'] = $parser->pre_display_parse( $row['post'] );
$row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name'];
$to_echo .= $this->parse_template( $template,
array (
'profile_link' => $this->ipsclass->base_url."?act=Profile&CODE=03&MID=".intval($row['member_id']),
'member_name' => $row['member_name'],
'post_date' => $this->ipsclass->get_date( $row['post_date'], 'LONG', 1 ),
'topic_title' => substr($row['title'],0,22) . "...",
'topic_title_hover' => $row['title'],
'post' => $row['post'],
'comments' => $row['posts'],
'view_all_link' => $this->ipsclass->base_url."?showtopic={$row['tid']}"
)
);
}
//-----------------------------------------
// Get the macros and replace them
//-----------------------------------------
if ( is_array( $this->ipsclass->skin['_macros'] ) )
{
foreach( $this->ipsclass->skin['_macros'] as $i => $row )
{
if ( $row['macro_value'] != "" )
{
$to_echo = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $to_echo );
}
}
}
$to_echo = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $to_echo );
$to_echo = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $to_echo );
echo $to_echo;
exit();
}
note in the above: 'where' => "t.forum_id NOT IN(4,15) AND t.approved=1",
forums 4 and 15 are my private forums. replace with yours, or remove that whole not in statement.
and finally, the template...
in ssi_templates/ create a file called recent.html and paste in the following:
CODE
<a href='{view_all_link}' title='{topic_title_hover}'>{topic_title}</a><br />
thats all there is too it.
now, on your home page, you want to simply php include it.
Make it look nice like this:
CODE
<h3>Recent Topics</h3>
<p style="margin:0; padding: 0 5px 5px 2px; line-height: 18px;">
<?php
include("http://www.yoursite.com/forums/ssi.php?a=recent&show=15");
?>
<a href="/forums/index.php?act=Search&CODE=getnew">New posts since last visit</a>
</p>
you can tweak the template to pass in more things. A lot of post info gets pulled in the php function.