diff --git a/e107_plugins/featurebox/e_rss.php b/e107_plugins/featurebox/e_rss.php index 3f33aa5bb..d8a6d64f7 100644 --- a/e107_plugins/featurebox/e_rss.php +++ b/e107_plugins/featurebox/e_rss.php @@ -2,7 +2,67 @@ if (!defined('e107_INIT')) { exit; } -//FIXME TODO - Use v2 method. See chatbox_menu/e_rss.php +// v2.x Standard +class featurebox_rss // plugin-folder + '_rss' +{ + /** + * Admin RSS Configuration + */ + function config() + { + $config = array(); + + $config[] = array( + 'name' => LAN_PLUGIN_FEATUREBOX_NAME, + 'url' => 'featurebox', + 'topic_id' => '', + 'description' => LAN_PLUGIN_FEATUREBOX_RSSFEED, // that's 'description' not 'text' + 'class' => '0', + 'limit' => '9' + ); + + return $config; + } + + /** + * Compile RSS Data + * @param $parms array url, limit, id + * @return array + */ + function data($parms='') + { + $sql = e107::getDb(); + + $rss = array(); + $i=0; + + if($items = $sql->select('featurebox', "*", "fb_class = '0' LIMIT 0,".$parms['limit'])) + { + while($row = $sql->fetch()) + { + $rss[$i]['author'] = ''; + $rss[$i]['author_email'] = ''; + $rss[$i]['link'] = ''; + $rss[$i]['linkid'] = ''; + $rss[$i]['title'] = $row['fb_title']; + $rss[$i]['description'] = $row['fb_text']; + $rss[$i]['category_name'] = ''; + $rss[$i]['category_link'] = ''; + $rss[$i]['datestamp'] = ''; + $rss[$i]['enc_url'] = ''; + $rss[$i]['enc_leng'] = ''; + $rss[$i]['enc_type'] = ''; + $i++; + } + + } + + return $rss; + } + +} + +/* OLD V1 CODE //##### create feed for admin, return array $eplug_rss_feed -------------------------------- $feed['name'] = 'Featurebox'; @@ -38,6 +98,4 @@ if($items = $sqlrss->select('featurebox', "*", "fb_class = 0 DESC LIMIT 0,".$thi } } $eplug_rss_data[] = $rss; -//##### ------------------------------------------------------------------------------------ - -?> \ No newline at end of file +//##### ------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/e107_plugins/featurebox/languages/English_global.php b/e107_plugins/featurebox/languages/English_global.php index b17ccf074..3e3530f42 100644 --- a/e107_plugins/featurebox/languages/English_global.php +++ b/e107_plugins/featurebox/languages/English_global.php @@ -10,4 +10,4 @@ define("LAN_PLUGIN_FEATUREBOX_NAME", "Feature Box"); define("LAN_PLUGIN_FEATUREBOX_DESCRIPTION", "Displays an animated area on the top of your page with news-items and other content you would like to feature."); define("LAN_PLUGIN_FEATUREBOX_BATCH", "Create Featurebox Item"); - +define("LAN_PLUGIN_FEATUREBOX_RSSFEED", "This is the rss feed for the featurebox entries."); \ No newline at end of file