| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/mod_latestactions.tar |
tmpl/default.php 0000604 00000002161 15245572045 0007662 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_latestactions
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @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>
helper.php 0000604 00000003537 15245572045 0006551 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_latestactions
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @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.xml 0000604 00000005107 15245572045 0011012 0 ustar 00 <?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>(C) 2018 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.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"
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="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>
mod_latestactions.php 0000604 00000001414 15245572045 0010776 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_latestactions
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @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'));