AAAAhome/academiac/www/components/com_weblinks/views/category/view.feed.php 0000644 00000004303 15137553666 0022430 0 ustar 00 link = JRoute::_(WeblinksHelperRoute::getCategoryRoute(JRequest::getVar('id', null, '', 'int'))); JRequest::setVar('limit', $app->getCfg('feed_limit')); $params = $app->getParams(); $siteEmail = $app->getCfg('mailfrom'); $fromName = $app->getCfg('fromname'); $feedEmail = $app->getCfg('feed_email', 'author'); $document->editor = $fromName; if ($feedEmail != "none") { $document->editorEmail = $siteEmail; } // Get some data from the model $items = $this->get('Items'); $category = $this->get('Category'); foreach ($items as $item) { // strip html from feed item title $title = $this->escape($item->title); $title = html_entity_decode($title, ENT_COMPAT, 'UTF-8'); // url link to article $link = JRoute::_(WeblinksHelperRoute::getWeblinkRoute($item->id, $item->catid)); // strip html from feed item description text $description = $item->description; $author = $item->created_by_alias ? $item->created_by_alias : $item->author; $date = ($item->date ? date('r', strtotime($item->date)) : ''); // load individual item creator class $feeditem = new JFeedItem(); $feeditem->title = $title; $feeditem->link = $link; $feeditem->description = $description; $feeditem->date = $date; $feeditem->category = $category->title; $feeditem->author = $author; // We don't have the author email so we have to use site in both cases. if ($feedEmail == 'site') { $feeditem->authorEmail = $siteEmail; } elseif($feedEmail === 'author') { $feeditem->authorEmail = $item->author_email; } // loads item info into rss array $document->addItem($feeditem); } } } ?> home/academiac/www/components/com_finder/views/search/view.feed.php 0000644 00000005244 15137735515 0021511 0 ustar 00 input->set('limit', $app->getCfg('feed_limit')); // Get view data. $state = $this->get('State'); $params = $state->get('params'); $query = $this->get('Query'); $results = $this->get('Results'); // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $suggested = JHtml::_('query.suggested', $query); $explained = JHtml::_('query.explained', $query); // Set the document title. $title = $params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); // Configure the document description. if (!empty($explained)) { $this->document->setDescription(html_entity_decode(strip_tags($explained), ENT_QUOTES, 'UTF-8')); } // Set the document link. $this->document->link = JRoute::_($query->toURI()); // If we don't have any results, we are done. if (empty($results)) { return; } // Convert the results to feed entries. foreach ($results as $result) { // Convert the result to a feed entry. $item = new JFeedItem; $item->title = $result->title; $item->link = JRoute::_($result->route); $item->description = $result->description; $item->date = intval($result->start_date) ? JHtml::date($result->start_date, 'l d F Y') : $result->indexdate; // Get the taxonomy data. $taxonomy = $result->getTaxonomy(); // Add the category to the feed if available. if (isset($taxonomy['Category'])) { $node = array_pop($taxonomy['Category']); $item->category = $node->title; } // Loads item info into rss array. $this->document->addItem($item); } } } home/academiac/www/components/com_content/views/category/view.feed.php 0000644 00000005220 15137743033 0022250 0 ustar 00 getParams(); $feedEmail = $app->getCfg('feed_email', 'author'); $siteEmail = $app->getCfg('mailfrom'); // Get some data from the model JRequest::setVar('limit', $app->getCfg('feed_limit')); $category = $this->get('Category'); $rows = $this->get('Items'); $doc->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->id)); foreach ($rows as $row) { // Strip html from feed item title $title = $this->escape($row->title); $title = html_entity_decode($title, ENT_COMPAT, 'UTF-8'); // Compute the article slug $row->slug = $row->alias ? ($row->id . ':' . $row->alias) : $row->id; // Url link to article $link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language)); // Get row fulltext $db = JFactory::getDBO(); $query = 'SELECT' .$db->quoteName('fulltext'). 'FROM #__content WHERE id ='.$row->id; $db->setQuery($query); $row->fulltext = $db->loadResult(); // Get description, author and date $description = ($params->get('feed_summary', 0) ? $row->introtext.$row->fulltext : $row->introtext); $author = $row->created_by_alias ? $row->created_by_alias : $row->author; @$date = ($row->publish_up ? date('r', strtotime($row->publish_up)) : ''); // Load individual item creator class $item = new JFeedItem(); $item->title = $title; $item->link = $link; $item->date = $date; $item->category = $row->category_title; $item->author = $author; if ($feedEmail == 'site') { $item->authorEmail = $siteEmail; } elseif($feedEmail === 'author') { $item->authorEmail = $row->author_email; } // Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists if (!$params->get('feed_summary', 0) && $params->get('feed_show_readmore', 0) && $row->fulltext) { $description .= '
'.JText::_('COM_CONTENT_FEED_READMORE').'
'; } // Load item description and add div $item->description = ''.JText::_('COM_CONTENT_FEED_READMORE').'
'; } // Load item description and add div $item->description = '