Spade

Mini Shell

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

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/www/css/mod_latestactions.tar

helper.php000064400000003554151165420550006547 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_latestactions
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;

/**
 * Helper for mod_latestactions
 *
 * @since  3.9.0
 */
abstract class ModLatestActionsHelper
{
	/**
	 * Get a list of articles.
	 *
	 * @param   \Joomla\Registry\Registry  &$params  The module
parameters.
	 *
	 * @return  mixed  An array of action logs, or false on error.
	 */
	public static function getList(&$params)
	{
		JLoader::register('ActionlogsModelActionlogs',
JPATH_ADMINISTRATOR .
'/components/com_actionlogs/models/actionlogs.php');
		JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR .
'/components/com_actionlogs/helpers/actionlogs.php');

		/* @var ActionlogsModelActionlogs $model */
		$model = BaseDatabaseModel::getInstance('Actionlogs',
'ActionlogsModel', array('ignore_request' => true));

		// Set the Start and Limit
		$model->setState('list.start', 0);
		$model->setState('list.limit',
$params->get('count', 5));
		$model->setState('list.ordering', 'a.id');
		$model->setState('list.direction', 'DESC');

		$rows = $model->getItems();

		// Load all actionlog plugins language files
		ActionlogsHelper::loadActionLogPluginsLanguage();

		foreach ($rows as $row)
		{
			$row->message = ActionlogsHelper::getHumanReadableLogMessage($row);
		}

		return $rows;
	}

	/**
	 * Get the alternate title for the module
	 *
	 * @param   \Joomla\Registry\Registry  $params  The module parameters.
	 *
	 * @return  string    The alternate title for the module.
	 *
	 * @since   3.9.1
	 */
	public static function getTitle($params)
	{
		return Text::plural('MOD_LATESTACTIONS_TITLE',
$params->get('count', 5));
	}
}
mod_latestactions.php000064400000001431151165420550010774 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_latestactions
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;

// Only super user can view this data
if (!Factory::getUser()->authorise('core.admin'))
{
	return;
}

// Include dependencies.
JLoader::register('ModLatestActionsHelper', __DIR__ .
'/helper.php');

$list = ModLatestActionsHelper::getList($params);

if ($params->get('automatic_title', 0))
{
	$module->title = ModLatestActionsHelper::getTitle($params);
}

require ModuleHelper::getLayoutPath('mod_latestactions',
$params->get('layout', 'default'));
mod_latestactions.xml000064400000005113151165420550011006 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1"
client="administrator" method="upgrade">
	<name>mod_latestactions</name>
	<author>Joomla! Project</author>
	<creationDate>May 2018</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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.9.0</version>
	<description>MOD_LATESTACTIONS_XML_DESCRIPTION</description>
	<files>
		<filename
module="mod_latestactions">mod_latestactions.php</filename>
		<filename>helper.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.mod_latestactions.ini</language>
		<language
tag="en-GB">en-GB.mod_latestactions.sys.ini</language>
	</languages>
	<help
key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LATESTACTIONS" />
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="count"
					type="number"
					label="MOD_LATESTACTIONS_FIELD_COUNT_LABEL"
					description="MOD_LATESTACTIONS_FIELD_COUNT_DESC"
					default="5"
					filter="integer"
				/>
			</fieldset>
			<fieldset name="advanced">
				<field
					name="layout"
					type="modulelayout"
					label="JFIELD_ALT_LAYOUT_LABEL"
					description="JFIELD_ALT_MODULE_LAYOUT_DESC"
				/>

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

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

				<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"
				/>

				<field
					name="cachemode"
					type="hidden"
					default="static"
					>
					<option value="static"></option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
tmpl/default.php000064400000002176151165420550007667 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_latestactions
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

HTMLHelper::_('bootstrap.tooltip');
?>
<div class="row-striped">
	<?php if (count($list)) : ?>
		<?php foreach ($list as $i => $item) : ?>
			<div class="row-fluid">
				<div class="span8 truncate">
					<?php echo $item->message; ?>
				</div>
				<div class="span4">
					<div class="small pull-right hasTooltip"
title="<?php echo HTMLHelper::_('tooltipText',
'JGLOBAL_FIELD_CREATED_LABEL'); ?>">
						<span class="icon-calendar"
aria-hidden="true"></span> <?php echo
HTMLHelper::_('date', $item->log_date,
JText::_('DATE_FORMAT_LC5')); ?>
					</div>
				</div>
			</div>
		<?php endforeach; ?>
	<?php else : ?>
		<div class="row-fluid">
			<div class="span12">
				<div class="alert"><?php echo
Text::_('MOD_LATEST_ACTIONS_NO_MATCHING_RESULTS');
?></div>
			</div>
		</div>
	<?php endif; ?>
</div>