Reply New Topic
2010/1/11 23:09:42
#1
Offline
Home away from home

Re: RSS feed in ImBlogging

Make a new file in the /modules/imblogging/ folder.
Call it rss.php
Put this in it.

$clean_post_uid = isset($_GET['uid']) ? intval($_GET['uid']) : false;

include_once IMBLOGGING_ROOT_PATH.'/class/icmsfeed.php';
$imblogging_feed = new IcmsFeed();

$imblogging_feed->title = $icmsConfig['sitename'] . ' - ' . $icmsModule->name();
$imblogging_feed->url = XOOPS_URL;
$imblogging_feed->description = $icmsConfig['slogan'];
$imblogging_feed->language = _LANGCODE;
$imblogging_feed->charset = _CHARSET;
$imblogging_feed->category = $icmsModule->name();

$imblogging_post_handler = icms_getModuleHandler('post');
//ImbloggingPostHandler::getPosts($start = 0, $limit = 0, $post_uid = false, $year = false, $month = false
$postsArray = $imblogging_post_handler->getPosts(0, 10, $clean_post_uid);

foreach($postsArray as $postArray) {
$imblogging_feed->feeds[] = array (
'title' => $postArray['post_title'],
'link' => str_replace('&', '&', $postArray['itemUrl']),
'description' => htmlspecialchars(str_replace('&', '&', $postArray['post_lead']), ENT_QUOTES),
'pubdate' => $postArray['post_published_date_int'],
'guid' => str_replace('&', '&', $postArray['itemUrl']),
);
}

$imblogging_feed->render();

This was from the imblogging trunk.


Subject Poster Date
     RSS feed in ImBlogging Madfish 2010/1/11 20:06:41
       Re: RSS feed in ImBlogging UnderDog 2010/1/11 23:09:42
Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.