You've already forked joomla_test
							
							first commit
This commit is contained in:
		
							
								
								
									
										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);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user