File manager - Edit - /home/opticamezl/www/newok/Category.zip
Back
PK �\��y�� � FeedView.phpnu �[��� <?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 */ namespace Joomla\Component\Content\Site\View\Category; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\CategoryFeedView; use Joomla\CMS\Router\Route; use Joomla\Component\Content\Site\Helper\RouteHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * HTML View class for the Content component * * @since 1.5 */ class FeedView extends CategoryFeedView { /** * @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 = Factory::getApplication(); $params = $app->getParams(); $item->description = ''; $obj = json_decode($item->images); if (!empty($obj->image_intro)) { $item->description = '<p>' . HTMLHelper::_('image', $obj->image_intro, $obj->image_intro_alt) . '</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 = Route::_( RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language), true, $app->get('force_ssl') == 2 ? Route::TLS_FORCE : Route::TLS_IGNORE, true ); $item->description .= '<p class="feed-readmore"><a target="_blank" href="' . $link . '" rel="noopener">' . Text::_('COM_CONTENT_FEED_READMORE') . '</a></p>'; } $item->author = $item->created_by_alias ?: $item->author; } } PK �\�g�T HtmlView.phpnu �[��� <?php /** * @package Joomla.Site * @subpackage com_newsfeeds * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Newsfeeds\Site\View\Category; use Joomla\CMS\MVC\View\CategoryView; use Joomla\Component\Newsfeeds\Site\Helper\RouteHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * HTML View class for the Newsfeeds component * * @since 1.0 */ class HtmlView extends CategoryView { /** * @var string Default title to use for page title * @since 3.2 */ protected $defaultPageTitle = 'COM_NEWSFEEDS_DEFAULT_PAGE_TITLE'; /** * @var string The name of the extension for the category * @since 3.2 */ protected $extension = 'com_newsfeeds'; /** * @var string The name of the view to link individual items to * @since 3.2 */ protected $viewName = 'newsfeed'; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $this->commonCategoryDisplay(); // Flag indicates to not add limitstart=0 to URL $this->pagination->hideEmptyLimitstart = true; // Prepare the data. // Compute the newsfeed slug. foreach ($this->items as $item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $temp = $item->params; $item->params = clone $this->params; $item->params->merge($temp); } parent::display($tpl); } /** * Prepares the document * * @return void */ protected function prepareDocument() { parent::prepareDocument(); $menu = $this->menu; $id = (int) @$menu->query['id']; if ( $menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $this->category->id) ) { $path = [['title' => $this->category->title, 'link' => '']]; $category = $this->category->getParent(); while ( isset($category->id) && $category->id > 1 && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $category->id) ) { $path[] = ['title' => $category->title, 'link' => RouteHelper::getCategoryRoute($category->id, $category->language)]; $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $this->pathway->addItem($item['title'], $item['link']); } } } } PK �\��y�� � FeedView.phpnu �[��� PK �\�g�T � HtmlView.phpnu �[��� PK �
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings