2010/1/11 20:06:41
|
---|
|
RSS feed in ImBloggingHow do you get an RSS feed for ImBlogging? I saw there's a blog feed on this site, but when I install the module I can't see any file or setting for it. I've got ImBlogging version 1.
Is it a custom hack? |
2010/1/11 23:09:42
|
---|
|
Re: RSS feed in ImBloggingMake 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. |