Exemplo n.º 1
0
 function do_main()
 {
     // This line adds your page to the breadcrumbs list at the top
     $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Manage External RSS Feeds'));
     $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);
 }
Exemplo n.º 2
0
 function render()
 {
     global $main;
     $main->requireJSResource("plugins/rssplugin/js/update.js");
     $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);
 }