You've already forked joomla_test
							
							first commit
This commit is contained in:
		
							
								
								
									
										137
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/default.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/default.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,137 @@
 | 
			
		||||
<?php
 | 
			
		||||
/**
 | 
			
		||||
 * @package     Joomla.Site
 | 
			
		||||
 * @subpackage  com_newsfeeds
 | 
			
		||||
 *
 | 
			
		||||
 * @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
 | 
			
		||||
if (!empty($this->msg))
 | 
			
		||||
{
 | 
			
		||||
	echo $this->msg;
 | 
			
		||||
}
 | 
			
		||||
else
 | 
			
		||||
{
 | 
			
		||||
	$lang = JFactory::getLanguage();
 | 
			
		||||
	$myrtl = $this->newsfeed->rtl;
 | 
			
		||||
	$direction = " ";
 | 
			
		||||
 | 
			
		||||
		if ($lang->isRTL() && $myrtl == 0)
 | 
			
		||||
		{
 | 
			
		||||
			$direction = " redirect-rtl";
 | 
			
		||||
		}
 | 
			
		||||
		elseif ($lang->isRTL() && $myrtl == 1)
 | 
			
		||||
		{
 | 
			
		||||
				$direction = " redirect-ltr";
 | 
			
		||||
		}
 | 
			
		||||
		elseif ($lang->isRTL() && $myrtl == 2)
 | 
			
		||||
		{
 | 
			
		||||
			$direction = " redirect-rtl";
 | 
			
		||||
		}
 | 
			
		||||
		elseif ($myrtl == 0)
 | 
			
		||||
		{
 | 
			
		||||
			$direction = " redirect-ltr";
 | 
			
		||||
		}
 | 
			
		||||
		elseif ($myrtl == 1)
 | 
			
		||||
		{
 | 
			
		||||
			$direction = " redirect-ltr";
 | 
			
		||||
		}
 | 
			
		||||
		elseif ($myrtl == 2)
 | 
			
		||||
		{
 | 
			
		||||
			$direction = " redirect-rtl";
 | 
			
		||||
		}
 | 
			
		||||
		$images  = json_decode($this->item->images);
 | 
			
		||||
	?>
 | 
			
		||||
	<div class="newsfeed<?php echo $this->pageclass_sfx?><?php echo $direction; ?>">
 | 
			
		||||
	<?php if ($this->params->get('display_num')) :  ?>
 | 
			
		||||
	<h1 class="<?php echo $direction; ?>">
 | 
			
		||||
		<?php echo $this->escape($this->params->get('page_heading')); ?>
 | 
			
		||||
	</h1>
 | 
			
		||||
	<?php endif; ?>
 | 
			
		||||
	<h2 class="<?php echo $direction; ?>">
 | 
			
		||||
		<?php if ($this->item->published == 0) : ?>
 | 
			
		||||
			<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
 | 
			
		||||
		<?php endif; ?>
 | 
			
		||||
		<a href="<?php echo $this->item->link; ?>" target="_blank">
 | 
			
		||||
		<?php echo str_replace(''', "'", $this->item->name); ?></a>
 | 
			
		||||
	</h2>
 | 
			
		||||
 | 
			
		||||
	<?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; ?>
 | 
			
		||||
 | 
			
		||||
	<!-- Show Images from Component -->
 | 
			
		||||
	<?php  if (isset($images->image_first) and !empty($images->image_first)) : ?>
 | 
			
		||||
	<?php $imgfloat = (empty($images->float_first)) ? $this->params->get('float_first') : $images->float_first; ?>
 | 
			
		||||
	<div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>"> <img
 | 
			
		||||
		<?php if ($images->image_first_caption):
 | 
			
		||||
			echo 'class="caption"'.' title="' .htmlspecialchars($images->image_first_caption) .'"';
 | 
			
		||||
		endif; ?>
 | 
			
		||||
		src="<?php echo htmlspecialchars($images->image_first); ?>" alt="<?php echo htmlspecialchars($images->image_first_alt); ?>"/> </div>
 | 
			
		||||
	<?php endif; ?>
 | 
			
		||||
 | 
			
		||||
	<?php  if (isset($images->image_second) and !empty($images->image_second)) : ?>
 | 
			
		||||
	<?php $imgfloat = (empty($images->float_second)) ? $this->params->get('float_second') : $images->float_second; ?>
 | 
			
		||||
	<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
 | 
			
		||||
	<?php if ($images->image_second_caption):
 | 
			
		||||
		echo 'class="caption"'.' title="' .htmlspecialchars($images->image_second_caption) .'"';
 | 
			
		||||
	endif; ?>
 | 
			
		||||
	src="<?php echo htmlspecialchars($images->image_second); ?>" alt="<?php echo htmlspecialchars($images->image_second_alt); ?>"/> </div>
 | 
			
		||||
	<?php endif; ?>
 | 
			
		||||
	<!-- Show Description from Component -->
 | 
			
		||||
<?php echo $this->item->description; ?>
 | 
			
		||||
	<!-- Show Feed's Description -->
 | 
			
		||||
 | 
			
		||||
	<?php if ($this->params->get('show_feed_description')) : ?>
 | 
			
		||||
		<div class="feed-description">
 | 
			
		||||
			<?php echo str_replace(''', "'", $this->rssDoc->description); ?>
 | 
			
		||||
		</div>
 | 
			
		||||
	<?php endif; ?>
 | 
			
		||||
 | 
			
		||||
	<!-- Show Image -->
 | 
			
		||||
	<?php if (isset($this->rssDoc->image) && isset($this->rssDoc->imagetitle) && $this->params->get('show_feed_image')) : ?>
 | 
			
		||||
	<div>
 | 
			
		||||
			<img src="<?php echo $this->rssDoc->image; ?>" alt="<?php echo $this->rssDoc->image->decription; ?>" />
 | 
			
		||||
</div>
 | 
			
		||||
<?php endif; ?>
 | 
			
		||||
 | 
			
		||||
	<!-- Show items -->
 | 
			
		||||
	<?php if (!empty($this->rssDoc[0])) { ?>
 | 
			
		||||
	<ol>
 | 
			
		||||
		<?php for ($i = 0; $i < $this->item->numarticles; $i++) { ?>
 | 
			
		||||
 | 
			
		||||
	<?php
 | 
			
		||||
		$uri = !empty($this->rssDoc[$i]->guid) || !is_null($this->rssDoc[$i]->guid) ? $this->rssDoc[$i]->guid : $this->rssDoc[$i]->uri;
 | 
			
		||||
		$uri = substr($uri, 0, 4) != 'http' ? $this->item->link : $uri;
 | 
			
		||||
		$text = !empty($this->rssDoc[$i]->content) || !is_null($this->rssDoc[$i]->content) ? $this->rssDoc[$i]->content : $this->rssDoc[$i]->description;
 | 
			
		||||
	?>
 | 
			
		||||
			<li>
 | 
			
		||||
				<?php if (!empty($this->rssDoc[$i]->uri)) : ?>
 | 
			
		||||
					<a href="<?php echo $this->rssDoc[$i]->uri; ?>" target="_blank">
 | 
			
		||||
					<?php  echo $this->rssDoc[$i]->title; ?></a>
 | 
			
		||||
				<?php else : ?>
 | 
			
		||||
					<h3><?php  echo '<a target="_blank" href="' .$this->rssDoc[$i]->uri . '">' .$this->rssDoc[$i]->title. '</a>'; ?></h3>
 | 
			
		||||
				<?php  endif; ?>
 | 
			
		||||
				<?php if ($this->params->get('show_item_description') && !empty($text)) : ?>
 | 
			
		||||
					<div class="feed-item-description">
 | 
			
		||||
					<?php if ($this->params->get('show_feed_image', 0) == 0)
 | 
			
		||||
					{
 | 
			
		||||
						$text = JFilterOutput::stripImages($text);
 | 
			
		||||
					}
 | 
			
		||||
					$text = JHtml::_('string.truncate', $text, $this->params->get('feed_character_count'));
 | 
			
		||||
						echo str_replace(''', "'", $text);
 | 
			
		||||
					?>
 | 
			
		||||
 | 
			
		||||
					</div>
 | 
			
		||||
				<?php endif; ?>
 | 
			
		||||
				</li>
 | 
			
		||||
			<?php } ?>
 | 
			
		||||
			</ol>
 | 
			
		||||
		<?php } ?>
 | 
			
		||||
	</div>
 | 
			
		||||
<?php } ?>
 | 
			
		||||
							
								
								
									
										87
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/default.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/default.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,87 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<metadata>
 | 
			
		||||
	<layout title="COM_NEWSFEEDS_NEWSFEED_VIEW_DEFAULT_TITLE" option="COM_NEWSFEEDS_NEWSFEED_VIEW_DEFAULT_OPTION">
 | 
			
		||||
		<help
 | 
			
		||||
			key = "JHELP_MENUS_MENU_ITEM_NEWSFEED_SINGLE_NEWSFEED"
 | 
			
		||||
		/>
 | 
			
		||||
		<message>
 | 
			
		||||
			<![CDATA[COM_NEWSFEEDS_NEWSFEED_VIEW_DEFAULT_DESC]]>
 | 
			
		||||
		</message>
 | 
			
		||||
	</layout>
 | 
			
		||||
 | 
			
		||||
	<!-- Add fields to the request variables for the layout. -->
 | 
			
		||||
	<fields name="request">
 | 
			
		||||
		<fieldset name="request"
 | 
			
		||||
			addfieldpath="/administrator/components/com_newsfeeds/models/fields"
 | 
			
		||||
		 >
 | 
			
		||||
 | 
			
		||||
			<field name="id" type="modal_newsfeed"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_SELECT_FEED_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_SELECT_FEED_LABEL"
 | 
			
		||||
				required="true"
 | 
			
		||||
				edit="true"
 | 
			
		||||
				clear="false"
 | 
			
		||||
			/>
 | 
			
		||||
		</fieldset>
 | 
			
		||||
	</fields>
 | 
			
		||||
 | 
			
		||||
	<!-- Add fields to the parameters object for the layout. -->
 | 
			
		||||
	<fields name="params">
 | 
			
		||||
 | 
			
		||||
		<!-- Basic options. -->
 | 
			
		||||
<fieldset name="basic" label="COM_NEWSFEEDS_FIELDSET_MORE_OPTIONS_LABEL">
 | 
			
		||||
			<field name="show_feed_image" type="list"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_SHOW_FEED_IMAGE_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_SHOW_FEED_IMAGE_LABEL"
 | 
			
		||||
			>
 | 
			
		||||
				<option value="">JGLOBAL_USE_GLOBAL</option>
 | 
			
		||||
				<option value="0">JHIDE</option>
 | 
			
		||||
				<option value="1">JSHOW</option>
 | 
			
		||||
			</field>
 | 
			
		||||
 | 
			
		||||
			<field name="show_feed_description" type="list"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_SHOW_FEED_DESCRIPTION_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_SHOW_FEED_DESCRIPTION_LABEL"
 | 
			
		||||
			>
 | 
			
		||||
				<option value="">JGLOBAL_USE_GLOBAL</option>
 | 
			
		||||
				<option value="0">JHIDE</option>
 | 
			
		||||
				<option value="1">JSHOW</option>
 | 
			
		||||
			</field>
 | 
			
		||||
 | 
			
		||||
			<field name="show_item_description" type="list"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_SHOW_ITEM_DESCRIPTION_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_SHOW_ITEM_DESCRIPTION_LABEL"
 | 
			
		||||
			>
 | 
			
		||||
				<option value="">JGLOBAL_USE_GLOBAL</option>
 | 
			
		||||
				<option value="0">JHIDE</option>
 | 
			
		||||
				<option value="1">JSHOW</option>
 | 
			
		||||
			</field>
 | 
			
		||||
 | 
			
		||||
			<field name="show_tags" type="list"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_SHOW_TAGS_LABEL"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_SHOW_TAGS_DESC"
 | 
			
		||||
			>
 | 
			
		||||
				<option value="">JGLOBAL_USE_GLOBAL</option>
 | 
			
		||||
				<option value="0">JHIDE</option>
 | 
			
		||||
				<option value="1">JSHOW</option>
 | 
			
		||||
			</field>
 | 
			
		||||
 | 
			
		||||
			<field name="feed_character_count" type="text"
 | 
			
		||||
				default="0"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_LABEL"
 | 
			
		||||
				size="6"
 | 
			
		||||
			/>
 | 
			
		||||
 | 
			
		||||
			<field name="feed_display_order" type="list"
 | 
			
		||||
				description="COM_NEWSFEEDS_FIELD_FEED_DISPLAY_ORDER_DESC"
 | 
			
		||||
				label="COM_NEWSFEEDS_FIELD_FEED_DISPLAY_ORDER_LABEL"
 | 
			
		||||
			>
 | 
			
		||||
				<option value="">JGLOBAL_USE_GLOBAL</option>
 | 
			
		||||
				<option value="des">JGLOBAL_MOST_RECENT_FIRST</option>
 | 
			
		||||
				<option value="asc">JGLOBAL_OLDEST_FIRST</option>
 | 
			
		||||
			</field>
 | 
			
		||||
			
 | 
			
		||||
		</fieldset>
 | 
			
		||||
	</fields>
 | 
			
		||||
</metadata>
 | 
			
		||||
							
								
								
									
										1
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								components/com_newsfeeds/views/newsfeed/tmpl/index.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
<!DOCTYPE html><title></title>
 | 
			
		||||
		Reference in New Issue
	
	Block a user