Re: RSS feed in ImBlogging

Posted by UnderDog on 1263280182
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.

This Post was from: https://www.impresscms.org/iforum/viewtopic.php?topic_id=4003&post_id=36215