Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/view.feed.php.tar
Назад
home/wuectly/www/components/com_content/views/featured/view.feed.php 0000604 00000006620 15245556221 0022041 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Frontpage View class * * @since 1.5 */ class ContentViewFeatured extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { // Parameters $app = JFactory::getApplication(); $doc = JFactory::getDocument(); $params = $app->getParams(); $feedEmail = $app->get('feed_email', 'none'); $siteEmail = $app->get('mailfrom'); $doc->link = JRoute::_('index.php?option=com_content&view=featured'); // Get some data from the model $app->input->set('limit', $app->get('feed_limit')); $categories = JCategories::getInstance('Content'); $rows = $this->get('Items'); 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 = ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language); $description = ''; $obj = json_decode($row->images); $introImage = isset($obj->{'image_intro'}) ? $obj->{'image_intro'} : ''; if (isset($introImage) && ($introImage != '')) { $image = preg_match('/http/', $introImage) ? $introImage : JURI::root() . $introImage; $description = '<p><img src="' . $image . '" /></p>'; } $description .= ($params->get('feed_summary', 0) ? $row->introtext . $row->fulltext : $row->introtext); $author = $row->created_by_alias ?: $row->author; // Load individual item creator class $item = new JFeedItem; $item->title = $title; $item->link = \JRoute::_($link); $item->date = $row->publish_up; $item->category = array(); // All featured articles are categorized as "Featured" $item->category[] = JText::_('JFEATURED'); for ($item_category = $categories->get($row->catid); $item_category !== null; $item_category = $item_category->getParent()) { // Only add non-root categories if ($item_category->id > 1) { $item->category[] = $item_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) { $link = \JRoute::_($link, true, $app->get('force_ssl') == 2 ? \JRoute::TLS_FORCE : \JRoute::TLS_IGNORE, true); $description .= '<p class="feed-readmore"><a target="_blank" href="' . $link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>'; } // Load item description and add div $item->description = '<div class="feed-description">' . $description . '</div>'; // Loads item info into rss array $doc->addItem($item); } } } home/wuectly/www/components/com_content/views/category/view.feed.php 0000604 00000004264 15245556244 0022066 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Content component * * @since 1.5 */ class ContentViewCategory extends JViewCategoryfeed { /** * @var string The name of the view to link individual items to * @since 3.2 */ protected $viewName = 'article'; /** * Method to reconcile non standard names from components to usage in this class. * Typically overridden in the component feed view class. * * @param object $item The item for a feed, an element of the $items array. * * @return void * * @since 3.2 */ protected function reconcileNames($item) { // Get description, intro_image, author and date $app = JFactory::getApplication(); $params = $app->getParams(); $item->description = ''; $obj = json_decode($item->images); $introImage = isset($obj->{'image_intro'}) ? $obj->{'image_intro'} : ''; if (isset($introImage) && ($introImage != '')) { $image = preg_match('/http/', $introImage) ? $introImage : JURI::root() . $introImage; $item->description = '<p><img src="' . $image . '" /></p>'; } $item->description .= ($params->get('feed_summary', 0) ? $item->introtext . $item->fulltext : $item->introtext); // Add readmore link to description if introtext is shown, show_readmore is true and fulltext exists if (!$item->params->get('feed_summary', 0) && $item->params->get('feed_show_readmore', 0) && $item->fulltext) { // Compute the article slug $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; // URL link to article $link = JRoute::_( ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language), true, $app->get('force_ssl') == 2 ? \JRoute::TLS_FORCE : \JRoute::TLS_IGNORE, true ); $item->description .= '<p class="feed-readmore"><a target="_blank" href="' . $link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>'; } $item->author = $item->created_by_alias ?: $item->author; } } home/wuectly/www/components/com_contact/views/category/view.feed.php 0000604 00000001622 15245570255 0022040 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Contact component * * @since 1.5 */ class ContactViewCategory extends JViewCategoryfeed { /** * @var string The name of the view to link individual items to * @since 3.2 */ protected $viewName = 'contact'; /** * Method to reconcile non standard names from components to usage in this class. * Typically overridden in the component feed view class. * * @param object $item The item for a feed, an element of the $items array. * * @return void * * @since 3.2 */ protected function reconcileNames($item) { parent::reconcileNames($item); $item->description = $item->address; } } home/wuectly/www/components/com_acymailing/views/archive/view.feed.php 0000604 00000005730 15245570651 0022332 0 ustar 00 <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php jimport( 'joomla.application.component.view'); class archiveViewArchive extends acymailingView { function display($tpl = null){ $doc = JFactory::getDocument(); $menu = acymailing_getMenu(); if (is_object( $menu )) { $menuparams = new acyParameter( $menu->params ); } $listid = acymailing_getCID('listid'); if(empty($listid) AND !empty($menuparams)){ $listid = $menuparams->get('listid'); } $doc->link = acymailing_completeLink('archive&listid='.intval($listid)); $listClass = acymailing_get('class.list'); if(empty($listid)){ return acymailing_raiseError(E_ERROR, 404, 'Mailing List not found' ); } $oneList = $listClass->get($listid); if(empty($oneList->listid)){ return acymailing_raiseError(E_ERROR, 404, 'Mailing List not found : '.$listid ); } if(!acymailing_isAllowed($oneList->access_sub) || !$oneList->published || !$oneList->visible){ return acymailing_raiseError(E_ERROR, 404, acymailing_translation('ACY_NOTALLOWED') ); } $config = acymailing_config(); $filters = array(); $filters[] = 'a.type = \'news\''; $filters[] = 'a.published = 1'; $filters[] = 'a.visible = 1'; $filters[] = 'c.listid = '.$oneList->listid; $query = 'SELECT a.*'; $query .= ' FROM '.acymailing_table('listmail').' as c'; $query .= ' LEFT JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid '; $query .= ' WHERE ('.implode(') AND (',$filters).')'; $query .= ' ORDER BY a.'.$config->get('acyrss_order','senddate').' '.($config->get('acyrss_order','senddate') == 'subject' ? 'ASC' : 'DESC'); $query .= ' LIMIT '.$config->get('acyrss_element','20'); $rows = acymailing_loadObjectList($query); $doc->title = $config->get('acyrss_name',''); $doc->description = $config->get('acyrss_description',''); $receiver = new stdClass(); $receiver->name = acymailing_translation('VISITOR'); $receiver->subid = 0; $mailClass = acymailing_get('helper.mailer'); foreach ( $rows as $row ) { $mailClass->loadedToSend = false; $oneMail = $mailClass->load($row->mailid); $oneMail->sendHTML = true; acymailing_trigger('acymailing_replaceusertags', array(&$oneMail, &$receiver, false)); $title = $this->escape( $oneMail->subject ); $title = html_entity_decode( $title ); $link = acymailing_route('index.php?option=com_acymailing&ctrl=archive&task=view&listid='.$oneList->listid.'-'.$oneList->alias.'&mailid='.$row->mailid.'-'.$row->alias); $author = $oneMail->userid; $item = new JFeedItem(); $item->title = $title; $item->link = $link; $item->description = $oneMail->body; $item->date = $oneMail->created; $item->category = $oneMail->type; $item->author = $author; $doc->addItem( $item ); } } } home/wuectly/www/components/com_acymailing/views/lists/view.feed.php 0000604 00000005710 15245570667 0022054 0 ustar 00 <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php class listsViewlists extends acymailingView { function display($tpl = null){ global $Itemid; $doc = JFactory::getDocument(); $feedEmail = (@acymailing_getCMSConfig('feed_email')) ? acymailing_getCMSConfig('feed_email') : 'author'; $siteEmail = acymailing_getCMSConfig('mailfrom'); $menu = acymailing_getMenu(); $listed = array(); $myItem = empty($Itemid) ? '' : '&Itemid='.$Itemid; $selectedLists = 'all'; if (is_object( $menu )) { $menuparams = new acyParameter( $menu->params ); $selectedLists = $menuparams->get('lists','all'); } $listsClass = acymailing_get('class.list'); $allLists = $listsClass->getLists('listid',$selectedLists); foreach($allLists as $oneList){ if($oneList->published && $oneList->visible && acymailing_isAllowed($oneList->access_sub)){ $listed[] = $oneList->listid; } } $config = acymailing_config(); $filters = array(); $filters[] = 'a.type = \'news\''; $filters[] = 'a.published = 1'; $filters[] = 'a.visible = 1'; $filters[] = 'c.listid IN ('.implode(',',$listed).')'; $query = 'SELECT a.*,c.listid'; $query .= ' FROM '.acymailing_table('listmail').' as c'; $query .= ' LEFT JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid '; $query .= ' WHERE ('.implode(') AND (',$filters).')'; $query .= ' GROUP BY a.mailid ORDER BY a.'.$config->get('acyrss_order','senddate').' '.($config->get('acyrss_order','senddate') == 'subject' ? 'ASC' : 'DESC'); $query .= ' LIMIT '.$config->get('acyrss_element','20'); $rows = acymailing_loadObjectList($query); $doc->title = $config->get('acyrss_name',''); $doc->description = $config->get('acyrss_description',''); $receiver = new stdClass(); $receiver->name = acymailing_translation('VISITOR'); $receiver->subid = 0; $mailClass = acymailing_get('helper.mailer'); $mailClass->loadedToSend = false; foreach ( $rows as $row ) { $oneMail = $mailClass->load($row->mailid); $oneMail->sendHTML = true; acymailing_trigger('acymailing_replaceusertags', array(&$oneMail, &$receiver, false)); $title = $this->escape( $oneMail->subject ); $title = html_entity_decode( $title ); $oneList = $allLists[$row->listid]; $link = acymailing_route('index.php?option=com_acymailing&ctrl=archive&task=view&listid='.$oneList->listid.'-'.$oneList->alias.'&mailid='.$row->mailid.'-'.$row->alias); $description = $oneMail->body; $author = $oneMail->userid; $item = new JFeedItem(); $item->title = $title; $item->link = $link; $item->description = $description; $item->date = acymailing_getDate($oneMail->senddate,'%Y-%m-%d %H:%M:%S'); $item->category = acymailing_translation('NEWSLETTER'); $doc->addItem( $item ); } } } home/wuectly/www/components/com_tags/views/tags/view.feed.php 0000604 00000004267 15245617417 0020476 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_tags * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Tags component all tags view * * @since 3.1 */ class TagsViewTags extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); $document->link = JRoute::_('index.php?option=com_tags&view=tags'); $app->input->set('limit', $app->get('feed_limit')); $siteEmail = $app->get('mailfrom'); $fromName = $app->get('fromname'); $feedEmail = $app->get('feed_email', 'none'); $document->editor = $fromName; if ($feedEmail !== 'none') { $document->editorEmail = $siteEmail; } // Get some data from the model $items = $this->get('Items'); foreach ($items as $item) { // Strip HTML from feed item title $title = $this->escape($item->title); $title = html_entity_decode($title, ENT_COMPAT, 'UTF-8'); // Strip HTML from feed item description text $description = $item->description; $author = $item->created_by_alias ?: $item->created_by_user_name; $date = $item->created_time ? date('r', strtotime($item->created_time)) : ''; // Load individual item creator class $feeditem = new JFeedItem; $feeditem->title = $title; $feeditem->link = '/index.php?option=com_tags&view=tag&id=' . (int) $item->id; $feeditem->description = $description; $feeditem->date = $date; $feeditem->category = 'All Tags'; $feeditem->author = $author; if ($feedEmail === 'site') { $feeditem->authorEmail = $siteEmail; } if ($feedEmail === 'author') { $feeditem->authorEmail = $item->email; } // Loads item info into RSS array $document->addItem($feeditem); } } } home/wuectly/www/components/com_finder/views/search/view.feed.php 0000604 00000005167 15245657632 0021321 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Search feed view class for the Finder package. * * @since 2.5 */ class FinderViewSearch extends JViewLegacy { /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { // Get the application $app = JFactory::getApplication(); // Adjust the list limit to the feed limit. $app->input->set('limit', $app->get('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'); $explained = JHtml::_('query.explained', $query); // Set the document title. $title = $params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('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; // Use Unix date to cope for non-english languages $item->date = (int) $result->start_date ? JHtml::_('date', $result->start_date, 'U') : $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/wuectly/www/components/com_icagenda/views/list/view.feed.php 0000604 00000004320 15245705154 0021272 0 ustar 00 <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.4.1 2015-01-14 * @since 3.3.8 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); /** * HTML View class - iCagenda - RSS Feeds. */ class icagendaViewList extends JViewLegacy { function display($cachable = false, $urlparams = false) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); $menuItem = $app->getMenu()->getActive(); if (is_object($menuItem)) { $mcatid = $menuItem->params->get('mcatid', ''); $filter_category = !is_array($mcatid) ? array($mcatid) : $mcatid; } else { $filter_category = ''; } $items = $this->get('Records'); // $Itemid = $app->input->getInt('Itemid'); $Itemid = JRequest::getInt('Itemid'); foreach ($items as $item) { if ( !in_array('', $filter_category) && !in_array('0', $filter_category) && in_array($item->catid, $filter_category) || in_array('', $filter_category) || in_array('0', $filter_category) ) { // Load individual item creator class. $feeditem = new JFeedItem; $feeditem->title = $item->title . ' (' . $item->category . ')'; $feeditem->link = JROUTE::_('index.php?option=com_icagenda&view=list&layout=event&Itemid='. (int) $Itemid .'&id='. (int) $item->id . ':' . $item->alias); $feeditem->image = icagendaThumb::sizeMedium($item->image); $feeditem->description = '<img src="' . $feeditem->image . '" alt="" style="margin: 5px; float: left;">' . $item->desc; $feeditem->date = $item->next; $feeditem->category = $item->category; // Loads item information into RSS array $document->addItem($feeditem); } } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка