Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/featured.tar
Назад
tmpl/default.xml 0000604 00000034104 15245536017 0007674 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE" option="COM_CONTENT_FEATURED_VIEW_DEFAULT_OPTION"> <help key = "JHELP_MENUS_MENU_ITEM_ARTICLE_FEATURED" /> <message> <![CDATA[COM_CONTENT_CATEGORY_VIEW_FEATURED_DESC]]> </message> </layout> <!-- Add fields to the parameters object for the layout. --> <fields name="params"> <fieldset name="advanced" label="COM_MENUS_LAYOUT_FEATURED_OPTIONS"> <field name="featured_categories" type="category" label="COM_CONTENT_FEATURED_CATEGORIES_LABEL" description="COM_CONTENT_FEATURED_CATEGORIES_DESC" extension="com_content" multiple="true" size="10" default="" > <option value="">JOPTION_ALL_CATEGORIES</option> </field> <field name="layout_type" type="hidden" default="blog" /> <field name="bloglayout" type="spacer" label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL" class="text" /> <field name="num_leading_articles" type="number" label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL" description="JGLOBAL_NUM_LEADING_ARTICLES_DESC" useglobal="true" size="3" /> <field name="num_intro_articles" type="number" label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL" description="JGLOBAL_NUM_INTRO_ARTICLES_DESC" useglobal="true" size="3" /> <field name="num_columns" type="number" label="JGLOBAL_NUM_COLUMNS_LABEL" description="JGLOBAL_NUM_COLUMNS_DESC" useglobal="true" size="3" /> <field name="num_links" type="number" label="JGLOBAL_NUM_LINKS_LABEL" description="JGLOBAL_NUM_LINKS_DESC" useglobal="true" size="3" /> <field name="multi_column_order" type="list" label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL" description="JGLOBAL_MULTI_COLUMN_ORDER_DESC" useglobal="true" > <option value="0">JGLOBAL_Down</option> <option value="1">JGLOBAL_Across</option> </field> <field name="orderby_pri" type="list" label="JGLOBAL_CATEGORY_ORDER_LABEL" description="JGLOBAL_CATEGORY_ORDER_DESC" useglobal="true" > <option value="none">JGLOBAL_No_Order</option> <option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option> <option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option> <option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option> </field> <field name="orderby_sec" type="list" label="JGLOBAL_ARTICLE_ORDER_LABEL" description="JGLOBAL_ARTICLE_ORDER_DESC" useglobal="true" > <option value="front">COM_CONTENT_FEATURED_ORDER</option> <option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option> <option value="date">JGLOBAL_OLDEST_FIRST</option> <option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option> <option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option> <option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option> <option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option> <option value="hits">JGLOBAL_MOST_HITS</option> <option value="rhits">JGLOBAL_LEAST_HITS</option> <option value="random">JGLOBAL_RANDOM_ORDER</option> <option value="order">JGLOBAL_ORDERING</option> <option value="rorder">JGLOBAL_REVERSE_ORDERING</option> <option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option> <option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option> <option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option> <option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option> </field> <field name="order_date" type="list" label="JGLOBAL_ORDERING_DATE_LABEL" description="JGLOBAL_ORDERING_DATE_DESC" useglobal="true" > <option value="created">JGLOBAL_CREATED</option> <option value="modified">JGLOBAL_MODIFIED</option> <option value="published">JPUBLISHED</option> </field> <field name="show_pagination" type="list" label="JGLOBAL_PAGINATION_LABEL" description="JGLOBAL_PAGINATION_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> <option value="2">JGLOBAL_AUTO</option> </field> <field name="show_pagination_results" type="list" label="JGLOBAL_PAGINATION_RESULTS_LABEL" description="JGLOBAL_PAGINATION_RESULTS_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="page_subheading" type="text" label="JGLOBAL_SUBHEADING_LABEL" description="JGLOBAL_SUBHEADING_DESC" size="20" /> </fieldset> <fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"> <field name="show_title" type="list" label="JGLOBAL_SHOW_TITLE_LABEL" description="JGLOBAL_SHOW_TITLE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="link_titles" type="list" label="JGLOBAL_LINKED_TITLES_LABEL" description="JGLOBAL_LINKED_TITLES_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="show_intro" type="list" label="JGLOBAL_SHOW_INTRO_LABEL" description="JGLOBAL_SHOW_INTRO_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="info_block_position" type="list" label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL" description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC" default="" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option> <option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option> <option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option> </field> <field name="info_block_show_title" type="list" label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL" description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_category" type="list" label="JGLOBAL_SHOW_CATEGORY_LABEL" description="JGLOBAL_SHOW_CATEGORY_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="link_category" type="list" label="JGLOBAL_LINK_CATEGORY_LABEL" description="JGLOBAL_LINK_CATEGORY_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="show_parent_category" type="list" label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL" description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="link_parent_category" type="list" label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL" description="JGLOBAL_LINK_PARENT_CATEGORY_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="show_associations" type="list" label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL" description="JGLOBAL_SHOW_ASSOCIATIONS_DESC" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_author" type="list" label="JGLOBAL_SHOW_AUTHOR_LABEL" description="JGLOBAL_SHOW_AUTHOR_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="link_author" type="list" label="JGLOBAL_LINK_AUTHOR_LABEL" description="JGLOBAL_LINK_AUTHOR_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="show_create_date" type="list" label="JGLOBAL_SHOW_CREATE_DATE_LABEL" description="JGLOBAL_SHOW_CREATE_DATE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_modify_date" type="list" label="JGLOBAL_SHOW_MODIFY_DATE_LABEL" description="JGLOBAL_SHOW_MODIFY_DATE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_publish_date" type="list" label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL" description="JGLOBAL_SHOW_PUBLISH_DATE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_item_navigation" type="list" label="JGLOBAL_SHOW_NAVIGATION_LABEL" description="JGLOBAL_SHOW_NAVIGATION_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_vote" type="list" label="JGLOBAL_SHOW_VOTE_LABEL" description="JGLOBAL_SHOW_VOTE_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_readmore" type="list" label="JGLOBAL_SHOW_READMORE_LABEL" description="JGLOBAL_SHOW_READMORE_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_readmore_title" type="list" label="JGLOBAL_SHOW_READMORE_TITLE_LABEL" description="JGLOBAL_SHOW_READMORE_TITLE_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_icons" type="list" label="JGLOBAL_SHOW_ICONS_LABEL" description="JGLOBAL_SHOW_ICONS_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_print_icon" type="list" label="JGLOBAL_SHOW_PRINT_ICON_LABEL" description="JGLOBAL_SHOW_PRINT_ICON_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_email_icon" type="list" label="JGLOBAL_SHOW_EMAIL_ICON_LABEL" description="JGLOBAL_SHOW_EMAIL_ICON_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_hits" type="list" label="JGLOBAL_SHOW_HITS_LABEL" description="JGLOBAL_SHOW_HITS_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_tags" type="list" label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL" description="COM_CONTENT_FIELD_SHOW_TAGS_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_noauth" type="list" label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL" description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC" useglobal="true" class="chzn-color" > <option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> </fieldset> <fieldset name="integration" label="COM_MENUS_INTEGRATION_FIELDSET_LABEL"> <field name="show_feed_link" type="list" label="JGLOBAL_SHOW_FEED_LINK_LABEL" description="JGLOBAL_SHOW_FEED_LINK_DESC" useglobal="true" class="chzn-color" > <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="feed_summary" type="list" label="JGLOBAL_FEED_SUMMARY_LABEL" description="JGLOBAL_FEED_SUMMARY_DESC" useglobal="true" > <option value="0">JGLOBAL_INTRO_TEXT</option> <option value="1">JGLOBAL_FULL_TEXT</option> </field> </fieldset> </fields> </metadata> tmpl/default.php 0000604 00000005655 15245536017 0007674 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; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); JHtml::_('behavior.caption'); // If the page class is defined, add to class as suffix. // It will be a separate class if the user starts it with a space ?> <div class="blog-featured<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Blog"> <?php if ($this->params->get('show_page_heading') != 0) : ?> <div class="page-header"> <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> </div> <?php endif; ?> <?php if ($this->params->get('page_subheading')) : ?> <h2> <?php echo $this->escape($this->params->get('page_subheading')); ?> </h2> <?php endif; ?> <?php $leadingcount = 0; ?> <?php if (!empty($this->lead_items)) : ?> <div class="items-leading clearfix"> <?php foreach ($this->lead_items as &$item) : ?> <div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?> clearfix" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting"> <?php $this->item = &$item; echo $this->loadTemplate('item'); ?> </div> <?php $leadingcount++; ?> <?php endforeach; ?> </div> <?php endif; ?> <?php $introcount = count($this->intro_items); $counter = 0; ?> <?php if (!empty($this->intro_items)) : ?> <?php foreach ($this->intro_items as $key => &$item) : ?> <?php $key = ($key - $leadingcount) + 1; $rowcount = (((int) $key - 1) % (int) $this->columns) + 1; $row = $counter / $this->columns; if ($rowcount === 1) : ?> <div class="items-row cols-<?php echo (int) $this->columns; ?> <?php echo 'row-' . $row; ?> row-fluid"> <?php endif; ?> <div class="item column-<?php echo $rowcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?> span<?php echo round(12 / $this->columns); ?>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting"> <?php $this->item = &$item; echo $this->loadTemplate('item'); ?> </div> <?php $counter++; ?> <?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?> </div> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php if (!empty($this->link_items)) : ?> <div class="items-more"> <?php echo $this->loadTemplate('links'); ?> </div> <?php endif; ?> <?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?> <div class="pagination"> <?php if ($this->params->def('show_pagination_results', 1)) : ?> <p class="counter pull-right"> <?php echo $this->pagination->getPagesCounter(); ?> </p> <?php endif; ?> <?php echo $this->pagination->getPagesLinks(); ?> </div> <?php endif; ?> </div> tmpl/default_item.php 0000604 00000011460 15245536017 0010701 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; // Create a shortcut for params. $params = &$this->item->params; $canEdit = $this->item->params->get('access-edit'); $info = $this->item->params->get('info_block_position', 0); // Check if associations are implemented. If they are, define the parameter. $assocParam = (JLanguageAssociations::isEnabled() && $params->get('show_associations')); $currentDate = JFactory::getDate()->format('Y-m-d H:i:s'); $isExpired = $this->item->publish_down < $currentDate && $this->item->publish_down !== JFactory::getDbo()->getNullDate(); $isNotPublishedYet = $this->item->publish_up > $currentDate; $isUnpublished = $this->item->state == 0 || $isNotPublishedYet || $isExpired; ?> <?php if ($isUnpublished) : ?> <div class="system-unpublished"> <?php endif; ?> <?php if ($params->get('show_title')) : ?> <h2 class="item-title" itemprop="headline"> <?php if ($params->get('link_titles') && $params->get('access-view')) : ?> <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url"> <?php echo $this->escape($this->item->title); ?> </a> <?php else : ?> <?php echo $this->escape($this->item->title); ?> <?php endif; ?> </h2> <?php endif; ?> <?php if ($this->item->state == 0) : ?> <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span> <?php endif; ?> <?php if ($isNotPublishedYet) : ?> <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span> <?php endif; ?> <?php if ($isExpired) : ?> <span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span> <?php endif; ?> <?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?> <?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?> <?php endif; ?> <?php // Content is generated by content plugin event "onContentAfterTitle" ?> <?php echo $this->item->event->afterDisplayTitle; ?> <?php // Todo Not that elegant would be nice to group the params ?> <?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?> <?php if ($useDefList && ($info == 0 || $info == 2)) : ?> <?php // Todo: for Joomla4 joomla.content.info_block.block can be changed to joomla.content.info_block ?> <?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'above')); ?> <?php endif; ?> <?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> <?php echo JLayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?> <?php endif; ?> <?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?> <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?> <?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $this->item->introtext; ?> <?php if ($info == 1 || $info == 2) : ?> <?php if ($useDefList) : ?> <?php // Todo: for Joomla4 joomla.content.info_block.block can be changed to joomla.content.info_block ?> <?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?> <?php endif; ?> <?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> <?php echo JLayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?> <?php endif; ?> <?php endif; ?> <?php if ($params->get('show_readmore') && $this->item->readmore) : if ($params->get('access-view')) : $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); else : $menu = JFactory::getApplication()->getMenu(); $active = $menu->getActive(); $itemId = $active->id; $link = new JUri(JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); $link->setVar('return', base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); endif; ?> <?php echo JLayoutHelper::render('joomla.content.readmore', array('item' => $this->item, 'params' => $params, 'link' => $link)); ?> <?php endif; ?> <?php if ($isUnpublished) : ?> </div> <?php endif; ?> <?php // Content is generated by content plugin event "onContentAfterDisplay" ?> <?php echo $this->item->event->afterDisplayContent; ?> tmpl/default_links.php 0000604 00000001033 15245536017 0011056 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; ?> <ol class="nav nav-tabs nav-stacked"> <?php foreach ($this->link_items as &$item) : ?> <li> <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); ?>"> <?php echo $item->title; ?></a> </li> <?php endforeach; ?> </ol> view.feed.php 0000604 00000006620 15245536017 0007141 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); } } } view.html.php 0000604 00000014344 15245536017 0007204 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 { protected $state = null; protected $item = null; protected $items = null; protected $pagination = null; protected $lead_items = array(); protected $intro_items = array(); protected $link_items = array(); /** @deprecated 4.0 */ protected $columns = 1; /** * An instance of JDatabaseDriver. * * @var JDatabaseDriver * @since 3.6.3 */ protected $db; /** * 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) { $user = JFactory::getUser(); $state = $this->get('State'); $items = $this->get('Items'); $pagination = $this->get('Pagination'); // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $params = &$state->params; // PREPARE THE DATA // Get the metrics for the structural page layout. $numLeading = (int) $params->def('num_leading_articles', 1); $numIntro = (int) $params->def('num_intro_articles', 4); JPluginHelper::importPlugin('content'); // Compute the article slugs and prepare introtext (runs content plugins). foreach ($items as &$item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias === 'root') { $item->parent_slug = null; } $item->event = new stdClass; $dispatcher = JEventDispatcher::getInstance(); // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } $dispatcher->trigger('onContentPrepare', array ('com_content.featured', &$item, &$item->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } // Preprocess the breakdown of leading, intro and linked articles. // This makes it much easier for the designer to just interogate the arrays. $max = count($items); // The first group is the leading articles. $limit = $numLeading; for ($i = 0; $i < $limit && $i < $max; $i++) { $this->lead_items[$i] = &$items[$i]; } // The second group is the intro articles. $limit = $numLeading + $numIntro; // Order articles across, then down (or single column mode) for ($i = $numLeading; $i < $limit && $i < $max; $i++) { $this->intro_items[$i] = &$items[$i]; } $this->columns = max(1, $params->def('num_columns', 1)); $order = $params->def('multi_column_order', 1); if ($order == 0 && $this->columns > 1) { // Call order down helper $this->intro_items = ContentHelperQuery::orderDownColumns($this->intro_items, $this->columns); } // The remainder are the links. for ($i = $numLeading + $numIntro; $i < $max; $i++) { $this->link_items[$i] = &$items[$i]; } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->params = &$params; $this->items = &$items; $this->pagination = &$pagination; $this->user = &$user; $this->db = JFactory::getDbo(); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->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); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed links if ($this->params->get('show_feed_link', 1)) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка