From f50b36497e805035c0f893abb350bd940ba5cb30 Mon Sep 17 00:00:00 2001 From: Jalaloedien Date: Thu, 18 Jan 2007 13:24:09 +0000 Subject: [PATCH] KTS-1556 "Implement RSS feed system" Implemented. --- plugins/rssplugin/KTrss.inc.php | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/RSSDashlet.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/RSSPlugin.php | 36 ++++++++++++++++++++++++++++++++++++ plugins/rssplugin/js/update.js | 31 +++++++++++++++++++++++++++++++ plugins/rssplugin/loadFeed.inc.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/manageRSSFeeds.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/rss2array.inc.php | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/templates/RSSPlugin/addfeed.smarty | 35 +++++++++++++++++++++++++++++++++++ plugins/rssplugin/templates/RSSPlugin/dashlet.smarty | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/rssplugin/templates/RSSPlugin/editfeed.smarty | 37 +++++++++++++++++++++++++++++++++++++ plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty | 36 ++++++++++++++++++++++++++++++++++++ resources/graphics/ktlogo_rss.png | Bin 0 -> 6510 bytes 12 files changed, 1141 insertions(+), 0 deletions(-) create mode 100644 plugins/rssplugin/KTrss.inc.php create mode 100644 plugins/rssplugin/RSSDashlet.php create mode 100644 plugins/rssplugin/RSSPlugin.php create mode 100644 plugins/rssplugin/js/update.js create mode 100644 plugins/rssplugin/loadFeed.inc.php create mode 100644 plugins/rssplugin/manageRSSFeeds.php create mode 100644 plugins/rssplugin/rss2array.inc.php create mode 100644 plugins/rssplugin/templates/RSSPlugin/addfeed.smarty create mode 100644 plugins/rssplugin/templates/RSSPlugin/dashlet.smarty create mode 100644 plugins/rssplugin/templates/RSSPlugin/editfeed.smarty create mode 100644 plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty create mode 100644 resources/graphics/ktlogo_rss.png diff --git a/plugins/rssplugin/KTrss.inc.php b/plugins/rssplugin/KTrss.inc.php new file mode 100644 index 0000000..c1b1f2b --- /dev/null +++ b/plugins/rssplugin/KTrss.inc.php @@ -0,0 +1,210 @@ +"; + $feed .= "". + "" . + "KnowledgeTree RSS" . + "(c) 2006 The Jam Warehouse Software (Pty) Ltd. All Rights Reserved - KnowledgeTree Version: OSS 3.3 beta 7" . + "".$hostPath."" . + "KT-RSS" . + "". + "KNowledgeTree RSS". + "140". + "28". + "".$hostPath."knowledgeTree/". + "".$hostPath."resources/graphics/ktlogo_rss.png". + ""; + foreach($aItems as $item){ + $feed .= "" . + "".$item[0]['name']."" . + "".$hostPath."view.php?fDocumentId=".$item[0]['id']."" . + "".$item[0]['transaction']."". + ""; + } + $feed .= "" . + ""; + + return $feed; + } + + // Delete feed function + function deleteFeed($iFeedId){ + $res = DBUtil::autoDelete('plugin_rss', $iFeedId); + } + + // Get title for external feed + function getExternalFeedTitle($iFeedId){ + $sQuery = "SELECT title FROM plugin_rss WHERE id = ?"; + $aParams = array($iFeedId); + $sFeedTitle = DBUtil::getOneResultKey(array($sQuery, $aParams), 'title'); + + if (PEAR::isError($sFeedTitle)) { + // XXX: log error + return false; + } + if ($sFeedTitle) { + return $sFeedTitle; + } + } + + // Get url for external feed + function getExternalFeedUrl($iFeedId){ + $sQuery = "SELECT url FROM plugin_rss WHERE id = ?"; + $aParams = array($iFeedId); + $sFeedUrl = DBUtil::getOneResultKey(array($sQuery, $aParams), 'url'); + + if (PEAR::isError($sFeedUrl)) { + // XXX: log error + return false; + } + if ($sFeedUrl) { + return $sFeedUrl; + } + } + + // Update external feed data + function updateFeed($iFeedId, $sFeedTitle, $sFeedUrl){ + $sQuery = "UPDATE plugin_rss SET title=?, url=? WHERE id=?"; + $aParams = array($sFeedTitle, $sFeedUrl, $iFeedId); + $res = DBUtil::runQuery(array($sQuery, $aParams)); + + return $res; + } + + // Create new external feed + function createFeed($sFeedTitle, $sFeedUrl, $iUserId){ + $aParams = array( + 'user_id' => $iUserId, + 'url' => $sFeedUrl, + 'title' => $sFeedTitle, + ); + $res = DBUtil::autoInsert('plugin_rss', $aParams); + + return $res; + } +} +?> diff --git a/plugins/rssplugin/RSSDashlet.php b/plugins/rssplugin/RSSDashlet.php new file mode 100644 index 0000000..9a62dc3 --- /dev/null +++ b/plugins/rssplugin/RSSDashlet.php @@ -0,0 +1,77 @@ +sTitle = _kt('RSS Feeds'); + } + + function is_active($oUser) { + $this->oUser = $oUser; + return true; + } + + function render() { + $oTemplating =& KTTemplating::getSingleton(); + $oTemplate = $oTemplating->loadTemplate('RSSPlugin/dashlet'); + + $iUId = $this->oUser->getId(); + + // Get internal Feed + $aInternalRSS = KTrss::getInternalFeed($iUId); + + // Get count of all items in feed + $iCountItems = count($aInternalRSS[items]); + + // Get listing of external feeds + $aExternalFeedsList = KTrss::getExternalFeedsList($iUId); + + // Create action for external feed management to be linked to inside of dashlet + $action = array("name" => _kt("Manage External RSS Feeds"), "url" => $this->oPlugin->getPagePath('managerssfeeds')); + + // Prepare template data + $aTemplateData = array( + 'context' => $this, + 'internalrss' => $aInternalRSS, + 'itemcount' => $iCountItems, + 'feedlist' => $aExternalFeedsList, + 'user' => $iUId, + 'action' => $action, + ); + + return $oTemplate->render($aTemplateData); + } +} +?> diff --git a/plugins/rssplugin/RSSPlugin.php b/plugins/rssplugin/RSSPlugin.php new file mode 100644 index 0000000..8fdf7bd --- /dev/null +++ b/plugins/rssplugin/RSSPlugin.php @@ -0,0 +1,36 @@ +sFriendlyName = _kt('RSS Plugin'); + return $res; + } + + function setup() { + $this->registerDashlet('RSSDashlet', 'ktcore.rss.feed.dashlet', 'RSSDashlet.php'); + $this->registerPage('managerssfeeds', 'ManageRSSFeedsDispatcher'); + + require_once(KT_LIB_DIR . "/templating/templating.inc.php"); + $oTemplating =& KTTemplating::getSingleton(); + $oTemplating->addLocation('RSS Plugin', '/plugins/rssplugin/templates'); + } + } +$oPluginRegistry =& KTPluginRegistry::getSingleton(); +$oPluginRegistry->registerPlugin('RSSPlugin', 'ktcore.rss.plugin', __FILE__); +?> diff --git a/plugins/rssplugin/js/update.js b/plugins/rssplugin/js/update.js new file mode 100644 index 0000000..7132c1c --- /dev/null +++ b/plugins/rssplugin/js/update.js @@ -0,0 +1,31 @@ +function loadFeed(){ + xmlHttp=GetXmlHttpObject(); + if (xmlHttp===null){ + alert ("Browser does not support HTTP Request"); + return; + } + var feed = document.nullForm.feedSelect.options[document.nullForm.feedSelect.options.selectedIndex].value; + + var url="../calculator.php"; + url=url+"?incomplete=yes"; + url=url+"&sid="+Math.random(); + xmlHttp.onreadystatechange=stateChanged; + xmlHttp.open("GET",url,true); + xmlHttp.send(null); +} + +function stateChanged(){ + if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ + document.getElementById("output").innerHTML=xmlHttp.responseText; + } +} + +function GetXmlHttpObject(){ + var objXMLHttp=null; + if (window.XMLHttpRequest){ + objXMLHttp=new XMLHttpRequest(); + }else if (window.ActiveXObject){ + objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + return objXMLHttp; +} \ No newline at end of file diff --git a/plugins/rssplugin/loadFeed.inc.php b/plugins/rssplugin/loadFeed.inc.php new file mode 100644 index 0000000..0a24e5d --- /dev/null +++ b/plugins/rssplugin/loadFeed.inc.php @@ -0,0 +1,44 @@ +".$aRSSArray[channel][title]."" . + "
" . + ""; + for($i=0;$i + + + + + + + + + "; + } + $reposonse .= "
".$aRSSArray[items][$i][description]."".$aRSSArray[items][$i][pubDate]."
... read more


"; + + echo $reposonse; +?> diff --git a/plugins/rssplugin/manageRSSFeeds.php b/plugins/rssplugin/manageRSSFeeds.php new file mode 100644 index 0000000..5359a94 --- /dev/null +++ b/plugins/rssplugin/manageRSSFeeds.php @@ -0,0 +1,155 @@ +aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Manage External RSS Feeds','rssplugin')); + $iUId = $this->oUser->getId(); + + $oTemplating =& KTTemplating::getSingleton(); + $oTemplate = $oTemplating->loadTemplate('RSSPlugin/managerssfeeds'); + + $aFeedsList = array(); + $aFeedsList = KTrss::getExternalFeedsList($iUId); + + $aTemplateData = array( + 'context' => $this, + 'feedlist' => $aFeedsList, + ); + + return $oTemplate->render($aTemplateData); + } + + // Delete feed function + function do_deleteFeed(){ + $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id'); + + $res = KTrss::deleteFeed($iFeedId); + + if (PEAR::isError($res)) { + $this->errorRedirectToMain(sprintf(_kt('Unable to delete item: %s','rssplugin'), $res->getMessage())); + } + else{ + $this->successRedirectToMain(sprintf(_kt('RSS feed deleted','rssplugin'))); + } + } + + // Edit feed function + function do_editFeed(){ + $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id'); + + $add_fields = array(); + $add_fields[] = new KTStringWidget(_kt('Title','rssplugin'),_kt('The title of the RSS feed','rssplugin'), 'title', KTrss::getExternalFeedTitle($iFeedId), $this->oPage, true, null, null); + $add_fields[] = new KTStringWidget(_kt('URL','rssplugin'),_kt('The url of the RSS feed','rssplugin'), 'url', KTrss::getExternalFeedUrl($iFeedId), $this->oPage, false, null, null); + + $oTemplating =& KTTemplating::getSingleton(); + $oTemplate = $oTemplating->loadTemplate("RSSPlugin/editfeed"); + $aTemplateData = array( + "context" => &$this, + "add_fields" => $add_fields, + "feed_id" => $iFeedId, + ); + return $oTemplate->render($aTemplateData); + + } + + // Update feed function on post + function do_updateFeed(){ + $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id'); + + $aErrorOptions = array( + 'redirect_to' => array('editFeed', sprintf('feed_id=%s', $iFeedId)) + ); + + $sTitle = $this->oValidator->validateString( + KTUtil::arrayGet($_REQUEST, 'title'), + KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a title",'rssplugin'))) + ); + + $sUrl =KTUtil::arrayGet($_REQUEST, 'url'); + + $res = KTrss::updateFeed($iFeedId, $sTitle, $sUrl); + + if (PEAR::isError($res)) { + $this->errorRedirectToMain(sprintf(_kt('Unable to delete item: %s','rssplugin'), $res->getMessage())); + } + else{ + $this->successRedirectToMain(sprintf(_kt('Updated news item.','rssplugin'))); + } + } + + // Add feed function + function do_addFeed(){ + $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Manage RSS Feeds')); + $this->oPage->setBreadcrumbDetails(_kt("Create a new RSS feed",'rssplugin')); + $this->oPage->setTitle(_kt("Create a link to a new RSS feed",'rssplugin')); + + $add_fields = array(); + $add_fields[] = new KTStringWidget(_kt('Title','rssplugin'),_kt('The title of rss feed','rssplugin'), 'title', null, $this->oPage, true, null, null); + + $add_fields[] = new KTStringWidget(_kt('URL','rssplugin'),_kt('The url to the rss feed','rssplugin'), 'url', null, $this->oPage, false, null, null); + + $oTemplating =& KTTemplating::getSingleton(); + $oTemplate = $oTemplating->loadTemplate("RSSPlugin/addfeed"); + $aTemplateData = array( + "context" => &$this, + "add_fields" => $add_fields, + ); + return $oTemplate->render($aTemplateData); + + } + + // Create feed on post + function do_createFeed() { + $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id'); + // use the validator object + $aErrorOptions = array('redirect_to' => array('addFeed'), 'message' => _kt('You must specify a title for the rss feed.','newsdashletplugin')); + $sTitle = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'title'), $aErrorOptions); + + $sUrl = KTUtil::arrayGet($_REQUEST, 'url'); + $res = KTrss::createFeed($sTitle, $sUrl, $this->oUser->getId()); + + if (PEAR::isError($res)) { + $this->errorRedirectToMain(sprintf(_kt('Unable to create feed: %s','rssplugin'), $res->getMessage())); + } + else{ + $this->successRedirectToMain(sprintf(_kt('Created new rss feed','rssplugin') . ': "' . KTrss::getExternalFeedTitle($iFeedId)) . '"'); + } + } +} + +?> diff --git a/plugins/rssplugin/rss2array.inc.php b/plugins/rssplugin/rss2array.inc.php new file mode 100644 index 0000000..048b1a0 --- /dev/null +++ b/plugins/rssplugin/rss2array.inc.php @@ -0,0 +1,380 @@ +"; + # print_r($rss_array); + # print ""; + # + # author: dan@freelancers.net + # + + # + # global vars + # + + global $rss2array_globals; + + # + # fetch_feed + # + + function rss2array($url){ + + global $rss2array_globals; + + # + # empty our global array + # + + $rss2array_globals = array(); + + # + # if the URL looks ok + # + + if(preg_match("/^http:\/\/([^\/]+)(.*)$/", $url, $matches)){ + + $host = $matches[1]; + $uri = $matches[2]; + + $request = "GET $uri HTTP/1.0\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: RSSMix/0.1 http://www.rssmix.com\r\n"; + $request .= "Connection: close\r\n\r\n"; + + # + # open the connection + # + + if($http = fsockopen($host, 80, $errno, $errstr, 5)){ + + # + # make the request + # + + fwrite($http, $request); + + # + # read in for max 5 seconds + # + + $timeout = time() + 5; + + while(time() < $timeout && !feof($http)) { + + $response .= fgets($http, 4096); + + } + + # + # split on two newlines + # + + list($header, $xml) = preg_split("/\r?\n\r?\n/", $response, 2); + + # + # get the status + # + + if(preg_match("/^HTTP\/[0-9\.]+\s+(\d+)\s+/", $header, $matches)){ + + $status = $matches[1]; + + # + # if 200 OK + # + + if($status == 200){ + + # + # create the parser + # + + $xml_parser = xml_parser_create(); + + xml_set_element_handler($xml_parser, "startElement", "endElement"); + xml_set_character_data_handler($xml_parser, "characterData"); + + # + # parse! + # + + xml_parse($xml_parser, trim($xml), true) or $rss2array_globals[errors][] = xml_error_string(xml_get_error_code($xml_parser)) . " at line " . xml_get_current_line_number($xml_parser); + + # + # free parser + # + + xml_parser_free($xml_parser); + + } + + else { + + $rss2array_globals[errors][] = "Can't get feed: HTTP status code $status"; + + } + + } + + # + # Can't get status from header + # + + else { + + $rss2array_globals[errors][] = "Can't get status from header"; + + } + + } + + # + # Can't connect to host + # + + else { + + $rss2array_globals[errors][] = "Can't connect to $host"; + + } + + } + + # + # Feed url looks wrong + # + + else { + + $rss2array_globals[errors][] = "Invalid url: $url"; + + } + + # + # unset all the working vars + # + + unset($rss2array_globals[channel_title]); + + unset($rss2array_globals[inside_rdf]); + unset($rss2array_globals[inside_rss]); + unset($rss2array_globals[inside_channel]); + unset($rss2array_globals[inside_item]); + + unset($rss2array_globals[current_tag]); + unset($rss2array_globals[current_title]); + unset($rss2array_globals[current_link]); + unset($rss2array_globals[current_description]); + + return $rss2array_globals; + + } + + function rss2arrayBlock($xml){ + + global $rss2array_globals; + + # + # empty our global array + # + + $rss2array_globals = array(); + + + # + # create the parser + # + + $xml_parser = xml_parser_create(); + + xml_set_element_handler($xml_parser, "startElement", "endElement"); + xml_set_character_data_handler($xml_parser, "characterData"); + + # + # parse! + # + + xml_parse($xml_parser, trim($xml), true) or $rss2array_globals[errors][] = xml_error_string(xml_get_error_code($xml_parser)) . " at line " . xml_get_current_line_number($xml_parser); + + # + # free parser + # + + xml_parser_free($xml_parser); + + + # + # unset all the working vars + # + + unset($rss2array_globals[channel_title]); + + unset($rss2array_globals[inside_rdf]); + unset($rss2array_globals[inside_rss]); + unset($rss2array_globals[inside_channel]); + unset($rss2array_globals[inside_item]); + + unset($rss2array_globals[current_tag]); + unset($rss2array_globals[current_title]); + unset($rss2array_globals[current_link]); + unset($rss2array_globals[current_description]); + + return $rss2array_globals; + + } + + # + # this function will be called everytime a tag starts + # + + function startElement($parser, $name, $attrs){ + + global $rss2array_globals; + + $rss2array_globals[current_tag] = $name; + + if($name == "RSS"){ + + $rss2array_globals[inside_rss] = true; + + } + + elseif($name == "RDF:RDF"){ + + $rss2array_globals[inside_rdf] = true; + + } + + elseif($name == "CHANNEL"){ + + $rss2array_globals[inside_channel] = true; + $rss2array_globals[channel_title] = ""; + + } + + elseif(($rss2array_globals[inside_rss] and $rss2array_globals[inside_channel]) or $rss2array_globals[inside_rdf]){ + + if($name == "ITEM"){ + + $rss2array_globals[inside_item] = true; + + } + + elseif($name == "IMAGE"){ + + $rss2array_globals[inside_image] = true; + + } + + } + + } + + # + # this function will be called everytime there is a string between two tags + # + + function characterData($parser, $data){ + + global $rss2array_globals; + + if($rss2array_globals[inside_item]){ + + switch($rss2array_globals[current_tag]){ + + case "TITLE": + $rss2array_globals[current_title] .= $data; + break; + case "DESCRIPTION": + $rss2array_globals[current_description] .= $data; + break; + case "LINK": + $rss2array_globals[current_link] .= $data; + break; + + } + + } + + elseif($rss2array_globals[inside_image]){ + + } + + elseif($rss2array_globals[inside_channel]){ + + switch($rss2array_globals[current_tag]){ + + case "TITLE": + $rss2array_globals[channel_title] .= $data; + break; + + } + + } + + } + + # + # this function will be called everytime a tag ends + # + + function endElement($parser, $name){ + + global $rss2array_globals; + + # + # end of item, add complete item to array + # + + if($name == "ITEM"){ + + $rss2array_globals[items][] = array(title => trim($rss2array_globals[current_title]), link => trim($rss2array_globals[current_link]), description => trim($rss2array_globals[current_description])); + + # + # reset these vars for next loop + # + + $rss2array_globals[current_title] = ""; + $rss2array_globals[current_description] = ""; + $rss2array_globals[current_link] = ""; + + $rss2array_globals[inside_item] = false; + + } + + elseif($name == "RSS"){ + + $rss2array_globals[inside_rss] = false; + + } + + elseif($name == "RDF:RDF"){ + + $rss2array_globals[inside_rdf] = false; + + } + + elseif($name == "CHANNEL"){ + + $rss2array_globals[channel][title] = trim($rss2array_globals[channel_title]); + + $rss2array_globals[inside_channel] = false; + + } + + elseif($name == "IMAGE"){ + + $rss2array_globals[inside_image] = false; + + } + + } + +?> \ No newline at end of file diff --git a/plugins/rssplugin/templates/RSSPlugin/addfeed.smarty b/plugins/rssplugin/templates/RSSPlugin/addfeed.smarty new file mode 100644 index 0000000..265e9c0 --- /dev/null +++ b/plugins/rssplugin/templates/RSSPlugin/addfeed.smarty @@ -0,0 +1,35 @@ +{$context->oPage->requireJSResource("thirdpartyjs/tinymce/jscripts/tiny_mce/tiny_mce.js")} +{capture assign=sJS} +{literal} +tinyMCE.init({ + mode : "textareas", + theme : "simple", +}); +{/literal} +{/capture} +{$context->oPage->requireJSStandalone($sJS)} + + + +

{i18n}New RSS Feed{/i18n}

+ +

{i18n}Create a rss feed which will be displayed on the dashboard{/i18n}

+ +
+ +
+ {i18n}Create a new rss feed{/i18n} + {foreach item=oWidget from=$add_fields} + {$oWidget->render()} + {/foreach} +
+ + +
+
+
+ + + + + diff --git a/plugins/rssplugin/templates/RSSPlugin/dashlet.smarty b/plugins/rssplugin/templates/RSSPlugin/dashlet.smarty new file mode 100644 index 0000000..757f741 --- /dev/null +++ b/plugins/rssplugin/templates/RSSPlugin/dashlet.smarty @@ -0,0 +1,100 @@ +
+ {literal} + + {/literal} + {if $internalrss or $feedlist} +
+ + {if ($action.url)}{$action.name}{else}{$action.name}{/if} +
+ {/if} +
+
+ {if ($internalrss)} +

{$internalrss.channel.title}

+
+ + {section name=i start=0 loop=$itemcount} + + + + + + + + + + + + {/section} +
{$internalrss.items[i].title}
{$internalrss.items[i].description}{$internalrss.items[i].pubDate}
...full story


+
+ {else} + {if !$feedlist} + {if ($action.url)}{$action.name}
{else}{$action.name} + {/if} + {/if} +
No internal {if !$feedlist}or external {/if}feeds available. +
+
+ {/if} +
+ + + + + + diff --git a/plugins/rssplugin/templates/RSSPlugin/editfeed.smarty b/plugins/rssplugin/templates/RSSPlugin/editfeed.smarty new file mode 100644 index 0000000..30c22ae --- /dev/null +++ b/plugins/rssplugin/templates/RSSPlugin/editfeed.smarty @@ -0,0 +1,37 @@ +{$context->oPage->requireJSResource("thirdpartyjs/tinymce/jscripts/tiny_mce/tiny_mce.js")} +{capture assign=sJS} +{literal} +tinyMCE.init({ + mode : "textareas", + theme : "simple", +}); +{/literal} +{/capture} +{$context->oPage->requireJSStandalone($sJS)} + + + +

{i18n}Edit RSS Feed{/i18n}

+ +

{i18n}Edit a RSS feed{/i18n}

+ +
+ + +
+ {i18n}Edit RSS feed{/i18n} + {foreach item=oWidget from=$add_fields} + {$oWidget->render()} + {/foreach} +
+ + +
+
+
+ + + + + + diff --git a/plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty b/plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty new file mode 100644 index 0000000..07063a0 --- /dev/null +++ b/plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty @@ -0,0 +1,36 @@ +

{i18n}Manage RSS Feeds{/i18n}

+
+{i18n}Add RSS feeds{/i18n} +

{i18n}These RSS feeds will be viewable on your dashboard.{/i18n}

+

 {i18n}Create a link to a new RSS feed{/i18n}

+
+ +{if empty($feedlist)} +

{i18n}Your RSS feed list is empty.{/i18n}

+{else} + + + + + + + + + + + +{section name=feed loop=$feedlist} + + + + + +{/section} + +
{i18n}Title{/i18n}{i18n}Edit{/i18n}{i18n}Delete{/i18n}
{$feedlist[feed].title}{i18n}Edit{/i18n}{i18n}Delete{/i18n}
+{/if} + + + + + diff --git a/resources/graphics/ktlogo_rss.png b/resources/graphics/ktlogo_rss.png new file mode 100644 index 0000000..d015a9a Binary files /dev/null and b/resources/graphics/ktlogo_rss.png differ -- libgit2 0.21.4