You've already forked joomla_test
first commit
This commit is contained in:
1
components/com_content/views/archive/index.html
Normal file
1
components/com_content/views/archive/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
6
components/com_content/views/archive/metadata.xml
Normal file
6
components/com_content/views/archive/metadata.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view title="Archive">
|
||||
<message><![CDATA[TYPEARCHLAYDESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
45
components/com_content/views/archive/tmpl/default.php
Normal file
45
components/com_content/views/archive/tmpl/default.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
JHtml::_('behavior.caption');
|
||||
?>
|
||||
<div class="archive<?php echo $this->pageclass_sfx;?>">
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form id="adminForm" action="<?php echo JRoute::_('index.php')?>" method="post" class="form-inline">
|
||||
<fieldset class="filters">
|
||||
<div class="filter-search alert alert-info">
|
||||
<?php if ($this->params->get('filter_field') != 'hide') : ?>
|
||||
<label class="filter-search-lbl" for="filter-search"><?php echo JText::_('COM_CONTENT_'.$this->params->get('filter_field').'_FILTER_LABEL').' '; ?></label>
|
||||
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->filter); ?>" class="inputbox span2" onchange="document.getElementById('adminForm').submit();" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->form->monthField; ?>
|
||||
<?php echo $this->form->yearField; ?>
|
||||
<?php echo $this->form->limitField; ?>
|
||||
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><?php echo JText::_('JGLOBAL_FILTER_BUTTON'); ?></button>
|
||||
<input type="hidden" name="view" value="archive" />
|
||||
<input type="hidden" name="option" value="com_content" />
|
||||
<input type="hidden" name="limitstart" value="0" />
|
||||
</fieldset>
|
||||
|
||||
<?php echo $this->loadTemplate('items'); ?>
|
||||
</form>
|
||||
</div>
|
221
components/com_content/views/archive/tmpl/default.xml
Normal file
221
components/com_content/views/archive/tmpl/default.xml
Normal file
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="com_content_archive_view_default_title" option="com_content_archive_view_default_option">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_ARCHIVED"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[com_content_archive_view_default_desc]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
|
||||
<!-- Basic options. -->
|
||||
<fieldset name="basic" label="JGLOBAL_ARCHIVE_OPTIONS"
|
||||
>
|
||||
|
||||
<field name="orderby_sec" type="list"
|
||||
default="alpha"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="date">JGLOBAL_OLDEST_FIRST</option>
|
||||
<option value="rdate">JGLOBAL_MOST_RECENT_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="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
default="created"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="created">JGLOBAL_Created</option>
|
||||
<option value="modified">JGLOBAL_Modified</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="display_num" type="list"
|
||||
default="5"
|
||||
description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
|
||||
label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
|
||||
>
|
||||
<option value="5">J5</option>
|
||||
<option value="10">J10</option>
|
||||
<option value="15">J15</option>
|
||||
<option value="20">J20</option>
|
||||
<option value="25">J25</option>
|
||||
<option value="30">J30</option>
|
||||
<option value="50">J50</option>
|
||||
<option value="100">J100</option>
|
||||
<option value="0">JALL</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="filter_field"
|
||||
type="list"
|
||||
default=""
|
||||
description="JGLOBAL_FILTER_FIELD_DESC"
|
||||
label="JGLOBAL_FILTER_FIELD_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="hide">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="introtext_limit" type="text" default="100"
|
||||
label="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL"
|
||||
description="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_DESC" />
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- Articles options. -->
|
||||
<fieldset name="articles"
|
||||
label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL"
|
||||
>
|
||||
|
||||
<field name="show_intro" type="list"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="info_block_position"
|
||||
type="list"
|
||||
default=""
|
||||
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_category" type="list"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="link_titles" type="list"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_author" type="list"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_create_date" type="list"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_modify_date" type="list"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_publish_date" type="list"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
|
||||
<field name="show_item_navigation" type="list"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_hits" type="list"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
</fields>
|
||||
</metadata>
|
190
components/com_content/views/archive/tmpl/default_items.php
Normal file
190
components/com_content/views/archive/tmpl/default_items.php
Normal file
@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
$params = $this->params;
|
||||
?>
|
||||
|
||||
<div id="archive-items">
|
||||
<?php foreach ($this->items as $i => $item) : ?>
|
||||
<?php $info = $item->params->get('info_block_position', 0); ?>
|
||||
<div class="row<?php echo $i % 2; ?>">
|
||||
<div class="page-header">
|
||||
<h2>
|
||||
<?php if ($params->get('link_titles')) : ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug)); ?>"> <?php echo $this->escape($item->title); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<?php if ($params->get('show_author') && !empty($item->author )) : ?>
|
||||
<div class="createdby">
|
||||
<?php $author = $item->author; ?>
|
||||
<?php $author = ($item->created_by_alias ? $item->created_by_alias : $author); ?>
|
||||
<?php if (!empty($item->contactid ) && $params->get('link_author') == true) : ?>
|
||||
<?php echo JText::sprintf(
|
||||
'COM_CONTENT_WRITTEN_BY',
|
||||
JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$item->contactid), $author)
|
||||
); ?>
|
||||
<?php else :?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?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')); ?>
|
||||
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
|
||||
<div class="article-info muted">
|
||||
<dl class="article-info">
|
||||
<dt class="article-info-term">
|
||||
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
|
||||
</dt>
|
||||
|
||||
<?php if ($params->get('show_parent_category') && !empty($item->parent_slug)) : ?>
|
||||
<dd>
|
||||
<div class="parent-category-name">
|
||||
<?php $title = $this->escape($item->parent_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($item->parent_slug)).'">' . $title . '</a>'; ?>
|
||||
<?php if ($params->get('link_parent_category') && !empty($item->parent_slug)) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd>
|
||||
<div class="category-name">
|
||||
<?php $title = $this->escape($item->category_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($item->catslug)).'">' . $title . '</a>'; ?>
|
||||
<?php if ($params->get('link_category') && $item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd>
|
||||
<div class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($info == 0) : ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd>
|
||||
<div class="modified">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd>
|
||||
<div class="create">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd>
|
||||
<div class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_intro')) :?>
|
||||
<div class="intro"> <?php echo JHtml::_('string.truncateComplex', $item->introtext, $params->get('introtext_limit')); ?> </div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
|
||||
<div class="article-info muted">
|
||||
<dl class="article-info">
|
||||
<dt class="article-info-term"><?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>
|
||||
|
||||
<?php if ($info == 1) : ?>
|
||||
<?php if ($params->get('show_parent_category') && !empty($item->parent_slug)) : ?>
|
||||
<dd>
|
||||
<div class="parent-category-name">
|
||||
<?php $title = $this->escape($item->parent_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($item->parent_slug)) . '">' . $title . '</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && $item->parent_slug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd>
|
||||
<div class="category-name">
|
||||
<?php $title = $this->escape($item->category_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($item->catslug)) . '">' . $title . '</a>'; ?>
|
||||
<?php if ($params->get('link_category') && $item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd>
|
||||
<div class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd>
|
||||
<div class="create"><span class="icon-calendar">
|
||||
</span> <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd>
|
||||
<div class="modified"><span class="icon-calendar">
|
||||
</span> <?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd>
|
||||
<div class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?>
|
||||
</div>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<p class="counter"> <?php echo $this->pagination->getPagesCounter(); ?> </p>
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
1
components/com_content/views/archive/tmpl/index.html
Normal file
1
components/com_content/views/archive/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
160
components/com_content/views/archive/view.html.php
Normal file
160
components/com_content/views/archive/view.html.php
Normal file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Content component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewArchive extends JViewLegacy
|
||||
{
|
||||
protected $state = null;
|
||||
|
||||
protected $item = null;
|
||||
|
||||
protected $items = null;
|
||||
|
||||
protected $pagination = null;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
|
||||
$state = $this->get('State');
|
||||
$items = $this->get('Items');
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
// Get the page/component configuration
|
||||
$params = &$state->params;
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
$form = new stdClass;
|
||||
// Month Field
|
||||
$months = array(
|
||||
'' => JText::_('COM_CONTENT_MONTH'),
|
||||
'01' => JText::_('JANUARY_SHORT'),
|
||||
'02' => JText::_('FEBRUARY_SHORT'),
|
||||
'03' => JText::_('MARCH_SHORT'),
|
||||
'04' => JText::_('APRIL_SHORT'),
|
||||
'05' => JText::_('MAY_SHORT'),
|
||||
'06' => JText::_('JUNE_SHORT'),
|
||||
'07' => JText::_('JULY_SHORT'),
|
||||
'08' => JText::_('AUGUST_SHORT'),
|
||||
'09' => JText::_('SEPTEMBER_SHORT'),
|
||||
'10' => JText::_('OCTOBER_SHORT'),
|
||||
'11' => JText::_('NOVEMBER_SHORT'),
|
||||
'12' => JText::_('DECEMBER_SHORT')
|
||||
);
|
||||
$form->monthField = JHtml::_(
|
||||
'select.genericlist',
|
||||
$months,
|
||||
'month',
|
||||
array(
|
||||
'list.attr' => 'size="1" class="inputbox"',
|
||||
'list.select' => $state->get('filter.month'),
|
||||
'option.key' => null
|
||||
)
|
||||
);
|
||||
// Year Field
|
||||
$years = array();
|
||||
$years[] = JHtml::_('select.option', null, JText::_('JYEAR'));
|
||||
for ($i = 2000; $i <= 2020; $i++)
|
||||
{
|
||||
$years[] = JHtml::_('select.option', $i, $i);
|
||||
}
|
||||
$form->yearField = JHtml::_(
|
||||
'select.genericlist',
|
||||
$years,
|
||||
'year',
|
||||
array('list.attr' => 'size="1" class="inputbox"', 'list.select' => $state->get('filter.year'))
|
||||
);
|
||||
$form->limitField = $pagination->getLimitBox();
|
||||
|
||||
//Escape strings for HTML output
|
||||
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
|
||||
|
||||
$this->filter = $state->get('list.filter');
|
||||
$this->form = &$form;
|
||||
$this->items = &$items;
|
||||
$this->params = &$params;
|
||||
$this->user = &$user;
|
||||
$this->pagination = &$pagination;
|
||||
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
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->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);
|
||||
|
||||
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'));
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/article/index.html
Normal file
1
components/com_content/views/article/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
7
components/com_content/views/article/metadata.xml
Normal file
7
components/com_content/views/article/metadata.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view
|
||||
title="Article">
|
||||
<message><![CDATA[TYPEARTICLAYDESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
294
components/com_content/views/article/tmpl/default.php
Normal file
294
components/com_content/views/article/tmpl/default.php
Normal file
@ -0,0 +1,294 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
$images = json_decode($this->item->images);
|
||||
$urls = json_decode($this->item->urls);
|
||||
$canEdit = $params->get('access-edit');
|
||||
$user = JFactory::getUser();
|
||||
$info = $params->get('info_block_position', 0);
|
||||
JHtml::_('behavior.caption');
|
||||
|
||||
?>
|
||||
<div class="item-page<?php echo $this->pageclass_sfx?>">
|
||||
<?php if ($this->params->get('show_page_heading') && $params->get('show_title')) : ?>
|
||||
<div class="page-header">
|
||||
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
|
||||
</div>
|
||||
<?php endif;
|
||||
if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative)
|
||||
{
|
||||
echo $this->item->pagination;
|
||||
}
|
||||
?>
|
||||
<?php if ($params->get('show_title') || $params->get('show_author')) : ?>
|
||||
<div class="page-header">
|
||||
<h2>
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_title')) : ?>
|
||||
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
|
||||
<a href="<?php echo $this->item->readmore_link; ?>"> <?php echo $this->escape($this->item->title); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($this->item->title); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!$this->print) : ?>
|
||||
<?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span class="icon-cog"></span> <span class="caret"></span> </a>
|
||||
<?php // Note the actions class is deprecated. Use dropdown-menu instead. ?>
|
||||
<ul class="dropdown-menu actions">
|
||||
<?php if ($params->get('show_print_icon')) : ?>
|
||||
<li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_email_icon')) : ?>
|
||||
<li class="email-icon"> <?php echo JHtml::_('icon.email', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<div class="pull-right">
|
||||
<?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?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')); ?>
|
||||
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
|
||||
<div class="article-info muted">
|
||||
<dl class="article-info">
|
||||
<dt class="article-info-term"><?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>
|
||||
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?>
|
||||
<?php else: ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)) . '">' . $title . '</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($info == 0) : ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags)) : ?>
|
||||
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
|
||||
|
||||
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$params->get('show_intro')) : echo $this->item->event->afterDisplayTitle; endif; ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?>
|
||||
|
||||
<?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == '0')) || ($params->get('urls_position') == '0' && empty($urls->urls_position)))
|
||||
|| (empty($urls->urls_position) && (!$params->get('urls_position')))) : ?>
|
||||
<?php echo $this->loadTemplate('links'); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('access-view')):?>
|
||||
<?php if (isset($images->image_fulltext) && !empty($images->image_fulltext)) : ?>
|
||||
<?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?>
|
||||
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
|
||||
<?php if ($images->image_fulltext_caption):
|
||||
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) . '"';
|
||||
endif; ?>
|
||||
src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/> </div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && !$this->item->paginationrelative):
|
||||
echo $this->item->pagination;
|
||||
endif;
|
||||
?>
|
||||
<?php if (isset ($this->item->toc)) :
|
||||
echo $this->item->toc;
|
||||
endif; ?>
|
||||
<?php echo $this->item->text; ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
|
||||
<div class="article-info muted">
|
||||
<dl class="article-info">
|
||||
<dt class="article-info-term"><?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>
|
||||
|
||||
<?php if ($info == 1) : ?>
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($cntlink), $author)); ?>
|
||||
<?php else: ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)) . '">' . $title . '</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && $this->item->parent_slug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)) . '">' . $title . '</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && !$this->item->paginationrelative):
|
||||
echo $this->item->pagination;
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == '1')) || ($params->get('urls_position') == '1'))) : ?>
|
||||
<?php echo $this->loadTemplate('links'); ?>
|
||||
<?php endif; ?>
|
||||
<?php // Optional teaser intro text for guests ?>
|
||||
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
|
||||
<?php echo $this->item->introtext; ?>
|
||||
<?php //Optional link to let them register to see the whole article. ?>
|
||||
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) :
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login');
|
||||
$link = new JUri($link1);?>
|
||||
<p class="readmore">
|
||||
<a href="<?php echo $link; ?>">
|
||||
<?php $attribs = json_decode($this->item->attribs); ?>
|
||||
<?php
|
||||
if ($attribs->alternative_readmore == null) :
|
||||
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
|
||||
elseif ($readmore = $this->item->alternative_readmore) :
|
||||
echo $readmore;
|
||||
if ($params->get('show_readmore_title', 0) != 0) :
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif;
|
||||
elseif ($params->get('show_readmore_title', 0) == 0) :
|
||||
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
|
||||
else :
|
||||
echo JText::_('COM_CONTENT_READ_MORE');
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif; ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && $this->item->paginationrelative) :
|
||||
echo $this->item->pagination;
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->item->event->afterDisplayContent; ?> </div>
|
288
components/com_content/views/article/tmpl/default.xml
Normal file
288
components/com_content/views/article/tmpl/default.xml
Normal file
@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="com_content_article_view_default_title" option="com_content_article_view_default_option">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_SINGLE_ARTICLE"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[com_content_article_view_default_desc]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_content/models/fields">
|
||||
|
||||
<field name="id" type="modal_article"
|
||||
label="COM_CONTENT_FIELD_SELECT_ARTICLE_LABEL"
|
||||
required="true"
|
||||
edit="true"
|
||||
clear="false"
|
||||
description="COM_CONTENT_FIELD_SELECT_ARTICLE_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
|
||||
<!-- Basic options. -->
|
||||
<fieldset name="basic"
|
||||
label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL">
|
||||
|
||||
<field
|
||||
name="show_title"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="link_titles"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_intro"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="info_block_position"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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="show_category"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="link_category"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_parent_category"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="link_parent_category"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_author"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="link_author"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_LINK_AUTHOR_LABEL"
|
||||
description="JGLOBAL_LINK_AUTHOR_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_create_date"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_modify_date"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_publish_date"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_item_navigation"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_vote"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_VOTE_LABEL"
|
||||
description="JGLOBAL_SHOW_VOTE_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_tags"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
|
||||
description="COM_CONTENT_FIELD_SHOW_TAGS_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_icons"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_print_icon"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_email_icon"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
|
||||
description="JGLOBAL_SHOW_EMAIL_ICON_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_hits"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
description="JGLOBAL_SHOW_HITS_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_tags"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_TAGS_LABEL"
|
||||
description="JGLOBAL_SHOW_TAGS_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_noauth"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
|
||||
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="urls_position"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_URLSPOSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
|
||||
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
79
components/com_content/views/article/tmpl/default_links.php
Normal file
79
components/com_content/views/article/tmpl/default_links.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Create shortcut
|
||||
$urls = json_decode($this->item->urls);
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
|
||||
?>
|
||||
<div class="content-links">
|
||||
<ul class="nav nav-tabs nav-stacked">
|
||||
<?php
|
||||
$urlarray = array(
|
||||
array($urls->urla, $urls->urlatext, $urls->targeta, 'a'),
|
||||
array($urls->urlb, $urls->urlbtext, $urls->targetb, 'b'),
|
||||
array($urls->urlc, $urls->urlctext, $urls->targetc, 'c')
|
||||
);
|
||||
foreach ($urlarray as $url) :
|
||||
$link = $url[0];
|
||||
$label = $url[1];
|
||||
$target = $url[2];
|
||||
$id = $url[3];
|
||||
|
||||
if ( ! $link) :
|
||||
continue;
|
||||
endif;
|
||||
|
||||
// If no label is present, take the link
|
||||
$label = ($label) ? $label : $link;
|
||||
|
||||
// If no target is present, use the default
|
||||
$target = $target ? $target : $params->get('target'.$id);
|
||||
?>
|
||||
<li class="content-links-<?php echo $id; ?>">
|
||||
<?php
|
||||
// Compute the correct link
|
||||
|
||||
switch ($target)
|
||||
{
|
||||
case 1:
|
||||
// open in a new window
|
||||
echo '<a href="'. htmlspecialchars($link) .'" target="_blank" rel="nofollow">'.
|
||||
htmlspecialchars($label) .'</a>';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// open in a popup window
|
||||
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
|
||||
echo "<a href=\"" . htmlspecialchars($link) . "\" onclick=\"window.open(this.href, 'targetWindow', '".$attribs."'); return false;\">".
|
||||
htmlspecialchars($label).'</a>';
|
||||
break;
|
||||
case 3:
|
||||
// open in a modal window
|
||||
JHtml::_('behavior.modal', 'a.modal');
|
||||
echo '<a class="modal" href="'.htmlspecialchars($link).'" rel="{handler: \'iframe\', size: {x:600, y:600}}">'.
|
||||
htmlspecialchars($label) . ' </a>';
|
||||
break;
|
||||
|
||||
default:
|
||||
// open in parent window
|
||||
echo '<a href="'. htmlspecialchars($link) . '" rel="nofollow">'.
|
||||
htmlspecialchars($label) . ' </a>';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
1
components/com_content/views/article/tmpl/index.html
Normal file
1
components/com_content/views/article/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
301
components/com_content/views/article/view.html.php
Normal file
301
components/com_content/views/article/view.html.php
Normal file
@ -0,0 +1,301 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML Article View class for the Content component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewArticle extends JViewLegacy
|
||||
{
|
||||
protected $item;
|
||||
|
||||
protected $params;
|
||||
|
||||
protected $print;
|
||||
|
||||
protected $state;
|
||||
|
||||
protected $user;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$user = JFactory::getUser();
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
|
||||
$this->item = $this->get('Item');
|
||||
$this->print = $app->input->getBool('print');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = $user;
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create a shortcut for $item.
|
||||
$item = $this->item;
|
||||
$item->tagLayout = new JLayoutFile('joomla.content.tags');
|
||||
|
||||
// Add router helpers.
|
||||
$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;
|
||||
}
|
||||
|
||||
// TODO: Change based on shownoauth
|
||||
$item->readmore_link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug));
|
||||
|
||||
// Merge article params. If this is single-article view, menu params override article params
|
||||
// Otherwise, article params override menu item params
|
||||
$this->params = $this->state->get('params');
|
||||
$active = $app->getMenu()->getActive();
|
||||
$temp = clone ($this->params);
|
||||
|
||||
// Check to see which parameters should take priority
|
||||
if ($active)
|
||||
{
|
||||
$currentLink = $active->link;
|
||||
|
||||
// If the current view is the active item and an article view for this article, then the menu item params take priority
|
||||
if (strpos($currentLink, 'view=article') && (strpos($currentLink, '&id='.(string) $item->id)))
|
||||
{
|
||||
// Load layout from active query (in case it is an alternative menu item)
|
||||
if (isset($active->query['layout']))
|
||||
{
|
||||
$this->setLayout($active->query['layout']);
|
||||
}
|
||||
// Check for alternative layout of article
|
||||
elseif ($layout = $item->params->get('article_layout'))
|
||||
{
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
|
||||
// $item->params are the article params, $temp are the menu item params
|
||||
// Merge so that the menu item params take priority
|
||||
$item->params->merge($temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Current view is not a single article, so the article params take priority here
|
||||
// Merge the menu item params with the article params so that the article params take priority
|
||||
$temp->merge($item->params);
|
||||
$item->params = $temp;
|
||||
|
||||
// Check for alternative layouts (since we are not in a single-article menu item)
|
||||
// Single-article menu item layout takes priority over alt layout for an article
|
||||
if ($layout = $item->params->get('article_layout'))
|
||||
{
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Merge so that article params take priority
|
||||
$temp->merge($item->params);
|
||||
$item->params = $temp;
|
||||
|
||||
// Check for alternative layouts (since we are not in a single-article menu item)
|
||||
// Single-article menu item layout takes priority over alt layout for an article
|
||||
if ($layout = $item->params->get('article_layout'))
|
||||
{
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
}
|
||||
|
||||
$offset = $this->state->get('list.offset');
|
||||
|
||||
// Check the view access to the article (the model has already computed the values).
|
||||
if ($item->params->get('access-view') != true && (($item->params->get('show_noauth') != true && $user->get('guest') )))
|
||||
{
|
||||
JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return;
|
||||
}
|
||||
|
||||
if ($item->params->get('show_intro', '1') == '1')
|
||||
{
|
||||
$item->text = $item->introtext.' '.$item->fulltext;
|
||||
}
|
||||
elseif ($item->fulltext)
|
||||
{
|
||||
$item->text = $item->fulltext;
|
||||
}
|
||||
else
|
||||
{
|
||||
$item->text = $item->introtext;
|
||||
}
|
||||
|
||||
$item->tags = new JHelperTags;
|
||||
$item->tags->getItemTags('com_content.article', $this->item->id);
|
||||
|
||||
// Process the content plugins.
|
||||
|
||||
JPluginHelper::importPlugin('content');
|
||||
$dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$this->params, $offset));
|
||||
|
||||
$item->event = new stdClass;
|
||||
$results = $dispatcher->trigger('onContentAfterTitle', array('com_content.article', &$item, &$this->params, $offset));
|
||||
$item->event->afterDisplayTitle = trim(implode("\n", $results));
|
||||
|
||||
$results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.article', &$item, &$this->params, $offset));
|
||||
$item->event->beforeDisplayContent = trim(implode("\n", $results));
|
||||
|
||||
$results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.article', &$item, &$this->params, $offset));
|
||||
$item->event->afterDisplayContent = trim(implode("\n", $results));
|
||||
|
||||
// Increment the hit counter of the article.
|
||||
if (!$this->params->get('intro_only') && $offset == 0)
|
||||
{
|
||||
$model = $this->getModel();
|
||||
$model->hit();
|
||||
}
|
||||
|
||||
//Escape strings for HTML output
|
||||
$this->pageclass_sfx = htmlspecialchars($this->item->params->get('pageclass_sfx'));
|
||||
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$menus = $app->getMenu();
|
||||
$pathway = $app->getPathway();
|
||||
$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', '');
|
||||
|
||||
$id = (int) @$menu->query['id'];
|
||||
|
||||
// if the menu item does not concern this article
|
||||
if ($menu && ($menu->query['option'] != 'com_content' || $menu->query['view'] != 'article' || $id != $this->item->id))
|
||||
{
|
||||
// If this is not a single article menu item, set the page title to the article title
|
||||
if ($this->item->title)
|
||||
{
|
||||
$title = $this->item->title;
|
||||
}
|
||||
$path = array(array('title' => $this->item->title, 'link' => ''));
|
||||
$category = JCategories::getInstance('Content')->get($this->item->catid);
|
||||
|
||||
while ($category && ($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $category->id) && $category->id > 1)
|
||||
{
|
||||
$path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id));
|
||||
$category = $category->getParent();
|
||||
}
|
||||
$path = array_reverse($path);
|
||||
|
||||
foreach ($path as $item)
|
||||
{
|
||||
$pathway->addItem($item['title'], $item['link']);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for empty title and add site name if param is set
|
||||
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'));
|
||||
}
|
||||
|
||||
if (empty($title))
|
||||
{
|
||||
$title = $this->item->title;
|
||||
}
|
||||
$this->document->setTitle($title);
|
||||
|
||||
if ($this->item->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->item->metadesc);
|
||||
}
|
||||
elseif (!$this->item->metadesc && $this->params->get('menu-meta_description'))
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
|
||||
if ($this->item->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->item->metakey);
|
||||
}
|
||||
elseif (!$this->item->metakey && $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'));
|
||||
}
|
||||
|
||||
if ($app->getCfg('MetaAuthor') == '1')
|
||||
{
|
||||
$this->document->setMetaData('author', $this->item->author);
|
||||
}
|
||||
|
||||
$mdata = $this->item->metadata->toArray();
|
||||
|
||||
foreach ($mdata as $k => $v)
|
||||
{
|
||||
if ($v)
|
||||
{
|
||||
$this->document->setMetadata($k, $v);
|
||||
}
|
||||
}
|
||||
|
||||
// If there is a pagebreak heading or title, add it to the page title
|
||||
if (!empty($this->item->page_title))
|
||||
{
|
||||
$this->item->title = $this->item->title . ' - ' . $this->item->page_title;
|
||||
$this->document->setTitle($this->item->page_title . ' - ' . JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $this->state->get('list.offset') + 1));
|
||||
}
|
||||
|
||||
if ($this->print)
|
||||
{
|
||||
$this->document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/categories/index.html
Normal file
1
components/com_content/views/categories/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
17
components/com_content/views/categories/tmpl/default.php
Normal file
17
components/com_content/views/categories/tmpl/default.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
JHtml::_('behavior.caption');
|
||||
echo JLayoutHelper::render('joomla.content.categories_default', $this);
|
||||
echo $this->loadTemplate('items');
|
||||
?>
|
||||
</div>
|
626
components/com_content/views/categories/tmpl/default.xml
Normal file
626
components/com_content/views/categories/tmpl/default.xml
Normal file
@ -0,0 +1,626 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_TITLE" option="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORIES"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONTENT_CATEGORIES_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
>
|
||||
<field name="id" type="category"
|
||||
description="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC"
|
||||
extension="com_content"
|
||||
label="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL"
|
||||
show_root="true"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="JGLOBAL_CATEGORIES_OPTIONS">
|
||||
|
||||
<field name="show_base_description" type="list"
|
||||
label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL"
|
||||
description="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="categories_description" type="textarea"
|
||||
description="JGLOBAL_FIELD_CATEGORIES_DESC_DESC"
|
||||
label="JGLOBAL_FIELD_CATEGORIES_DESC_LABEL"
|
||||
cols="25"
|
||||
rows="5"
|
||||
/>
|
||||
<field name="maxLevelcat" type="list"
|
||||
description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
|
||||
label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field name="show_empty_categories_cat" type="list"
|
||||
|
||||
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_subcat_desc_cat" type="list"
|
||||
|
||||
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
|
||||
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
|
||||
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_cat_num_articles_cat" type="list"
|
||||
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
|
||||
description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="category" label="JGLOBAL_CATEGORY_OPTIONS">
|
||||
<field name="spacer3" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
|
||||
/>
|
||||
|
||||
<field name="show_category_title" type="list"
|
||||
label="JGLOBAL_SHOW_CATEGORY_TITLE"
|
||||
description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description_image" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="maxLevel" type="list"
|
||||
description="JGLOBAL_MAXLEVEL_DESC"
|
||||
label="JGLOBAL_MAXLEVEL_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="0">JNONE</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field name="show_empty_categories" type="list"
|
||||
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_no_articles" type="list"
|
||||
label="COM_CONTENT_NO_ARTICLES_LABEL"
|
||||
description="COM_CONTENT_NO_ARTICLES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_subcat_desc"
|
||||
type="list"
|
||||
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
|
||||
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_cat_num_articles" type="list"
|
||||
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
|
||||
description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
<fieldset name="blog" label="JGLOBAL_BLOG_LAYOUT_OPTIONS">
|
||||
<field name="spacer4" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
|
||||
/>
|
||||
|
||||
<field name="num_leading_articles" type="text"
|
||||
default="1"
|
||||
description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_intro_articles" type="text"
|
||||
default="4"
|
||||
description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_columns" type="text"
|
||||
default="2"
|
||||
description="JGLOBAL_NUM_COLUMNS_DESC"
|
||||
label="JGLOBAL_NUM_COLUMNS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_links" type="text"
|
||||
default="4"
|
||||
description="JGLOBAL_NUM_LINKS_DESC"
|
||||
label="JGLOBAL_NUM_LINKS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="multi_column_order" type="list"
|
||||
description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
|
||||
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_DOWN</option>
|
||||
<option value="1">JGLOBAL_ACROSS</option>
|
||||
</field>
|
||||
|
||||
<field name="subcategories" type="spacer" class="spacer"
|
||||
label="JGLOBAL_SUBSLIDER_BLOG_EXTENDED_LABEL"
|
||||
/>
|
||||
|
||||
<field name="show_subcategory_content" type="list"
|
||||
|
||||
description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC"
|
||||
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
|
||||
>
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNONE</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="spacer5"
|
||||
type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="orderby_pri" type="list"
|
||||
description="JGLOBAL_CATEGORY_ORDER_DESC"
|
||||
label="JGLOBAL_CATEGORY_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="order">JGLOBAL_ORDERING</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset name="advanced" label="JGLOBAL_LIST_LAYOUT_OPTIONS" >
|
||||
<field name="spacer6" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
|
||||
/>
|
||||
|
||||
<field name="show_pagination_limit" type="list"
|
||||
description="JGLOBAL_DISPLAY_SELECT_DESC"
|
||||
label="JGLOBAL_DISPLAY_SELECT_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="filter_field" type="list"
|
||||
description="JGLOBAL_FILTER_FIELD_DESC"
|
||||
label="JGLOBAL_FILTER_FIELD_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="hide">JHIDE</option>
|
||||
<option value="title">JGLOBAL_TITLE</option>
|
||||
<option value="author">JAUTHOR</option>
|
||||
<option value="hits">JGLOBAL_HITS</option>
|
||||
</field>
|
||||
|
||||
<field name="show_headings" type="list"
|
||||
description="JGLOBAL_SHOW_HEADINGS_DESC"
|
||||
label="JGLOBAL_SHOW_HEADINGS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="list_show_date" type="list"
|
||||
description="JGLOBAL_SHOW_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="date_format" type="text"
|
||||
description="JGLOBAL_DATE_FORMAT_DESC"
|
||||
label="JGLOBAL_DATE_FORMAT_LABEL"
|
||||
size="15"
|
||||
/>
|
||||
|
||||
<field name="list_show_hits" type="list"
|
||||
description="JGLOBAL_LIST_HITS_DESC"
|
||||
label="JGLOBAL_LIST_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="list_show_author" type="list"
|
||||
description="JGLOBAL_LIST_AUTHOR_DESC"
|
||||
label="JGLOBAL_LIST_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="display_num" type="list"
|
||||
default="10"
|
||||
description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
|
||||
label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL">
|
||||
<option value="5">J5</option>
|
||||
<option value="10">J10</option>
|
||||
<option value="15">J15</option>
|
||||
<option value="20">J20</option>
|
||||
<option value="25">J25</option>
|
||||
<option value="30">J30</option>
|
||||
<option value="50">J50</option>
|
||||
<option value="100">J100</option>
|
||||
<option value="0">JALL</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
|
||||
<field name="show_title" type="list"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_titles" type="list"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_intro" type="list"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_category" type="list"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_parent_category" type="list"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_parent_category" type="list"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_author" type="list"
|
||||
description="JGLOBAL_Show_Author_Desc"
|
||||
label="JGLOBAL_Show_Author_Label"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_author" type="list"
|
||||
description="JGLOBAL_Link_Author_Desc"
|
||||
label="JGLOBAL_Link_Author_Label"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_create_date" type="list"
|
||||
description="JGLOBAL_Show_Create_Date_Desc"
|
||||
label="JGLOBAL_Show_Create_Date_Label"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_modify_date" type="list"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_publish_date" type="list"
|
||||
description="JGLOBAL_Show_Publish_Date_Desc"
|
||||
label="JGLOBAL_Show_Publish_Date_Label"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_item_navigation" type="list"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_readmore"
|
||||
type="list"
|
||||
description="JGLOBAL_SHOW_READMORE_DESC"
|
||||
label="JGLOBAL_SHOW_READMORE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_icons" type="list"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_print_icon" type="list"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_email_icon" type="list"
|
||||
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_hits" type="list"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="integration"
|
||||
>
|
||||
|
||||
<field name="show_feed_link" type="list"
|
||||
description="JGLOBAL_SHOW_FEED_LINK_DESC"
|
||||
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="feed_summary" type="list"
|
||||
description="JGLOBAL_FEED_SUMMARY_DESC"
|
||||
label="JGLOBAL_FEED_SUMMARY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_INTRO_TEXT</option>
|
||||
<option value="1">JGLOBAL_FULL_TEXT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$class = ' class="first"';
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
if (count($this->items[$this->parent->id]) > 0 && $this->maxLevelcat != 0) :
|
||||
?>
|
||||
<?php foreach($this->items[$this->parent->id] as $id => $item) : ?>
|
||||
<?php
|
||||
if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) :
|
||||
if (!isset($this->items[$this->parent->id][$id + 1]))
|
||||
{
|
||||
$class = ' class="last"';
|
||||
}
|
||||
?>
|
||||
<div <?php echo $class; ?> >
|
||||
<?php $class = ''; ?>
|
||||
<h3 class="page-header item-title">
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id));?>">
|
||||
<?php echo $this->escape($item->title); ?></a>
|
||||
<?php if ($this->params->get('show_cat_num_articles_cat') == 1) :?>
|
||||
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
|
||||
<?php echo $item->numitems; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if (count($item->getChildren()) > 0) : ?>
|
||||
<a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
|
||||
<img src="<?php echo $item->getParams()->get('image'); ?>"/>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('show_subcat_desc_cat') == 1) :?>
|
||||
<?php if ($item->description) : ?>
|
||||
<div class="category-desc">
|
||||
<?php echo JHtml::_('content.prepare', $item->description, '', 'com_content.categories'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($item->getChildren()) > 0) :?>
|
||||
<div class="collapse fade" id="category-<?php echo $item->id;?>">
|
||||
<?php
|
||||
$this->items[$item->id] = $item->getChildren();
|
||||
$this->parent = $item;
|
||||
$this->maxLevelcat--;
|
||||
echo $this->loadTemplate('items');
|
||||
$this->parent = $item->getParent();
|
||||
$this->maxLevelcat++;
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
1
components/com_content/views/categories/tmpl/index.html
Normal file
1
components/com_content/views/categories/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
124
components/com_content/views/categories/view.html.php
Normal file
124
components/com_content/views/categories/view.html.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Content categories view.
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewCategories extends JViewLegacy
|
||||
{
|
||||
protected $state = null;
|
||||
|
||||
protected $item = null;
|
||||
|
||||
protected $items = null;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @return mixed False on error, null otherwise.
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$state = $this->get('State');
|
||||
$items = $this->get('Items');
|
||||
$parent = $this->get('Parent');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($items === false)
|
||||
{
|
||||
JError::raiseError(404, JText::_('COM_CONTENT_ERROR_CATEGORY_NOT_FOUND'));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($parent == false)
|
||||
{
|
||||
JError::raiseError(404, JText::_('COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$params = &$state->params;
|
||||
|
||||
$items = array($parent->id => $items);
|
||||
|
||||
//Escape strings for HTML output
|
||||
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
|
||||
|
||||
$this->maxLevelcat = $params->get('maxLevelcat', -1);
|
||||
$this->params = &$params;
|
||||
$this->parent = &$parent;
|
||||
$this->items = &$items;
|
||||
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
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->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);
|
||||
|
||||
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'));
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/category/index.html
Normal file
1
components/com_content/views/category/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
7
components/com_content/views/category/metadata.xml
Normal file
7
components/com_content/views/category/metadata.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view
|
||||
title="Category">
|
||||
<message><![CDATA[TYPECATEGLAYDESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
109
components/com_content/views/category/tmpl/blog.php
Normal file
109
components/com_content/views/category/tmpl/blog.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
|
||||
|
||||
JHtml::_('behavior.caption');
|
||||
?>
|
||||
<div class="blog<?php echo $this->pageclass_sfx;?>">
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<div class="page-header">
|
||||
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
|
||||
<h2> <?php echo $this->escape($this->params->get('page_subheading')); ?>
|
||||
<?php if ($this->params->get('show_category_title')) : ?>
|
||||
<span class="subheading-category"><?php echo $this->category->title;?></span>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('show_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
|
||||
<?php $this->category->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
|
||||
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
|
||||
<div class="category-desc clearfix">
|
||||
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
|
||||
<img src="<?php echo $this->category->getParams()->get('image'); ?>"/>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
|
||||
<?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?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; ?>">
|
||||
<?php
|
||||
$this->item = &$item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$leadingcount++;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</div><!-- end items-leading -->
|
||||
<?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 clearfix">
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo round((12 / $this->columns));?>">
|
||||
<div class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
|
||||
<?php
|
||||
$this->item = &$item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div><!-- end item -->
|
||||
<?php $counter++; ?>
|
||||
</div><!-- end span -->
|
||||
<?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?>
|
||||
</div><!-- end row -->
|
||||
<?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 (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
|
||||
<div class="cat-children">
|
||||
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
|
||||
<h3> <?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->loadTemplate('children'); ?> </div>
|
||||
<?php endif; ?>
|
||||
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 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>
|
502
components/com_content/views/category/tmpl/blog.xml
Normal file
502
components/com_content/views/category/tmpl/blog.xml
Normal file
@ -0,0 +1,502 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE" option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_BLOG"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
>
|
||||
|
||||
<field name="id" type="category"
|
||||
description="JGLOBAL_CHOOSE_CATEGORY_DESC"
|
||||
extension="com_content"
|
||||
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
|
||||
|
||||
<field name="layout_type"
|
||||
type="hidden"
|
||||
default="blog"
|
||||
/>
|
||||
<field name="show_category_heading_title_text"
|
||||
type="list"
|
||||
label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL"
|
||||
description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="show_category_title" type="list"
|
||||
label="JGLOBAL_SHOW_CATEGORY_TITLE"
|
||||
description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description_image" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="maxLevel" type="list"
|
||||
description="JGLOBAL_MAXLEVEL_DESC"
|
||||
label="JGLOBAL_MAXLEVEL_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="0">JNONE</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field name="show_empty_categories" type="list"
|
||||
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_no_articles" type="list"
|
||||
label="COM_CONTENT_NO_ARTICLES_LABEL"
|
||||
description="COM_CONTENT_NO_ARTICLES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_subcat_desc" type="list"
|
||||
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
|
||||
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_cat_num_articles" type="list"
|
||||
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
|
||||
description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="page_subheading" type="text"
|
||||
description="JGLOBAL_SUBHEADING_DESC"
|
||||
label="JGLOBAL_SUBHEADING_LABEL"
|
||||
size="20"
|
||||
/>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="advanced" label="JGLOBAL_BLOG_LAYOUT_OPTIONS">
|
||||
|
||||
<field name="bloglayout" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL"
|
||||
/>
|
||||
|
||||
|
||||
<field name="num_leading_articles" type="text"
|
||||
description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_intro_articles" type="text"
|
||||
description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_columns" type="text"
|
||||
description="JGLOBAL_NUM_COLUMNS_DESC"
|
||||
label="JGLOBAL_NUM_COLUMNS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_links" type="text"
|
||||
description="JGLOBAL_NUM_LINKS_DESC"
|
||||
label="JGLOBAL_NUM_LINKS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="multi_column_order" type="list"
|
||||
description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
|
||||
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_DOWN</option>
|
||||
<option value="1">JGLOBAL_ACROSS</option>
|
||||
</field>
|
||||
<field name="subcategories" type="spacer" class="spacer"
|
||||
label="JGLOBAL_SUBSLIDER_BLOG_EXTENDED_LABEL"
|
||||
/>
|
||||
|
||||
<field name="show_subcategory_content" type="list"
|
||||
|
||||
description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC"
|
||||
label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNONE</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="spacer1"
|
||||
type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="orderby_pri" type="list"
|
||||
description="JGLOBAL_CATEGORY_ORDER_DESC"
|
||||
label="JGLOBAL_CATEGORY_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="order">JGLOBAL_ORDERING</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
|
||||
<field name="show_title" type="list"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
default=""
|
||||
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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_author" type="list"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_AUTHOR_DESC"
|
||||
label="JGLOBAL_LINK_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_READMORE_DESC"
|
||||
label="JGLOBAL_SHOW_READMORE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_icons" type="list"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_Show_Email_Icon_Desc"
|
||||
label="JGLOBAL_Show_Email_Icon_Label"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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_noauth" type="list"
|
||||
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
|
||||
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
|
||||
<field name="show_feed_link" type="list"
|
||||
description="JGLOBAL_SHOW_FEED_LINK_DESC"
|
||||
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="feed_summary" type="list"
|
||||
description="JGLOBAL_FEED_SUMMARY_DESC"
|
||||
label="JGLOBAL_FEED_SUMMARY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_INTRO_TEXT</option>
|
||||
<option value="1">JGLOBAL_FULL_TEXT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
83
components/com_content/views/category/tmpl/blog_children.php
Normal file
83
components/com_content/views/category/tmpl/blog_children.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
$class = ' class="first"';
|
||||
|
||||
if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) : ?>
|
||||
|
||||
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
|
||||
<?php
|
||||
if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) :
|
||||
if (!isset($this->children[$this->category->id][$id + 1])) :
|
||||
$class = ' class="last"';
|
||||
endif;
|
||||
?>
|
||||
<div<?php echo $class; ?>>
|
||||
<?php $class = ''; ?>
|
||||
<?php if ($lang->isRTL()) : ?>
|
||||
<h3 class="page-header item-title">
|
||||
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
|
||||
<?php echo $child->getNumItems(true); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id)); ?>">
|
||||
<?php echo $this->escape($child->title); ?></a>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) : ?>
|
||||
<a href="#category-<?php echo $child->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
<?php else : ?>
|
||||
<h3 class="page-header item-title"><a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));?>">
|
||||
<?php echo $this->escape($child->title); ?></a>
|
||||
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
|
||||
<?php echo $child->getNumItems(true); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) : ?>
|
||||
<a href="#category-<?php echo $child->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
|
||||
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
|
||||
<?php if ($child->description) : ?>
|
||||
<div class="category-desc">
|
||||
<?php echo JHtml::_('content.prepare', $child->description, '', 'com_content.category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) : ?>
|
||||
<div class="collapse fade" id="category-<?php echo $child->id; ?>">
|
||||
<?php
|
||||
$this->children[$child->id] = $child->getChildren();
|
||||
$this->category = $child;
|
||||
$this->maxLevel--;
|
||||
if ($this->maxLevel != 0) :
|
||||
echo $this->loadTemplate('children');
|
||||
endif;
|
||||
$this->category = $child->getParent();
|
||||
$this->maxLevel++;
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif;
|
79
components/com_content/views/category/tmpl/blog_item.php
Normal file
79
components/com_content/views/category/tmpl/blog_item.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;?>
|
||||
<?php
|
||||
// Create a shortcut for params.
|
||||
$params = $this->item->params;
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
$canEdit = $this->item->params->get('access-edit');
|
||||
JHtml::_('behavior.framework');
|
||||
?>
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla.content.blog_style_default_item_title', $this->item); ?>
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
|
||||
|
||||
<?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') ); ?>
|
||||
|
||||
<?php if ($useDefList) : ?>
|
||||
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'above')); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>
|
||||
|
||||
|
||||
<?php if (!$params->get('show_intro')) : ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $this->item->introtext; ?>
|
||||
|
||||
<?php if ($useDefList) : ?>
|
||||
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
|
||||
<?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));
|
||||
else :
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$itemId = $active->id;
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
|
||||
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
|
||||
$link = new JUri($link1);
|
||||
$link->setVar('return', base64_encode($returnURL));
|
||||
endif; ?>
|
||||
|
||||
<p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
|
||||
|
||||
<?php if (!$params->get('access-view')) :
|
||||
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
|
||||
elseif ($readmore = $this->item->alternative_readmore) :
|
||||
echo $readmore;
|
||||
if ($params->get('show_readmore_title', 0) != 0) :
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif;
|
||||
elseif ($params->get('show_readmore_title', 0) == 0) :
|
||||
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
|
||||
else :
|
||||
echo JText::_('COM_CONTENT_READ_MORE');
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif; ?>
|
||||
|
||||
</a></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
25
components/com_content/views/category/tmpl/blog_links.php
Normal file
25
components/com_content/views/category/tmpl/blog_links.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
|
||||
|
||||
<div class="items-more">
|
||||
<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)); ?>">
|
||||
<?php echo $item->title; ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</div>
|
23
components/com_content/views/category/tmpl/default.php
Normal file
23
components/com_content/views/category/tmpl/default.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
|
||||
|
||||
JHtml::_('behavior.caption');
|
||||
?>
|
||||
<div class="category-list<?php echo $this->pageclass_sfx;?>">
|
||||
|
||||
<?php
|
||||
$this->subtemplatename = 'articles';
|
||||
echo JLayoutHelper::render('joomla.content.category_default', $this);
|
||||
?>
|
||||
|
||||
</div>
|
483
components/com_content/views/category/tmpl/default.xml
Normal file
483
components/com_content/views/category/tmpl/default.xml
Normal file
@ -0,0 +1,483 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONTENT_CATEGORY_VIEW_DEFAULT_TITLE" option="COM_CONTENT_CATEGORY_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_LIST"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONTENT_CATEGORY_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the request variables for the layout. -->
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
>
|
||||
|
||||
<field name="id" type="category"
|
||||
description="JGLOBAL_CHOOSE_CATEGORY_DESC"
|
||||
extension="com_content"
|
||||
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
|
||||
|
||||
<field name="show_category_title" type="list"
|
||||
label="JGLOBAL_SHOW_CATEGORY_TITLE"
|
||||
description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_description_image" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="maxLevel" type="list"
|
||||
description="JGLOBAL_MAXLEVEL_DESC"
|
||||
label="JGLOBAL_MAXLEVEL_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="-1">JALL</option>
|
||||
<option value="0">JNONE</option>
|
||||
<option value="1">J1</option>
|
||||
<option value="2">J2</option>
|
||||
<option value="3">J3</option>
|
||||
<option value="4">J4</option>
|
||||
<option value="5">J5</option>
|
||||
</field>
|
||||
|
||||
<field name="show_empty_categories" type="list"
|
||||
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_no_articles" type="list"
|
||||
label="COM_CONTENT_NO_ARTICLES_LABEL"
|
||||
description="COM_CONTENT_NO_ARTICLES_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="show_category_heading_title"
|
||||
type="list"
|
||||
label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL"
|
||||
description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="show_subcat_desc" type="list"
|
||||
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
|
||||
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_cat_num_articles" type="list"
|
||||
label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
|
||||
description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="page_subheading" type="text"
|
||||
description="JGLOBAL_SUBHEADING_DESC"
|
||||
label="JGLOBAL_SUBHEADING_LABEL"
|
||||
size="20"
|
||||
/>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="advanced" label="JGLOBAL_LIST_LAYOUT_OPTIONS">
|
||||
|
||||
<field name="show_pagination_limit" type="list"
|
||||
description="JGLOBAL_DISPLAY_SELECT_DESC"
|
||||
label="JGLOBAL_DISPLAY_SELECT_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="filter_field" type="list"
|
||||
description="JGLOBAL_FILTER_FIELD_DESC"
|
||||
label="JGLOBAL_FILTER_FIELD_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="hide">JHIDE</option>
|
||||
<option value="title">JGLOBAL_TITLE</option>
|
||||
<option value="author">JAUTHOR</option>
|
||||
<option value="hits">JGLOBAL_HITS</option>
|
||||
</field>
|
||||
|
||||
<field name="show_headings" type="list"
|
||||
description="JGLOBAL_SHOW_HEADINGS_DESC"
|
||||
label="JGLOBAL_SHOW_HEADINGS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="list_show_date" type="list"
|
||||
description="JGLOBAL_SHOW_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="date_format" type="text"
|
||||
description="JGLOBAL_DATE_FORMAT_DESC"
|
||||
label="JGLOBAL_DATE_FORMAT_LABEL"
|
||||
size="15"
|
||||
/>
|
||||
|
||||
<field name="list_show_hits" type="list"
|
||||
description="JGLOBAL_LIST_HITS_DESC"
|
||||
label="JGLOBAL_LIST_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="list_show_author" type="list"
|
||||
description="JGLOBAL_LIST_AUTHOR_DESC"
|
||||
label="JGLOBAL_LIST_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="spacer1"
|
||||
type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="orderby_pri" type="list"
|
||||
description="JGLOBAL_CATEGORY_ORDER_DESC"
|
||||
label="JGLOBAL_CATEGORY_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="order">JGLOBAL_ORDERING</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="display_num" type="list"
|
||||
default="10"
|
||||
description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
|
||||
label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL">
|
||||
<option value="5">J5</option>
|
||||
<option value="10">J10</option>
|
||||
<option value="15">J15</option>
|
||||
<option value="20">J20</option>
|
||||
<option value="25">J25</option>
|
||||
<option value="30">J30</option>
|
||||
<option value="50">J50</option>
|
||||
<option value="100">J100</option>
|
||||
<option value="0">JALL</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
|
||||
<field name="show_title" type="list"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_titles" type="list"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_intro" type="list"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_category" type="list"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_parent_category" type="list"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_parent_category" type="list"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_author" type="list"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_author" type="list"
|
||||
description="JGLOBAL_LINK_AUTHOR_DESC"
|
||||
label="JGLOBAL_LINK_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_create_date" type="list"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_modify_date" type="list"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_publish_date" type="list"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_item_navigation" type="list"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_readmore"
|
||||
type="list"
|
||||
description="JGLOBAL_SHOW_READMORE_DESC"
|
||||
label="JGLOBAL_SHOW_READMORE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_icons" type="list"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_print_icon" type="list"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_email_icon" type="list"
|
||||
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_hits" type="list"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_noauth" type="list"
|
||||
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
|
||||
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="integration"
|
||||
>
|
||||
|
||||
<field name="show_feed_link" type="list"
|
||||
description="JGLOBAL_SHOW_FEED_LINK_DESC"
|
||||
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="feed_summary" type="list"
|
||||
description="JGLOBAL_FEED_SUMMARY_DESC"
|
||||
label="JGLOBAL_FEED_SUMMARY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_INTRO_TEXT</option>
|
||||
<option value="1">JGLOBAL_FULL_TEXT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
207
components/com_content/views/category/tmpl/default_articles.php
Normal file
207
components/com_content/views/category/tmpl/default_articles.php
Normal file
@ -0,0 +1,207 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.framework');
|
||||
|
||||
// Create some shortcuts.
|
||||
$params = &$this->item->params;
|
||||
$n = count($this->items);
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
|
||||
// check for at least one editable article
|
||||
$isEditable = false;
|
||||
if (!empty($this->items))
|
||||
{
|
||||
foreach ($this->items as $article)
|
||||
{
|
||||
if ($article->params->get('access-edit'))
|
||||
{
|
||||
$isEditable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (empty($this->items)) : ?>
|
||||
|
||||
<?php if ($this->params->get('show_no_articles', 1)) : ?>
|
||||
<p><?php echo JText::_('COM_CONTENT_NO_ARTICLES'); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="form-inline">
|
||||
<?php if ($this->params->get('show_headings') || $this->params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) :?>
|
||||
<fieldset class="filters btn-toolbar clearfix">
|
||||
<?php if ($this->params->get('filter_field') != 'hide') :?>
|
||||
<div class="btn-group">
|
||||
<label class="filter-search-lbl element-invisible" for="filter-search">
|
||||
<?php echo JText::_('COM_CONTENT_'.$this->params->get('filter_field').'_FILTER_LABEL').' '; ?>
|
||||
</label>
|
||||
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?>" placeholder="<?php echo JText::_('COM_CONTENT_'.$this->params->get('filter_field').'_FILTER_LABEL'); ?>" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('show_pagination_limit')) : ?>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="limit" class="element-invisible">
|
||||
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
|
||||
</label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="filter_order" value="" />
|
||||
<input type="hidden" name="filter_order_Dir" value="" />
|
||||
<input type="hidden" name="limitstart" value="" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="category table table-striped table-bordered table-hover">
|
||||
<?php if ($this->params->get('show_headings')) : ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="categorylist_header_title">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php if ($date = $this->params->get('list_show_date')) : ?>
|
||||
<th id="categorylist_header_date">
|
||||
<?php if ($date == "created") : ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_'.$date.'_DATE', 'a.created', $listDirn, $listOrder); ?>
|
||||
<?php elseif ($date == "modified") : ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_'.$date.'_DATE', 'a.modified', $listDirn, $listOrder); ?>
|
||||
<?php elseif ($date == "published") : ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_'.$date.'_DATE', 'a.publish_up', $listDirn, $listOrder); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('list_show_author')) : ?>
|
||||
<th id="categorylist_header_author">
|
||||
<?php echo JHtml::_('grid.sort', 'JAUTHOR', 'author', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('list_show_hits')) : ?>
|
||||
<th id="categorylist_header_hits">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($isEditable) : ?>
|
||||
<th id="categorylist_header_edit"><?php echo JText::_('COM_CONTENT_EDIT_ITEM'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php endif; ?>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $article) : ?>
|
||||
<?php if ($this->items[$i]->state == 0) : ?>
|
||||
<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
|
||||
<?php else: ?>
|
||||
<tr class="cat-list-row<?php echo $i % 2; ?>" >
|
||||
<?php endif; ?>
|
||||
<td headers="categorylist_header_title" class="list-title">
|
||||
<?php if (in_array($article->access, $this->user->getAuthorisedViewLevels())) : ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid)); ?>">
|
||||
<?php echo $this->escape($article->title); ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
echo $this->escape($article->title).' : ';
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$itemId = $active->id;
|
||||
$link = JRoute::_('index.php?option=com_users&view=login&Itemid='.$itemId);
|
||||
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($article->slug));
|
||||
$fullURL = new JUri($link);
|
||||
$fullURL->setVar('return', base64_encode($returnURL));
|
||||
?>
|
||||
<a href="<?php echo $fullURL; ?>" class="register">
|
||||
<?php echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($article->state == 0) : ?>
|
||||
<span class="list-published label label-warning">
|
||||
<?php echo JText::_('JUNPUBLISHED'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php if ($this->params->get('list_show_date')) : ?>
|
||||
<td headers="categorylist_header_date" class="list-date small">
|
||||
<?php
|
||||
echo JHtml::_(
|
||||
'date', $article->displayDate,
|
||||
$this->escape($this->params->get('date_format', JText::_('DATE_FORMAT_LC3')))
|
||||
); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('list_show_author', 1)) : ?>
|
||||
<td headers="categorylist_header_author" class="list-author">
|
||||
<?php if (!empty($article->author) || !empty($article->created_by_alias)) : ?>
|
||||
<?php $author = $article->author ?>
|
||||
<?php $author = ($article->created_by_alias ? $article->created_by_alias : $author);?>
|
||||
|
||||
<?php if (!empty($article->contactid ) && $this->params->get('link_author') == true):?>
|
||||
<?php echo JHtml::_(
|
||||
'link',
|
||||
JRoute::_('index.php?option=com_contact&view=contact&id='.$article->contactid),
|
||||
$author
|
||||
); ?>
|
||||
|
||||
<?php else :?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('list_show_hits', 1)) : ?>
|
||||
<td headers="categorylist_header_hits" class="list-hits">
|
||||
<span class="badge badge-info">
|
||||
<?php echo JText::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
|
||||
</span>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($isEditable) : ?>
|
||||
<td headers="categorylist_header_edit" class="list-edit">
|
||||
<?php if ($article->params->get('access-edit')) : ?>
|
||||
<?php echo JHtml::_('icon.edit', $article, $params); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Code to add a link to submit an article. ?>
|
||||
<?php if ($this->category->getParams()->get('access-create')) : ?>
|
||||
<?php echo JHtml::_('icon.create', $this->category, $this->category->params); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Add pagination links ?>
|
||||
<?php if (!empty($this->items)) : ?>
|
||||
<?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; ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
$class = ' class="first"';
|
||||
?>
|
||||
|
||||
<?php if (count($this->children[$this->category->id]) > 0) : ?>
|
||||
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
|
||||
<?php
|
||||
if ($this->params->get('show_empty_categories') || $child->getNumItems(true) || count($child->getChildren())) :
|
||||
if (!isset($this->children[$this->category->id][$id + 1])) :
|
||||
$class = ' class="last"';
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div<?php echo $class; ?>>
|
||||
<?php $class = ''; ?>
|
||||
<?php if ($lang->isRTL()) : ?>
|
||||
<h3 class="page-header item-title">
|
||||
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
|
||||
<?php echo $child->getNumItems(true); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));?>">
|
||||
<?php echo $this->escape($child->title); ?></a>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) : ?>
|
||||
<a href="#category-<?php echo $child->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
<?php else : ?>
|
||||
<h3 class="page-header item-title"><a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));?>">
|
||||
<?php echo $this->escape($child->title); ?></a>
|
||||
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
|
||||
<?php echo $child->getNumItems(true); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) : ?>
|
||||
<a href="#category-<?php echo $child->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
<?php if ($this->params->get('show_subcat_desc') == 1) :?>
|
||||
<?php if ($child->description) : ?>
|
||||
<div class="category-desc">
|
||||
<?php echo JHtml::_('content.prepare', $child->description, '', 'com_content.category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0) :?>
|
||||
<div class="collapse fade" id="category-<?php echo $child->id;?>">
|
||||
<?php
|
||||
$this->children[$child->id] = $child->getChildren();
|
||||
$this->category = $child;
|
||||
$this->maxLevel--;
|
||||
if ($this->maxLevel != 0) :
|
||||
echo $this->loadTemplate('children');
|
||||
endif;
|
||||
$this->category = $child->getParent();
|
||||
$this->maxLevel++;
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
1
components/com_content/views/category/tmpl/index.html
Normal file
1
components/com_content/views/category/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
89
components/com_content/views/category/view.feed.php
Normal file
89
components/com_content/views/category/view.feed.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Content component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewCategory extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$doc = JFactory::getDocument();
|
||||
$params = $app->getParams();
|
||||
$feedEmail = $app->getCfg('feed_email', 'author');
|
||||
$siteEmail = $app->getCfg('mailfrom');
|
||||
|
||||
// Get some data from the model
|
||||
$app->input->set('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));
|
||||
|
||||
// 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 .= '<p class="feed-readmore"><a target="_blank" href ="' . $item->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);
|
||||
}
|
||||
}
|
||||
}
|
320
components/com_content/views/category/view.html.php
Normal file
320
components/com_content/views/category/view.html.php
Normal file
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Content component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewCategory extends JViewLegacy
|
||||
{
|
||||
protected $state;
|
||||
|
||||
protected $items;
|
||||
|
||||
protected $category;
|
||||
|
||||
protected $children;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $lead_items = array();
|
||||
|
||||
protected $intro_items = array();
|
||||
|
||||
protected $link_items = array();
|
||||
|
||||
protected $columns = 1;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Get some data from the models
|
||||
$state = $this->get('State');
|
||||
$params = $state->params;
|
||||
$items = $this->get('Items');
|
||||
$category = $this->get('Category');
|
||||
$children = $this->get('Children');
|
||||
$parent = $this->get('Parent');
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($category == false)
|
||||
{
|
||||
return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND'));
|
||||
}
|
||||
|
||||
if ($parent == false)
|
||||
{
|
||||
return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND'));
|
||||
}
|
||||
|
||||
// Setup the category parameters.
|
||||
$cparams = $category->getParams();
|
||||
$category->params = clone($params);
|
||||
$category->params->merge($cparams);
|
||||
|
||||
// Check whether category access level allows access.
|
||||
$user = JFactory::getUser();
|
||||
$groups = $user->getAuthorisedViewLevels();
|
||||
if (!in_array($category->access, $groups))
|
||||
{
|
||||
return JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
||||
// PREPARE THE DATA
|
||||
// Get the metrics for the structural page layout.
|
||||
$numLeading = $params->def('num_leading_articles', 1);
|
||||
$numIntro = $params->def('num_intro_articles', 4);
|
||||
$numLinks = $params->def('num_links', 4);
|
||||
|
||||
// Compute the article slugs and prepare introtext (runs content plugins).
|
||||
for ($i = 0, $n = count($items); $i < $n; $i++)
|
||||
{
|
||||
$item = &$items[$i];
|
||||
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
|
||||
|
||||
$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->catslug = $item->category_alias ? ($item->catid.':'.$item->category_alias) : $item->catid;
|
||||
$item->event = new stdClass;
|
||||
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
|
||||
// Old plugins: Ensure that text property is available
|
||||
if (!isset($item->text))
|
||||
{
|
||||
$item->text = $item->introtext;
|
||||
}
|
||||
|
||||
JPluginHelper::importPlugin('content');
|
||||
$dispatcher->trigger('onContentPrepare', array ('com_content.category', &$item, &$this->params, 0));
|
||||
|
||||
// Old plugins: Use processed text as introtext
|
||||
$item->introtext = $item->text;
|
||||
|
||||
$results = $dispatcher->trigger('onContentAfterTitle', array('com_content.category', &$item, &$item->params, 0));
|
||||
$item->event->afterDisplayTitle = trim(implode("\n", $results));
|
||||
|
||||
$results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.category', &$item, &$item->params, 0));
|
||||
$item->event->beforeDisplayContent = trim(implode("\n", $results));
|
||||
|
||||
$results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.category', &$item, &$item->params, 0));
|
||||
$item->event->afterDisplayContent = trim(implode("\n", $results));
|
||||
}
|
||||
|
||||
// Check for layout override only if this is not the active menu item
|
||||
// If it is the active menu item, then the view and category id will match
|
||||
$active = $app->getMenu()->getActive();
|
||||
if ((!$active) || ((strpos($active->link, 'view=category') === false) || (strpos($active->link, '&id=' . (string) $category->id) === false)))
|
||||
{
|
||||
// Get the layout from the merged category params
|
||||
if ($layout = $category->params->get('category_layout'))
|
||||
{
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
}
|
||||
// At this point, we are in a menu item, so we don't override the layout
|
||||
elseif (isset($active->query['layout']))
|
||||
{
|
||||
// We need to set the layout from the query in case this is an alternative menu item (with an alternative layout)
|
||||
$this->setLayout($active->query['layout']);
|
||||
}
|
||||
|
||||
// For blog layouts, preprocess the breakdown of leading, intro and linked articles.
|
||||
// This makes it much easier for the designer to just interrogate the arrays.
|
||||
if (($params->get('layout_type') == 'blog') || ($this->getLayout() == 'blog'))
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
$limit = $numLeading + $numIntro + $numLinks;
|
||||
// The remainder are the links.
|
||||
for ($i = $numLeading + $numIntro; $i < $limit && $i < $max;$i++)
|
||||
{
|
||||
$this->link_items[$i] = &$items[$i];
|
||||
}
|
||||
}
|
||||
|
||||
$children = array($category->id => $children);
|
||||
|
||||
//Escape strings for HTML output
|
||||
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
|
||||
|
||||
$this->maxLevel = $params->get('maxLevel', -1);
|
||||
$this->state = &$state;
|
||||
$this->items = &$items;
|
||||
$this->category = &$category;
|
||||
$this->children = &$children;
|
||||
$this->params = &$params;
|
||||
$this->parent = &$parent;
|
||||
$this->pagination = &$pagination;
|
||||
$this->user = &$user;
|
||||
|
||||
// Increment the category hit counter
|
||||
$model = $this->getModel();
|
||||
$model->hit();
|
||||
|
||||
$this->category->tags = new JHelperTags;
|
||||
$this->category->tags->getItemTags('com_content.category', $this->category->id);
|
||||
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$menus = $app->getMenu();
|
||||
$pathway = $app->getPathway();
|
||||
$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'));
|
||||
}
|
||||
|
||||
$id = (int) @$menu->query['id'];
|
||||
|
||||
if ($menu && ($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $this->category->id))
|
||||
{
|
||||
$path = array(array('title' => $this->category->title, 'link' => ''));
|
||||
$category = $this->category->getParent();
|
||||
|
||||
while (($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $category->id) && $category->id > 1)
|
||||
{
|
||||
$path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id));
|
||||
$category = $category->getParent();
|
||||
}
|
||||
|
||||
$path = array_reverse($path);
|
||||
|
||||
foreach ($path as $item)
|
||||
{
|
||||
$pathway->addItem($item['title'], $item['link']);
|
||||
}
|
||||
}
|
||||
|
||||
$title = $this->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);
|
||||
|
||||
if ($this->category->metadesc)
|
||||
{
|
||||
$this->document->setDescription($this->category->metadesc);
|
||||
}
|
||||
elseif (!$this->category->metadesc && $this->params->get('menu-meta_description'))
|
||||
{
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
|
||||
if ($this->category->metakey)
|
||||
{
|
||||
$this->document->setMetadata('keywords', $this->category->metakey);
|
||||
}
|
||||
elseif (!$this->category->metakey && $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'));
|
||||
}
|
||||
|
||||
if ($app->getCfg('MetaAuthor') == '1')
|
||||
{
|
||||
$this->document->setMetaData('author', $this->category->getMetadata()->get('author'));
|
||||
}
|
||||
|
||||
$mdata = $this->category->getMetadata()->toArray();
|
||||
|
||||
foreach ($mdata as $k => $v)
|
||||
{
|
||||
if ($v)
|
||||
{
|
||||
$this->document->setMetadata($k, $v);
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/featured/index.html
Normal file
1
components/com_content/views/featured/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
6
components/com_content/views/featured/metadata.xml
Normal file
6
components/com_content/views/featured/metadata.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view title="Frontpage">
|
||||
<message><![CDATA[TYPEFRONTLAYDESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
94
components/com_content/views/featured/tmpl/default.php
Normal file
94
components/com_content/views/featured/tmpl/default.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @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;?>">
|
||||
<?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 $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">
|
||||
<?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));?>">
|
||||
<?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>
|
377
components/com_content/views/featured/tmpl/default.xml
Normal file
377
components/com_content/views/featured/tmpl/default.xml
Normal file
@ -0,0 +1,377 @@
|
||||
<?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"
|
||||
extension="com_content"
|
||||
multiple="true"
|
||||
size="10"
|
||||
default=""
|
||||
label="COM_CONTENT_FEATURED_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_FEATURED_CATEGORIES_DESC" >
|
||||
<option value="">JOPTION_ALL_CATEGORIES</option>
|
||||
</field>
|
||||
|
||||
<field name="layout_type"
|
||||
type="hidden"
|
||||
default="blog"
|
||||
/>
|
||||
<field name="bloglayout" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL"
|
||||
/>
|
||||
|
||||
<field name="num_leading_articles" type="text"
|
||||
description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_intro_articles" type="text"
|
||||
description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_columns" type="text"
|
||||
description="JGLOBAL_NUM_COLUMNS_DESC"
|
||||
label="JGLOBAL_NUM_COLUMNS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_links" type="text"
|
||||
description="JGLOBAL_NUM_LINKS_DESC"
|
||||
label="JGLOBAL_NUM_LINKS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="multi_column_order" type="list"
|
||||
description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
|
||||
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_Down</option>
|
||||
<option value="1">JGLOBAL_Across</option>
|
||||
</field>
|
||||
|
||||
<field name="orderby_pri" type="list"
|
||||
description="JGLOBAL_CATEGORY_ORDER_DESC"
|
||||
label="JGLOBAL_CATEGORY_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="order">JGLOBAL_ORDERING</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
|
||||
<field name="show_title" type="list"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
default=""
|
||||
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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_author" type="list"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_LINK_AUTHOR_DESC"
|
||||
label="JGLOBAL_LINK_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_READMORE_DESC"
|
||||
label="JGLOBAL_SHOW_READMORE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_icons" type="list"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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_noauth" type="list"
|
||||
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
|
||||
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<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"
|
||||
>
|
||||
|
||||
<field name="show_feed_link" type="list"
|
||||
description="JGLOBAL_SHOW_FEED_LINK_DESC"
|
||||
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="feed_summary" type="list"
|
||||
description="JGLOBAL_FEED_SUMMARY_DESC"
|
||||
label="JGLOBAL_FEED_SUMMARY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_INTRO_TEXT</option>
|
||||
<option value="1">JGLOBAL_FULL_TEXT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
265
components/com_content/views/featured/tmpl/default_item.php
Normal file
265
components/com_content/views/featured/tmpl/default_item.php
Normal file
@ -0,0 +1,265 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @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;
|
||||
$images = json_decode($this->item->images);
|
||||
$canEdit = $this->item->params->get('access-edit');
|
||||
$info = $this->item->params->get('info_block_position', 0);
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
<div class="system-unpublished">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_title')) : ?>
|
||||
<h2 class="item-title">
|
||||
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"> <?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 ($params->get('show_print_icon') || $params->get('show_email_icon') || $canEdit) : ?>
|
||||
<div class="btn-group pull-right"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" role="button"> <span class="icon-cog"></span> <span class="caret"></span> </a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if ($params->get('show_print_icon')) : ?>
|
||||
<li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_email_icon')) : ?>
|
||||
<li class="email-icon"> <?php echo JHtml::_('icon.email', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?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') ); ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
|
||||
<dl class="article-info muted">
|
||||
<dt class="article-info-term">
|
||||
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
|
||||
</dt>
|
||||
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->author; ?>
|
||||
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author); ?>
|
||||
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
|
||||
JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)
|
||||
); ?>
|
||||
<?php else :?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($info == 0) : ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($images->image_intro) && !empty($images->image_intro)) : ?>
|
||||
<?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
|
||||
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
|
||||
<?php if ($images->image_intro_caption):
|
||||
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
|
||||
endif; ?>
|
||||
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$params->get('show_intro')) : ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $this->item->introtext; ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
|
||||
<dl class="article-info muted">
|
||||
<dt class="article-info-term">
|
||||
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
|
||||
</dt>
|
||||
<?php if ($info == 1) : ?>
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->author; ?>
|
||||
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author); ?>
|
||||
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
|
||||
JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)
|
||||
); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && $this->item->parent_slug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($this->params->get('show_tags', 1)) : ?>
|
||||
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
|
||||
<?php echo $this->item->tagLayout->render($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));
|
||||
else :
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$itemId = $active->id;
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
|
||||
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
|
||||
$link = new JUri($link1);
|
||||
$link->setVar('return', base64_encode($returnURL));
|
||||
endif; ?>
|
||||
|
||||
<p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
|
||||
|
||||
<?php if (!$params->get('access-view')) :
|
||||
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
|
||||
elseif ($readmore = $this->item->alternative_readmore) :
|
||||
echo $readmore;
|
||||
if ($params->get('show_readmore_title', 0) != 0) :
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif;
|
||||
elseif ($params->get('show_readmore_title', 0) == 0) :
|
||||
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
|
||||
else :
|
||||
echo JText::_('COM_CONTENT_READ_MORE');
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif; ?>
|
||||
|
||||
</a></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
19
components/com_content/views/featured/tmpl/default_links.php
Normal file
19
components/com_content/views/featured/tmpl/default_links.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @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->catslug)); ?>">
|
||||
<?php echo $item->title; ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
1
components/com_content/views/featured/tmpl/index.html
Normal file
1
components/com_content/views/featured/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
94
components/com_content/views/featured/view.feed.php
Normal file
94
components/com_content/views/featured/view.feed.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Frontpage View class
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewFeatured extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Parameters
|
||||
$app = JFactory::getApplication();
|
||||
$doc = JFactory::getDocument();
|
||||
$params = $app->getParams();
|
||||
$feedEmail = $app->getCfg('feed_email', 'author');
|
||||
$siteEmail = $app->getCfg('mailfrom');
|
||||
|
||||
$doc->link = JRoute::_('index.php?option=com_content&view=featured');
|
||||
|
||||
// Get some data from the model
|
||||
$app->input->set('limit', $app->getCfg('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 = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid));
|
||||
|
||||
// Get row fulltext
|
||||
$db = JFactory::getDbo();
|
||||
$query = 'SELECT' .$db->quoteName('fulltext'). 'FROM #__content WHERE id ='.$row->id;
|
||||
$db->setQuery($query);
|
||||
$row->fulltext = $db->loadResult();
|
||||
|
||||
$description = ($params->get('feed_summary', 0) ? $row->introtext.$row->fulltext : $row->introtext);
|
||||
$author = $row->created_by_alias ? $row->created_by_alias : $row->author;
|
||||
|
||||
// Load individual item creator class
|
||||
$item = new JFeedItem;
|
||||
$item->title = $title;
|
||||
$item->link = $link;
|
||||
$item->date = $row->publish_up;
|
||||
$item->category = array();
|
||||
$item->category[] = JText::_('JFEATURED'); // All featured articles are categorized as "Featured"
|
||||
for ($item_category = $categories->get($row->catid); $item_category !== null; $item_category = $item_category->getParent())
|
||||
{
|
||||
if ($item_category->id > 1) { // Only add non-root categories
|
||||
$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)
|
||||
{
|
||||
$description .= '<p class="feed-readmore"><a target="_blank" href ="' . $item->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);
|
||||
}
|
||||
}
|
||||
}
|
211
components/com_content/views/featured/view.html.php
Normal file
211
components/com_content/views/featured/view.html.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Frontpage View class
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @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();
|
||||
|
||||
protected $columns = 1;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @return mixed False on error, null otherwise.
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
|
||||
$state = $this->get('State');
|
||||
$items = $this->get('Items');
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
// 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 = $params->def('num_leading_articles', 1);
|
||||
$numIntro = $params->def('num_intro_articles', 4);
|
||||
|
||||
// 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;
|
||||
}
|
||||
JPluginHelper::importPlugin('content');
|
||||
$dispatcher->trigger('onContentPrepare', array ('com_content.featured', &$item, &$this->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->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
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->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);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/form/index.html
Normal file
1
components/com_content/views/form/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
6
components/com_content/views/form/metadata.xml
Normal file
6
components/com_content/views/form/metadata.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view title="Form">
|
||||
<message><![CDATA[TYPEARTICLAYDESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
342
components/com_content/views/form/tmpl/edit.php
Normal file
342
components/com_content/views/form/tmpl/edit.php
Normal file
@ -0,0 +1,342 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('behavior.calendar');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
// Create shortcut to parameters.
|
||||
$params = $this->state->get('params');
|
||||
//$images = json_decode($this->item->images);
|
||||
//$urls = json_decode($this->item->urls);
|
||||
|
||||
// This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings.
|
||||
$editoroptions = isset($params->show_publishing_options);
|
||||
if (!$editoroptions)
|
||||
{
|
||||
$params->show_urls_images_frontend = '0';
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'article.cancel' || document.formvalidator.isValid(document.id('adminForm')))
|
||||
{
|
||||
<?php echo $this->form->getField('articletext')->save(); ?>
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="edit item-page<?php echo $this->pageclass_sfx; ?>">
|
||||
<?php if ($params->get('show_page_heading', 1)) : ?>
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<?php echo $this->escape($params->get('page_heading')); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_content&a_id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')">
|
||||
<span class="icon-ok"></span> <?php echo JText::_('JSAVE') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn" onclick="Joomla.submitbutton('article.cancel')">
|
||||
<span class="icon-cancel"></span> <?php echo JText::_('JCANCEL') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#editor" data-toggle="tab"><?php echo JText::_('JEDITOR') ?></a></li>
|
||||
<?php if ($params->get('show_urls_images_frontend') ) : ?>
|
||||
<li><a href="#images" data-toggle="tab"><?php echo JText::_('COM_CONTENT_IMAGES_AND_URLS') ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="#publishing" data-toggle="tab"><?php echo JText::_('COM_CONTENT_PUBLISHING') ?></a></li>
|
||||
<li><a href="#language" data-toggle="tab"><?php echo JText::_('JFIELD_LANGUAGE_LABEL') ?></a></li>
|
||||
<li><a href="#metadata" data-toggle="tab"><?php echo JText::_('COM_CONTENT_METADATA') ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="editor">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('title'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('title'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (is_null($this->item->id)) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('alias'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('alias'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->form->getInput('articletext'); ?>
|
||||
</div>
|
||||
<?php if ($params->get('show_urls_images_frontend')): ?>
|
||||
<div class="tab-pane" id="images">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_intro', 'images'); ?>
|
||||
<?php echo $this->form->getInput('image_intro', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_intro_alt', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('image_intro_alt', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_intro_caption', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('image_intro_caption', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('float_intro', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('float_intro', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_fulltext', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('image_fulltext', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_fulltext_alt', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('image_fulltext_alt', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('image_fulltext_caption', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('image_fulltext_caption', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('float_fulltext', 'images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('float_fulltext', 'images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urla', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urla', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urlatext', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urlatext', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('targeta', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urlb', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urlb', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urlbtext', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urlbtext', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('targetb', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urlc', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urlc', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('urlctext', 'urls'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('urlctext', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('targetc', 'urls'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="tab-pane" id="publishing">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('catid'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('catid'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('tags'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('tags'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('created_by_alias'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('created_by_alias'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->item->params->get('access-change')) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('state'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('state'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('featured'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('featured'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('publish_up'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('publish_up'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('publish_down'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('publish_down'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('access'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('access'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (is_null($this->item->id)):?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo JText::_('COM_CONTENT_ORDERING'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="tab-pane" id="language">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('language'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('language'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="metadata">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('metadesc'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('metadesc'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('metakey'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('metakey'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
|
||||
<?php if ($this->params->get('enable_category', 0) == 1) :?>
|
||||
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
29
components/com_content/views/form/tmpl/edit.xml
Normal file
29
components/com_content/views/form/tmpl/edit.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONTENT_FORM_VIEW_DEFAULT_TITLE" option="COM_CONTENT_FORM_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CREATE"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONTENT_FORM_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="enable_category"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL"
|
||||
description="COM_CONTENT_CREATE_ARTICLE_CATEGORY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="catid"
|
||||
type="category"
|
||||
label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
|
||||
extension="com_content"
|
||||
description="JGLOBAL_CHOOSE_CATEGORY_DESC" />
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
1
components/com_content/views/form/tmpl/index.html
Normal file
1
components/com_content/views/form/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
145
components/com_content/views/form/view.html.php
Normal file
145
components/com_content/views/form/view.html.php
Normal file
@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML Article View class for the Content component
|
||||
*
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewForm extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $return_page;
|
||||
|
||||
protected $state;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Get model data.
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->form = $this->get('Form');
|
||||
$this->return_page = $this->get('ReturnPage');
|
||||
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
$authorised = $user->authorise('core.create', 'com_content') || (count($user->getAuthorisedCategories('com_content', 'core.create')));
|
||||
}
|
||||
else
|
||||
{
|
||||
$authorised = $this->item->params->get('access-edit');
|
||||
}
|
||||
|
||||
if ($authorised !== true)
|
||||
{
|
||||
JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->item->tags = new JHelperTags;
|
||||
if (!empty($this->item->id))
|
||||
{
|
||||
$this->item->tags->getItemTags('com_content.article.', $this->item->id);
|
||||
}
|
||||
if (!empty($this->item) && isset($this->item->id))
|
||||
{
|
||||
$this->item->images = json_decode($this->item->images);
|
||||
$this->item->urls = json_decode($this->item->urls);
|
||||
|
||||
$tmp = new stdClass;
|
||||
$tmp->images = $this->item->images;
|
||||
$tmp->urls = $this->item->urls;
|
||||
$this->form->bind($tmp);
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseWarning(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create a shortcut to the parameters.
|
||||
$params = &$this->state->params;
|
||||
|
||||
//Escape strings for HTML output
|
||||
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
|
||||
|
||||
$this->params = $params;
|
||||
$this->user = $user;
|
||||
|
||||
if ($params->get('enable_category') == 1)
|
||||
{
|
||||
$this->form->setFieldAttribute('catid', 'default', $params->get('catid', 1));
|
||||
$this->form->setFieldAttribute('catid', 'readonly', 'true');
|
||||
}
|
||||
$this->_prepareDocument();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
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::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
|
||||
}
|
||||
|
||||
$title = $this->params->def('page_title', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
|
||||
if ($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);
|
||||
|
||||
$pathway = $app->getPathWay();
|
||||
$pathway->addItem($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'));
|
||||
}
|
||||
}
|
||||
}
|
1
components/com_content/views/index.html
Normal file
1
components/com_content/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
Reference in New Issue
Block a user