Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/css/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/css/mod_feed.zip

PK��[�\����
helper.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_feed
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Helper for mod_feed
 *
 * @since  1.5
 */
class ModFeedHelper
{
	/**
	 * Retrieve feed information
	 *
	 * @param   \Joomla\Registry\Registry  $params  module parameters
	 *
	 * @return  JFeedReader|string
	 */
	public static function getFeed($params)
	{
		// Module params
		$rssurl = $params->get('rssurl', '');

		// Get RSS parsed object
		try
		{
			$feed   = new JFeedFactory;
			$rssDoc = $feed->getFeed($rssurl);
		}
		catch (Exception $e)
		{
			return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
		}

		if (empty($rssDoc))
		{
			return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
		}

		if ($rssDoc)
		{
			return $rssDoc;
		}
	}
}
PK��[Z��mod_feed.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_feed
 *
 * @copyright   (C) 2005 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the feed functions only once
JLoader::register('ModFeedHelper', __DIR__ .
'/helper.php');

$rssurl = $params->get('rssurl', '');
$rssrtl = $params->get('rssrtl', 0);

// Check if feed URL has been set
if (empty ($rssurl))
{
	echo '<div>';
	echo JText::_('MOD_FEED_ERR_NO_URL');
	echo '</div>';

	return;
}

$feed = ModFeedHelper::getFeed($params);
$moduleclass_sfx =
htmlspecialchars($params->get('moduleclass_sfx',
''), ENT_COMPAT, 'UTF-8');

require JModuleHelper::getLayoutPath('mod_feed',
$params->get('layout', 'default'));
PK��[ȓѥ55mod_feed.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1"
client="site" method="upgrade">
	<name>mod_feed</name>
	<author>Joomla! Project</author>
	<creationDate>July 2005</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>MOD_FEED_XML_DESCRIPTION</description>
	<files>
		<filename module="mod_feed">mod_feed.php</filename>
		<folder>tmpl</folder>
		<filename>helper.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.mod_feed.ini</language>
		<language
tag="en-GB">en-GB.mod_feed.sys.ini</language>
	</languages>
	<help key="JHELP_EXTENSIONS_MODULE_MANAGER_FEED_DISPLAY"
/>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="rssurl"
					type="url"
					label="MOD_FEED_FIELD_RSSURL_LABEL"
					description="MOD_FEED_FIELD_RSSURL_DESC"
					size="50"
					filter="url"
					required="true"
					validate="url"
				/>

				<field
					name="rssrtl"
					type="radio"
					label="MOD_FEED_FIELD_RTL_LABEL"
					description="MOD_FEED_FIELD_RTL_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rsstitle"
					type="radio"
					label="MOD_FEED_FIELD_RSSTITLE_LABEL"
					description="MOD_FEED_FIELD_RSSTITLE_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rssdesc"
					type="radio"
					label="MOD_FEED_FIELD_DESCRIPTION_LABEL"
					description="MOD_FEED_FIELD_DESCRIPTION_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rssdate"
					type="radio"
					label="MOD_FEED_FIELD_DATE_LABEL"
					description="MOD_FEED_FIELD_DATE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rssimage"
					type="radio"
					label="MOD_FEED_FIELD_IMAGE_LABEL"
					description="MOD_FEED_FIELD_IMAGE_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rssitems"
					type="number"
					label="MOD_FEED_FIELD_ITEMS_LABEL"
					description="MOD_FEED_FIELD_ITEMS_DESC"
					default="3"
					filter="integer"
				/>

				<field
					name="rssitemdesc"
					type="radio"
					label="MOD_FEED_FIELD_ITEMDESCRIPTION_LABEL"
					description="MOD_FEED_FIELD_ITEMDESCRIPTION_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="rssitemdate"
					type="radio"
					label="MOD_FEED_FIELD_ITEMDATE_LABEL"
					description="MOD_FEED_FIELD_ITEMDATE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="word_count"
					type="text"
					label="MOD_FEED_FIELD_WORDCOUNT_LABEL"
					description="MOD_FEED_FIELD_WORDCOUNT_DESC"
					size="6"
					default="0"
					filter="integer"
				/>
			</fieldset>
			<fieldset name="advanced">
				<field
					name="layout"
					type="modulelayout"
					label="JFIELD_ALT_LAYOUT_LABEL"
					description="JFIELD_ALT_MODULE_LAYOUT_DESC"
					validate="moduleLayout"
				/>

				<field
					name="moduleclass_sfx"
					type="textarea"
					label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
					description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
					rows="3"
				/>

				<field
					name="cache"
					type="list"
					label="COM_MODULES_FIELD_CACHING_LABEL"
					description="COM_MODULES_FIELD_CACHING_DESC"
					default="1"
					filter="integer"
					>
					<option value="1">JGLOBAL_USE_GLOBAL</option>
					<option
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
				</field>

				<field
					name="cache_time"
					type="number"
					label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
					description="COM_MODULES_FIELD_CACHE_TIME_DESC"
					default="900"
					filter="integer"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK��[d��|��tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_feed
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<?php
if (!empty($feed) && is_string($feed))
{
	echo $feed;
}
else
{
	$lang      = JFactory::getLanguage();
	$myrtl     = $params->get('rssrtl', 0);
	$direction = ' ';

	$isRtl = $lang->isRtl();

	if ($isRtl && $myrtl == 0)
	{
		$direction = ' redirect-rtl';
	}

	// Feed description
	elseif ($isRtl && $myrtl == 1)
	{
		$direction = ' redirect-ltr';
	}

	elseif ($isRtl && $myrtl == 2)
	{
		$direction = ' redirect-rtl';
	}

	elseif ($myrtl == 0)
	{
		$direction = ' redirect-ltr';
	}
	elseif ($myrtl == 1)
	{
		$direction = ' redirect-ltr';
	}
	elseif ($myrtl == 2)
	{
		$direction = ' redirect-rtl';
	}

	if ($feed !== false)
	{
		?>
		<div style="direction: <?php echo $rssrtl ? 'rtl'
:'ltr'; ?>; text-align: <?php echo $rssrtl ?
'right' :'left'; ?> !important"
class="feed<?php echo $moduleclass_sfx; ?>">
		<?php
		// Feed description
		if ($feed->title !== null &&
$params->get('rsstitle', 1))
		{
			?>
					<h2 class="<?php echo $direction; ?>">
						<a href="<?php echo htmlspecialchars($rssurl, ENT_COMPAT,
'UTF-8'); ?>" target="_blank">
						<?php echo $feed->title; ?></a>
					</h2>
			<?php
		}
		// Feed date
		if ($params->get('rssdate', 1)) : ?>
			<h3>
			<?php echo JHtml::_('date', $feed->publishedDate,
JText::_('DATE_FORMAT_LC3')); ?>
			</h3>
		<?php endif;
		// Feed description
		if ($params->get('rssdesc', 1))
		{
		?>
			<?php echo $feed->description; ?>
			<?php
		}
		// Feed image
		if ($feed->image && $params->get('rssimage', 1))
:
		?>
			<img src="<?php echo $feed->image->uri; ?>"
alt="<?php echo $feed->image->title; ?>"/>
		<?php endif; ?>


	<!-- Show items -->
	<?php if (!empty($feed))
	{ ?>
		<ul class="newsfeed<?php echo
$params->get('moduleclass_sfx'); ?>">
		<?php for ($i = 0, $max = min(count($feed),
$params->get('rssitems', 3)); $i < $max; $i++) { ?>
			<?php
				$uri  = $feed[$i]->uri || !$feed[$i]->isPermaLink ?
trim($feed[$i]->uri) : trim($feed[$i]->guid);
				$uri  = !$uri || stripos($uri, 'http') !== 0 ? $rssurl :
$uri;
				$text = $feed[$i]->content !== '' ?
trim($feed[$i]->content) : '';
			?>
				<li>
					<?php if (!empty($uri)) : ?>
						<span class="feed-link">
						<a href="<?php echo htmlspecialchars($uri, ENT_COMPAT,
'UTF-8'); ?>" target="_blank">
						<?php echo trim($feed[$i]->title); ?></a></span>
					<?php else : ?>
						<span class="feed-link"><?php echo
trim($feed[$i]->title); ?></span>
					<?php endif; ?>
					<?php if ($params->get('rssitemdate', 0)) : ?>
						<div class="feed-item-date">
							<?php echo JHtml::_('date',
$feed[$i]->publishedDate, JText::_('DATE_FORMAT_LC3')); ?>
						</div>
					<?php endif; ?>
					<?php if ($params->get('rssitemdesc', 1) &&
$text !== '') : ?>
						<div class="feed-item-description">
						<?php
							// Strip the images.
							$text = JFilterOutput::stripImages($text);
							$text = JHtml::_('string.truncate', $text,
$params->get('word_count', 0));
							echo str_replace('&apos;', "'", $text);
						?>
						</div>
					<?php endif; ?>
				</li>
		<?php } ?>
		</ul>
	<?php } ?>
	</div>
	<?php }
}
PK��[�\����
helper.phpnu�[���PK��[Z���mod_feed.phpnu�[���PK��[ȓѥ55mod_feed.xmlnu�[���PK��[d��|���tmpl/default.phpnu�[���PK2�&