You've already forked joomla_test
first commit
This commit is contained in:
1
administrator/modules/index.html
Normal file
1
administrator/modules/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_custom/index.html
Normal file
1
administrator/modules/mod_custom/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
18
administrator/modules/mod_custom/mod_custom.php
Normal file
18
administrator/modules/mod_custom/mod_custom.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_custom
|
||||
*
|
||||
* @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;
|
||||
|
||||
if ($params->def('prepare_content', 1))
|
||||
{
|
||||
JPluginHelper::importPlugin('content');
|
||||
$module->content = JHtml::_('content.prepare', $module->content, '', 'mod_custom.content');
|
||||
}
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_custom');
|
76
administrator/modules/mod_custom/mod_custom.xml
Normal file
76
administrator/modules/mod_custom/mod_custom.xml
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_custom</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>July 2004</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_CUSTOM_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_custom">mod_custom.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_custom.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_custom.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_CUSTOM" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="prepare_content"
|
||||
type="radio"
|
||||
label="MOD_CUSTOM_FIELD_PREPARE_CONTENT_LABEL"
|
||||
class="btn-group"
|
||||
description="MOD_CUSTOM_FIELD_PREPARE_CONTENT_DESC"
|
||||
default="1">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="text"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
12
administrator/modules/mod_custom/tmpl/default.php
Normal file
12
administrator/modules/mod_custom/tmpl/default.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_custom
|
||||
*
|
||||
* @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;
|
||||
|
||||
echo $module->content;
|
1
administrator/modules/mod_custom/tmpl/index.html
Normal file
1
administrator/modules/mod_custom/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
59
administrator/modules/mod_feed/helper.php
Normal file
59
administrator/modules/mod_feed/helper.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_feed
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Helper for mod_feed
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_feed
|
||||
* @since 1.5
|
||||
*/
|
||||
class ModFeedHelper
|
||||
{
|
||||
/**
|
||||
* Method to load a feed.
|
||||
*
|
||||
* @param JRegisty $params The parameters object.
|
||||
*
|
||||
* @return JFeedReader|string Return a JFeedReader object or a string message if error.
|
||||
*/
|
||||
static function getFeed($params)
|
||||
{
|
||||
// Module params
|
||||
$rssurl = $params->get('rssurl', '');
|
||||
|
||||
// Get RSS parsed object
|
||||
try
|
||||
{
|
||||
jimport('joomla.feed.factory');
|
||||
$feed = new JFeedFactory;
|
||||
$rssDoc = $feed->getFeed($rssurl);
|
||||
}
|
||||
catch (InvalidArgumentException $e)
|
||||
{
|
||||
return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
|
||||
}
|
||||
catch (RunTimeException $e)
|
||||
{
|
||||
return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
|
||||
}
|
||||
catch (LogicException $e)
|
||||
{
|
||||
return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
|
||||
}
|
||||
|
||||
if (empty($rssDoc))
|
||||
{
|
||||
return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
|
||||
}
|
||||
return $rssDoc;
|
||||
}
|
||||
}
|
1
administrator/modules/mod_feed/index.html
Normal file
1
administrator/modules/mod_feed/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
31
administrator/modules/mod_feed/mod_feed.php
Normal file
31
administrator/modules/mod_feed/mod_feed.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_feed
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the syndicate functions only once
|
||||
require_once __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'));
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_feed', $params->get('layout', 'default'));
|
144
administrator/modules/mod_feed/mod_feed.xml
Normal file
144
administrator/modules/mod_feed/mod_feed.xml
Normal file
@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_feed</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>July 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_FEED_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_feed">mod_feed.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</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_ADMIN_FEED" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="rssurl"
|
||||
type="text"
|
||||
size="50"
|
||||
label="MOD_FEED_FIELD_RSSURL_LABEL"
|
||||
description="MOD_FEED_FIELD_RSSURL_DESC" />
|
||||
<field
|
||||
name="rssrtl"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="MOD_FEED_FIELD_RTL_LABEL"
|
||||
description="MOD_FEED_FIELD_RTL_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="rsstitle"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_FEED_FIELD_RSSTITLE_LABEL"
|
||||
description="MOD_FEED_FIELD_RSSTITLE_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="rssdesc"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_FEED_FIELD_DESCRIPTION_LABEL"
|
||||
description="MOD_FEED_FIELD_DESCRIPTION_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="rssimage"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_FEED_FIELD_IMAGE_LABEL"
|
||||
description="MOD_FEED_FIELD_IMAGE_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="rssitems"
|
||||
type="text"
|
||||
default="3"
|
||||
label="MOD_FEED_FIELD_ITEMS_LABEL"
|
||||
description="MOD_FEED_FIELD_ITEMS_DESC" />
|
||||
<field
|
||||
name="rssitemdesc"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_FEED_FIELD_ITEMDESCRIPTION_LABEL"
|
||||
description="MOD_FEED_FIELD_ITEMDESCRIPTION_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="word_count"
|
||||
type="text"
|
||||
size="6"
|
||||
default="0"
|
||||
label="MOD_FEED_FIELD_WORDCOUNT_LABEL"
|
||||
description="MOD_FEED_FIELD_WORDCOUNT_DESC" />
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="text"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
109
administrator/modules/mod_feed/tmpl/default.php
Normal file
109
administrator/modules/mod_feed/tmpl/default.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_feed
|
||||
*
|
||||
* @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 (is_string($feed))
|
||||
{
|
||||
echo $feed;
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = JFactory::getLanguage();
|
||||
$myrtl = $params->get('rssrtl');
|
||||
$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";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($feed != false) : ?>
|
||||
<?php
|
||||
// Image handling
|
||||
$iUrl = isset($feed->image) ? $feed->image : null;
|
||||
$iTitle = isset($feed->imagetitle) ? $feed->imagetitle : null;
|
||||
?>
|
||||
<div class="row-striped">
|
||||
<div style="direction: <?php echo $rssrtl ? 'rtl' : 'ltr'; ?>; text-align: <?php echo $rssrtl ? 'right' : 'left'; ?> ! important" class="feed<?php echo $moduleclass_sfx; ?>">
|
||||
<?php if (!is_null($feed->title) && $params->get('rsstitle', 1)) : ?>
|
||||
<h2 class="redirect-ltr">
|
||||
<a href="<?php echo str_replace('&', '&', $feed->link); ?>" target="_blank">
|
||||
<?php echo $feed->title; ?></a>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('rssdesc', 1)) : ?>
|
||||
<?php echo $feed->description; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('rssimage', 1) && $iUrl) : ?>
|
||||
<img src="<?php echo $iUrl; ?>" alt="<?php echo @$iTitle; ?>"/>
|
||||
<?php endif; ?>
|
||||
|
||||
<ul class="newsfeed<?php echo $params->get('moduleclass_sfx'); ?>">
|
||||
<?php if (!empty($feed)) : ?>
|
||||
<?php for ($i = 0; $i < $params->get('rssitems', 5); $i++) : ?>
|
||||
<?php
|
||||
$uri = (!empty($feed[$i]->guid) || !is_null($feed[$i]->guid)) ? $feed[$i]->guid : $feed[$i]->uri;
|
||||
$uri = substr($uri, 0, 4) != 'http' ? $params->get('rsslink') : $uri;
|
||||
$text = !empty($feed[$i]->content) || !is_null($feed[$i]->content) ? $feed[$i]->content : $feed[$i]->description;
|
||||
?>
|
||||
<li>
|
||||
<?php if (!empty($uri)) : ?>
|
||||
<h5 class="feed-link">
|
||||
<a href="<?php echo $uri; ?>" target="_blank">
|
||||
<?php echo $feed[$i]->title; ?></a></h5>
|
||||
<?php else : ?>
|
||||
<h5 class="feed-link"><?php echo $feed[$i]->title; ?></h5>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('rssitemdesc') && !empty($text)) : ?>
|
||||
<div class="feed-item-description">
|
||||
<?php
|
||||
// Strip the images.
|
||||
$text = JFilterOutput::stripImages($text);
|
||||
|
||||
$text = JHtml::_('string.truncate', $text, $params->get('word_count'));
|
||||
echo str_replace(''', "'", $text);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
1
administrator/modules/mod_feed/tmpl/index.html
Normal file
1
administrator/modules/mod_feed/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_k2_quickicons/index.html
Normal file
1
administrator/modules/mod_k2_quickicons/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: mod_k2_quickicons.php 1978 2013-05-15 19:34:16Z joomlaworks $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die ;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
if (K2_JVERSION != '15')
|
||||
{
|
||||
|
||||
if (!$user->authorise('core.manage', 'com_k2'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$language = JFactory::getLanguage();
|
||||
$language->load('mod_k2.j16', JPATH_ADMINISTRATOR);
|
||||
if ($user->authorise('core.admin', 'com_k2'))
|
||||
{
|
||||
$user->gid = 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
$user->gid = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// JoomlaWorks reference parameters
|
||||
$mod_name = "mod_k2_quickicons";
|
||||
$mod_copyrights_start = "\n\n<!-- JoomlaWorks \"K2 QuickIcons\" Module starts here -->\n";
|
||||
$mod_copyrights_end = "\n<!-- JoomlaWorks \"K2 QuickIcons\" Module ends here -->\n\n";
|
||||
|
||||
// API
|
||||
$mainframe = JFactory::getApplication();
|
||||
$document = JFactory::getDocument();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Module parameters
|
||||
$moduleclass_sfx = $params->get('moduleclass_sfx', '');
|
||||
$modCSSStyling = (int)$params->get('modCSSStyling', 1);
|
||||
$modLogo = (int)$params->get('modLogo', 1);
|
||||
|
||||
// Component parameters
|
||||
$componentParams = JComponentHelper::getParams('com_k2');
|
||||
|
||||
$onlineImageEditor = $componentParams->get('onlineImageEditor', 'splashup');
|
||||
|
||||
switch($onlineImageEditor)
|
||||
{
|
||||
case 'splashup' :
|
||||
$onlineImageEditorLink = 'http://splashup.com/splashup/';
|
||||
break;
|
||||
case 'sumopaint' :
|
||||
$onlineImageEditorLink = 'http://www.sumopaint.com/app/';
|
||||
break;
|
||||
case 'pixlr' :
|
||||
$onlineImageEditorLink = 'http://pixlr.com/editor/';
|
||||
break;
|
||||
}
|
||||
|
||||
// Call the modal and add some needed JS
|
||||
JHTML::_('behavior.modal');
|
||||
|
||||
// Append CSS to the document's head
|
||||
if ($modCSSStyling)
|
||||
$document->addStyleSheet(JURI::base(true).'/modules/'.$mod_name.'/tmpl/css/style.css?v=2.6.7');
|
||||
|
||||
// Output content with template
|
||||
echo $mod_copyrights_start;
|
||||
require (JModuleHelper::getLayoutPath($mod_name, 'default'));
|
||||
echo $mod_copyrights_end;
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="module" client="administrator" method="upgrade" version="2.5" position="icon">
|
||||
<name>K2 Quick Icons (admin)</name>
|
||||
<author>JoomlaWorks</author>
|
||||
<creationDate>July 8th, 2013</creationDate>
|
||||
<copyright>Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.</copyright>
|
||||
<authorEmail>please-use-the-contact-form@joomlaworks.net</authorEmail>
|
||||
<authorUrl>www.joomlaworks.net</authorUrl>
|
||||
<version>2.6.7</version>
|
||||
<description>K2_QUICKICONS_FOR_USE_IN_THE_JOOMLA_CONTROL_PANEL_DASHBOARD_PAGE</description>
|
||||
<files>
|
||||
<filename module="mod_k2_quickicons">mod_k2_quickicons.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="modCSSStyling" type="list" default="1" label="K2_MODULE_DEFAULT_CSS" description="">
|
||||
<option value="1">K2_ENABLED</option>
|
||||
<option value="0">K2_DISABLED</option>
|
||||
</field>
|
||||
<field name="modLogo" type="list" default="1" label="K2_MODULE_LOGO" description="">
|
||||
<option value="1">K2_SHOW</option>
|
||||
<option value="0">K2_HIDE</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="advanced">
|
||||
<field name="cache" type="list" default="0" label="K2_CACHING" description="K2_SELECT_WHETHER_TO_CACHE_THE_CONTENT_OF_THIS_MODULE">
|
||||
<option value="0">K2_NO_CACHING</option>
|
||||
<option value="1">K2_USE_GLOBAL</option>
|
||||
</field>
|
||||
<field name="cache_time" type="text" default="900" label="K2_CACHE_TIME" description="K2_THE_TIME_IN_SECONDS_BEFORE_THE_MODULE_IS_RECACHED"/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
34
administrator/modules/mod_k2_quickicons/tmpl/css/style.css
Normal file
34
administrator/modules/mod_k2_quickicons/tmpl/css/style.css
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @version $Id: style.css 1938 2013-03-08 18:21:35Z joomlaworks $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
.clr { clear:both; height:0; line-height:0; display:block; float:none; }
|
||||
div#k2QuickIconsTitle { margin:16px 0 0; padding:0; /*background:url(../images/bg.jpg) repeat-x 0 50%;height:8px;*/ position:relative; z-index:9; }
|
||||
div#k2QuickIconsTitle a { display:block; clear:both; float:none; background:#f9f9f9 url(../images/k2_logo_46x18.png) no-repeat 50% 50%; width:46px; height:18px; padding:2px 6px; margin:0 0 0 24px; border:1px solid #d5d5d5; border-bottom:1px solid #f9f9f9; }
|
||||
div#k2QuickIconsTitle a span { display:none; }
|
||||
|
||||
/* Joomla! 1.5 */
|
||||
#k2QuickIcons15 {clear:both;margin:-1px 0 8px 0;padding:8px 0;border-top:1px solid #d5d5d5;position:relative;z-index:8;}
|
||||
#k2QuickIcons15.k2NoLogo {margin:0 0 8px 0;padding:0;border:none;}
|
||||
#k2QuickIcons15 div.icon-wrapper {float:left;}
|
||||
#k2QuickIcons15 div.icon { text-align:center; float:left; margin:0 5px 5px 0; }
|
||||
#k2QuickIcons15 div.icon a { display:block; float:left; border:1px solid #f0f0f0; height:97px; width:108px; color:#666; vertical-align:middle; text-decoration:none; }
|
||||
#k2QuickIcons15 div.icon a:hover { border-left:1px solid #eee; border-top:1px solid #eee; border-right:1px solid #ccc; border-bottom:1px solid #ccc; background:#f9f9f9; color:#0B55C4; }
|
||||
#k2QuickIcons15 div.icon a img { padding:10px 0; margin:0 auto; }
|
||||
#k2QuickIcons15 div.icon a span { display:block; text-align:center; }
|
||||
|
||||
/* Joomla! 1.6+ */
|
||||
#k2QuickIcons { clear:both; margin:-1px 0 8px; padding:8px 0; border-top:1px solid #d5d5d5; position:relative; z-index:8; }
|
||||
#k2QuickIcons.k2NoLogo { margin:0 0 8px; padding:0; border:none; }
|
||||
#k2QuickIcons div.icon-wrapper { float:left; display: block !important; width: auto !important; height :auto!important; line-height:12px !important; background: none; }
|
||||
#k2QuickIcons div.icon { text-align:center; margin-right:15px; float:left; margin-bottom:15px; }
|
||||
#k2QuickIcons div.icon a { background-color:#fff; background-position:-30px; display:block; float:left; height:97px; width:108px; color:#565656; vertical-align:middle; text-decoration:none; border:1px solid #CCC; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; -webkit-transition-property:background-position, 0 0; -moz-transition-property:background-position, 0 0; -webkit-transition-duration:.8s; -moz-transition-duration:.8s; }
|
||||
#k2QuickIcons div.icon a:hover,
|
||||
#cpanel div.icon a:focus,
|
||||
#cpanel div.icon a:active { background-position:0; -webkit-border-bottom-left-radius:50% 20px; -moz-border-radius-bottomleft:50% 20px; border-bottom-left-radius:50% 20px; -webkit-box-shadow:-5px 10px 15px rgba(0,0,0,0.25); -moz-box-shadow:-5px 10px 15px rgba(0,0,0,0.25); box-shadow:-5px 10px 15px rgba(0,0,0,0.25); position:relative; z-index:10; }
|
||||
#k2QuickIcons div.icon a img { padding:10px 0; margin:0 auto; }
|
||||
#k2QuickIcons div.icon a span { display:block; text-align:center; }
|
161
administrator/modules/mod_k2_quickicons/tmpl/default.php
Normal file
161
administrator/modules/mod_k2_quickicons/tmpl/default.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: default.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<?php if($modLogo): ?>
|
||||
<div id="k2QuickIconsTitle">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=items&filter_featured=-1&filter_trash=0'); ?>" title="<?php echo JText::_('K2_DASHBOARD'); ?>">
|
||||
<span>K2</span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="k2QuickIcons<?php if(K2_JVERSION=='15') echo '15'; ?>"<?php if(!$modLogo): ?> class="k2NoLogo"<?php endif; ?>>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=item'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_ADD_NEW_ITEM'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/item-new.png" />
|
||||
<span><?php echo JText::_('K2_ADD_NEW_ITEM'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=items&filter_featured=-1&filter_trash=0'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_ITEMS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/items.png" />
|
||||
<span><?php echo JText::_('K2_ITEMS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=items&filter_featured=1&filter_trash=0'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_FEATURED_ITEMS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/items-featured.png" />
|
||||
<span><?php echo JText::_('K2_FEATURED_ITEMS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=items&filter_featured=-1&filter_trash=1'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_TRASHED_ITEMS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/items-trashed.png" />
|
||||
<span><?php echo JText::_('K2_TRASHED_ITEMS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=categories&filter_trash=0'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_CATEGORIES'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/categories.png" />
|
||||
<span><?php echo JText::_('K2_CATEGORIES'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=categories&filter_trash=1'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_TRASHED_CATEGORIES'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/categories-trashed.png" />
|
||||
<span><?php echo JText::_('K2_TRASHED_CATEGORIES'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!$componentParams->get('lockTags') || $user->gid>23): ?>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=tags'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_TAGS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/tags.png" />
|
||||
<span><?php echo JText::_('K2_TAGS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=comments'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_COMMENTS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/comments.png" />
|
||||
<span><?php echo JText::_('K2_COMMENTS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($user->gid>23): ?>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=extrafields'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_EXTRA_FIELDS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/extra-fields.png" />
|
||||
<span><?php echo JText::_('K2_EXTRA_FIELDS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=extrafieldsgroups'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_EXTRA_FIELD_GROUPS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/extra-field-groups.png" />
|
||||
<span><?php echo JText::_('K2_EXTRA_FIELD_GROUPS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_k2&view=media'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_MEDIA_MANAGER'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/mediamanager.png" />
|
||||
<span><?php echo JText::_('K2_MEDIA_MANAGER'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a id="k2OnlineImageEditor" target="_blank" href="<?php echo $onlineImageEditorLink; ?>">
|
||||
<img alt="<?php echo JText::_('K2_ONLINE_IMAGE_EDITOR'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/image-editing.png" />
|
||||
<span><?php echo JText::_('K2_ONLINE_IMAGE_EDITOR'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a class="modal" rel="{handler:'iframe', size:{x:(document.documentElement.clientWidth)*0.9, y:(document.documentElement.clientHeight)*0.95}}" target="_blank" href="http://getk2.org/documentation/">
|
||||
<img alt="<?php echo JText::_('K2_DOCS_AND_TUTORIALS'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/documentation.png" />
|
||||
<span><?php echo JText::_('K2_DOCS_AND_TUTORIALS'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($user->gid>23): ?>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a class="modal" rel="{handler:'iframe', size:{x:(document.documentElement.clientWidth)*0.9, y:(document.documentElement.clientHeight)*0.95}}" target="_blank" href="http://getk2.org/extend/">
|
||||
<img alt="<?php echo JText::_('K2_EXTEND'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/extend.png" />
|
||||
<span><?php echo JText::_('K2_EXTEND'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a class="modal" rel="{handler:'iframe', size:{x:(document.documentElement.clientWidth)*0.9, y:(document.documentElement.clientHeight)*0.95}}" target="_blank" href="http://getk2.org/community/">
|
||||
<img alt="<?php echo JText::_('K2_COMMUNITY'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/help.png" />
|
||||
<span><?php echo JText::_('K2_COMMUNITY'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="icon-wrapper">
|
||||
<div class="icon">
|
||||
<a class="modal" rel="{handler:'iframe', size:{x:(document.documentElement.clientWidth)*0.9, y:(document.documentElement.clientHeight)*0.95}}" href="http://joomlareader.com/" title="<?php echo JText::_('K2_JOOMLA_NEWS_FROM_MORE_THAN_200_SOURCES_WORLDWIDE'); ?>">
|
||||
<img alt="<?php echo JText::_('K2_JOOMLA_NEWS_FROM_MORE_THAN_200_SOURCES_WORLDWIDE'); ?>" src="<?php echo JURI::root(true); ?>/media/k2/assets/images/dashboard/joomlareader.png" />
|
||||
<span><?php echo JText::_('K2_JOOMLAREADERCOM'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
BIN
administrator/modules/mod_k2_quickicons/tmpl/images/bg.jpg
Normal file
BIN
administrator/modules/mod_k2_quickicons/tmpl/images/bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
166
administrator/modules/mod_k2_stats/helper.php
Normal file
166
administrator/modules/mod_k2_stats/helper.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: helper.php 1813 2013-01-16 11:43:55Z lefteris.kavadas $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die ;
|
||||
|
||||
class modK2StatsHelper
|
||||
{
|
||||
public static function getLatestItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT i.*, v.name AS author FROM #__k2_items as i
|
||||
LEFT JOIN #__k2_categories AS c ON c.id = i.catid
|
||||
LEFT JOIN #__users AS v ON v.id = i.created_by
|
||||
WHERE i.trash = 0 AND c.trash = 0
|
||||
ORDER BY i.created DESC";
|
||||
if (K2_JVERSION != '15')
|
||||
{
|
||||
$query = JString::str_ireplace('#__groups', '#__viewlevels', $query);
|
||||
$query = JString::str_ireplace('g.name', 'g.title', $query);
|
||||
}
|
||||
$db->setQuery($query, 0, 10);
|
||||
$rows = $db->loadObjectList();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getPopularItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT i.*, v.name AS author FROM #__k2_items as i
|
||||
LEFT JOIN #__k2_categories AS c ON c.id = i.catid
|
||||
LEFT JOIN #__users AS v ON v.id = i.created_by
|
||||
WHERE i.trash = 0 AND c.trash = 0
|
||||
ORDER BY i.hits DESC";
|
||||
$db->setQuery($query, 0, 10);
|
||||
$rows = $db->loadObjectList();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getMostCommentedItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT i.*, v.name AS author, COUNT(comments.id) AS numOfComments FROM #__k2_items as i
|
||||
LEFT JOIN #__k2_categories AS c ON c.id = i.catid
|
||||
LEFT JOIN #__users AS v ON v.id = i.created_by
|
||||
RIGHT JOIN #__k2_comments comments ON comments.itemID = i.id
|
||||
WHERE i.trash = 0 AND c.trash = 0
|
||||
GROUP BY i.id
|
||||
ORDER BY numOfComments DESC";
|
||||
$db->setQuery($query, 0, 10);
|
||||
$rows = $db->loadObjectList();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getLatestComments()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT * FROM #__k2_comments ORDER BY commentDate DESC";
|
||||
$db->setQuery($query, 0, 10);
|
||||
$rows = $db->loadObjectList();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getStatistics()
|
||||
{
|
||||
$statistics = new stdClass;
|
||||
$statistics->numOfItems = self::countItems();
|
||||
$statistics->numOfTrashedItems = self::countTrashedItems();
|
||||
$statistics->numOfFeaturedItems = self::countFeaturedItems();
|
||||
$statistics->numOfComments = self::countComments();
|
||||
$statistics->numOfCategories = self::countCategories();
|
||||
$statistics->numOfTrashedCategories = self::countTrashedCategories();
|
||||
$statistics->numOfUsers = self::countUsers();
|
||||
$statistics->numOfUserGroups = self::countUserGroups();
|
||||
$statistics->numOfTags = self::countTags();
|
||||
return $statistics;
|
||||
}
|
||||
|
||||
public static function countItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_items";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countTrashedItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_items WHERE trash=1";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countFeaturedItems()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_items WHERE featured=1";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countComments()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_comments";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countCategories()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_categories";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countTrashedCategories()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_categories WHERE trash=1";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countUsers()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_users";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countUserGroups()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_user_groups";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function countTags()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = "SELECT COUNT(*) FROM #__k2_tags";
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
52
administrator/modules/mod_k2_stats/mod_k2_stats.php
Normal file
52
administrator/modules/mod_k2_stats/mod_k2_stats.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: mod_k2_stats.php 1851 2013-02-06 17:55:26Z joomlaworks $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die ;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
if (K2_JVERSION != '15')
|
||||
{
|
||||
if (!$user->authorise('core.manage', 'com_k2'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (K2_JVERSION != '15')
|
||||
{
|
||||
$language = JFactory::getLanguage();
|
||||
$language->load('mod_k2.j16', JPATH_ADMINISTRATOR);
|
||||
}
|
||||
|
||||
require_once (dirname(__FILE__).DS.'helper.php');
|
||||
|
||||
if ($params->get('latestItems', 1))
|
||||
{
|
||||
$latestItems = modK2StatsHelper::getLatestItems();
|
||||
}
|
||||
if ($params->get('popularItems', 1))
|
||||
{
|
||||
$popularItems = modK2StatsHelper::getPopularItems();
|
||||
}
|
||||
if ($params->get('mostCommentedItems', 1))
|
||||
{
|
||||
$mostCommentedItems = modK2StatsHelper::getMostCommentedItems();
|
||||
}
|
||||
if ($params->get('latestComments', 1))
|
||||
{
|
||||
$latestComments = modK2StatsHelper::getLatestComments();
|
||||
}
|
||||
if ($params->get('statistics', 1))
|
||||
{
|
||||
$statistics = modK2StatsHelper::getStatistics();
|
||||
}
|
||||
|
||||
require (JModuleHelper::getLayoutPath('mod_k2_stats'));
|
49
administrator/modules/mod_k2_stats/mod_k2_stats.xml
Normal file
49
administrator/modules/mod_k2_stats/mod_k2_stats.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="module" client="administrator" method="upgrade" version="2.5" position="icon">
|
||||
<name>K2 Stats (admin)</name>
|
||||
<author>JoomlaWorks</author>
|
||||
<creationDate>July 8th, 2013</creationDate>
|
||||
<copyright>Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.</copyright>
|
||||
<authorEmail>please-use-the-contact-form@joomlaworks.net</authorEmail>
|
||||
<authorUrl>www.joomlaworks.net</authorUrl>
|
||||
<version>2.6.7</version>
|
||||
<description>K2_STATS_FOR_USE_IN_THE_K2_DASHBOARD_PAGE</description>
|
||||
<files>
|
||||
<filename module="mod_k2_stats">mod_k2_stats.php</filename>
|
||||
<file>helper.php</file>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="latestItems" type="radio" default="1" label="K2_LATEST_ITEMS_TAB">
|
||||
<option value="0">K2_DISABLE</option>
|
||||
<option value="1">K2_ENABLE</option>
|
||||
</field>
|
||||
<field name="popularItems" type="radio" default="1" label="K2_POPULAR_ITEMS_TAB">
|
||||
<option value="0">K2_DISABLE</option>
|
||||
<option value="1">K2_ENABLE</option>
|
||||
</field>
|
||||
<field name="mostCommentedItems" type="radio" default="1" label="K2_MOST_COMMENTED_ITEMS_TAB">
|
||||
<option value="0">K2_DISABLE</option>
|
||||
<option value="1">K2_ENABLE</option>
|
||||
</field>
|
||||
<field name="latestComments" type="radio" default="1" label="K2_LATEST_COMMENTS_TAB">
|
||||
<option value="0">K2_DISABLE</option>
|
||||
<option value="1">K2_ENABLE</option>
|
||||
</field>
|
||||
<field name="statistics" type="radio" default="1" label="K2_STATISTICS_TAB">
|
||||
<option value="0">K2_DISABLE</option>
|
||||
<option value="1">K2_ENABLE</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="advanced">
|
||||
<field name="cache" type="list" default="0" label="K2_CACHING" description="K2_SELECT_WHETHER_TO_CACHE_THE_CONTENT_OF_THIS_MODULE">
|
||||
<option value="0">K2_NO_CACHING</option>
|
||||
<option value="1">K2_USE_GLOBAL</option>
|
||||
</field>
|
||||
<field name="cache_time" type="text" default="900" label="K2_CACHE_TIME" description="K2_THE_TIME_IN_SECONDS_BEFORE_THE_MODULE_IS_RECACHED"/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
188
administrator/modules/mod_k2_stats/tmpl/default.php
Normal file
188
administrator/modules/mod_k2_stats/tmpl/default.php
Normal file
@ -0,0 +1,188 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: default.php 1851 2013-02-06 17:55:26Z joomlaworks $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Quick and dirty fix for Joomla! 3.0 missing CSS tabs when creating tabs using the API.
|
||||
// Should be removed when Joomla! fixes that...
|
||||
if (K2_JVERSION == '30')
|
||||
{
|
||||
$document = JFactory::getDocument();
|
||||
$document->addStyleDeclaration('
|
||||
dl.tabs {float:left;margin:10px 0 -1px 0;z-index:50;}
|
||||
dl.tabs dt {float:left;padding:4px 10px;border:1px solid #ccc;margin-left:3px;background:#e9e9e9;color:#666;}
|
||||
dl.tabs dt.open {background:#F9F9F9;border-bottom:1px solid #f9f9f9;z-index:100;color:#000;}
|
||||
div.current {clear:both;border:1px solid #ccc;padding:10px 10px;}
|
||||
dl.tabs h3 {font-size:12px;line-height:12px;margin:4px;}
|
||||
');
|
||||
}
|
||||
|
||||
// Import Joomla! tabs
|
||||
jimport('joomla.html.pane');
|
||||
|
||||
?>
|
||||
|
||||
<?php if(K2_JVERSION != '30') $pane = JPane::getInstance('Tabs'); ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.start') : $pane->startPane('myPane'); ?>
|
||||
|
||||
<?php if($params->get('latestItems', 1)): ?>
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.panel', JText::_('K2_LATEST_ITEMS'), 'latestItemsTab') : $pane->startPanel(JText::_('K2_LATEST_ITEMS'), 'latestItemsTab'); ?>
|
||||
<!--[if lte IE 7]>
|
||||
<br class="ie7fix" />
|
||||
<![endif]-->
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="title"><?php echo JText::_('K2_TITLE'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_CREATED'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_AUTHOR'); ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($latestItems as $latest): ?>
|
||||
<tr>
|
||||
<td><a href="<?php echo JRoute::_('index.php?option=com_k2&view=item&cid='.$latest->id); ?>"><?php echo $latest->title; ?></a></td>
|
||||
<td><?php echo JHTML::_('date', $latest->created , JText::_('K2_DATE_FORMAT')); ?></td>
|
||||
<td><?php echo $latest->author; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(K2_JVERSION != '30') echo $pane->endPanel(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($params->get('popularItems', 1)): ?>
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.panel', JText::_('K2_POPULAR_ITEMS'), 'popularItemsTab') : $pane->startPanel(JText::_('K2_POPULAR_ITEMS'), 'popularItemsTab'); ?>
|
||||
<!--[if lte IE 7]>
|
||||
<br class="ie7fix" />
|
||||
<![endif]-->
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="title"><?php echo JText::_('K2_TITLE'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_HITS'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_CREATED'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_AUTHOR'); ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($popularItems as $popular): ?>
|
||||
<tr>
|
||||
<td><a href="<?php echo JRoute::_('index.php?option=com_k2&view=item&cid='.$popular->id); ?>"><?php echo $popular->title; ?></a></td>
|
||||
<td><?php echo $popular->hits; ?></td>
|
||||
<td><?php echo JHTML::_('date', $popular->created , JText::_('K2_DATE_FORMAT')); ?></td>
|
||||
<td><?php echo $popular->author; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(K2_JVERSION != '30') echo $pane->endPanel(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($params->get('mostCommentedItems', 1)): ?>
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.panel', JText::_('K2_MOST_COMMENTED_ITEMS'), 'mostCommentedItemsTab') : $pane->startPanel(JText::_('K2_MOST_COMMENTED_ITEMS'), 'mostCommentedItemsTab'); ?>
|
||||
<!--[if lte IE 7]>
|
||||
<br class="ie7fix" />
|
||||
<![endif]-->
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="title"><?php echo JText::_('K2_TITLE'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_COMMENTS'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_CREATED'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_AUTHOR'); ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($mostCommentedItems as $mostCommented): ?>
|
||||
<tr>
|
||||
<td><a href="<?php echo JRoute::_('index.php?option=com_k2&view=item&cid='.$mostCommented->id); ?>"><?php echo $mostCommented->title; ?></a></td>
|
||||
<td><?php echo $mostCommented->numOfComments; ?></td>
|
||||
<td><?php echo JHTML::_('date', $mostCommented->created , JText::_('K2_DATE_FORMAT')); ?></td>
|
||||
<td><?php echo $mostCommented->author; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(K2_JVERSION != '30') echo $pane->endPanel(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($params->get('latestComments', 1)): ?>
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.panel', JText::_('K2_LATEST_COMMENTS'), 'latestCommentsTab') : $pane->startPanel(JText::_('K2_LATEST_COMMENTS'), 'latestCommentsTab'); ?>
|
||||
<!--[if lte IE 7]>
|
||||
<br class="ie7fix" />
|
||||
<![endif]-->
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="title"><?php echo JText::_('K2_COMMENT'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_ADDED_ON'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_POSTED_BY'); ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($latestComments as $latest): ?>
|
||||
<tr>
|
||||
<td><?php echo $latest->commentText; ?></td>
|
||||
<td><?php echo JHTML::_('date', $latest->commentDate , JText::_('K2_DATE_FORMAT')); ?></td>
|
||||
<td><?php echo $latest->userName; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(K2_JVERSION != '30') echo $pane->endPanel(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($params->get('statistics', 1)): ?>
|
||||
<?php echo (K2_JVERSION == '30') ? JHtml::_('tabs.panel', JText::_('K2_STATISTICS'), 'statsTab') : $pane->startPanel(JText::_('K2_STATISTICS'), 'statsTab'); ?>
|
||||
<!--[if lte IE 7]>
|
||||
<br class="ie7fix" />
|
||||
<![endif]-->
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="title"><?php echo JText::_('K2_TYPE'); ?></td>
|
||||
<td class="title"><?php echo JText::_('K2_COUNT'); ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_ITEMS'); ?></td>
|
||||
<td><?php echo $statistics->numOfItems; ?> (<?php echo $statistics->numOfFeaturedItems.' '.JText::_('K2_FEATURED').' - '.$statistics->numOfTrashedItems.' '.JText::_('K2_TRASHED'); ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_CATEGORIES'); ?></td>
|
||||
<td><?php echo $statistics->numOfCategories; ?> (<?php echo $statistics->numOfTrashedCategories.' '.JText::_('K2_TRASHED'); ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_TAGS'); ?></td>
|
||||
<td><?php echo $statistics->numOfTags; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_COMMENTS'); ?></td>
|
||||
<td><?php echo $statistics->numOfComments; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_USERS'); ?></td>
|
||||
<td><?php echo $statistics->numOfUsers; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo JText::_('K2_USER_GROUPS'); ?></td>
|
||||
<td><?php echo $statistics->numOfUserGroups; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(K2_JVERSION != '30') echo $pane->endPanel(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo K2_JVERSION != '30'? $pane->endPane() : JHtml::_('tabs.end'); ?>
|
141
administrator/modules/mod_latest/helper.php
Normal file
141
administrator/modules/mod_latest/helper.php
Normal file
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_latest
|
||||
*
|
||||
* @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;
|
||||
|
||||
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/models', 'ContentModel');
|
||||
|
||||
/**
|
||||
* Helper for mod_latest
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_latest
|
||||
* @since 1.5
|
||||
*/
|
||||
abstract class ModLatestHelper
|
||||
{
|
||||
/**
|
||||
* Get a list of articles.
|
||||
*
|
||||
* @param JRegistry $params The module parameters.
|
||||
*
|
||||
* @return mixed An array of articles, or false on error.
|
||||
*/
|
||||
public static function getList(&$params)
|
||||
{
|
||||
$user = JFactory::getuser();
|
||||
|
||||
// Get an instance of the generic articles model
|
||||
$model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
|
||||
|
||||
// Set List SELECT
|
||||
$model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' .
|
||||
' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state');
|
||||
|
||||
// Set Ordering filter
|
||||
switch ($params->get('ordering'))
|
||||
{
|
||||
case 'm_dsc':
|
||||
$model->setState('list.ordering', 'modified DESC, created');
|
||||
$model->setState('list.direction', 'DESC');
|
||||
break;
|
||||
|
||||
case 'c_dsc':
|
||||
default:
|
||||
$model->setState('list.ordering', 'created');
|
||||
$model->setState('list.direction', 'DESC');
|
||||
break;
|
||||
}
|
||||
|
||||
// Set Category Filter
|
||||
$categoryId = $params->get('catid');
|
||||
|
||||
if (is_numeric($categoryId))
|
||||
{
|
||||
$model->setState('filter.category_id', $categoryId);
|
||||
}
|
||||
|
||||
// Set User Filter.
|
||||
$userId = $user->get('id');
|
||||
|
||||
switch ($params->get('user_id'))
|
||||
{
|
||||
case 'by_me':
|
||||
$model->setState('filter.author_id', $userId);
|
||||
break;
|
||||
|
||||
case 'not_me':
|
||||
$model->setState('filter.author_id', $userId);
|
||||
$model->setState('filter.author_id.include', false);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the Start and Limit
|
||||
$model->setState('list.start', 0);
|
||||
$model->setState('list.limit', $params->get('count', 5));
|
||||
|
||||
$items = $model->getItems();
|
||||
|
||||
if ($error = $model->getError())
|
||||
{
|
||||
JError::raiseError(500, $error);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the links
|
||||
foreach ($items as &$item)
|
||||
{
|
||||
if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
|
||||
{
|
||||
$item->link = JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$item->link = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the alternate title for the module.
|
||||
*
|
||||
* @param JRegistry $params The module parameters.
|
||||
*
|
||||
* @return string The alternate title for the module.
|
||||
*/
|
||||
public static function getTitle($params)
|
||||
{
|
||||
$who = $params->get('user_id');
|
||||
$catid = (int) $params->get('catid');
|
||||
$type = $params->get('ordering') == 'c_dsc' ? '_CREATED' : '_MODIFIED';
|
||||
|
||||
if ($catid)
|
||||
{
|
||||
$category = JCategories::getInstance('Content')->get($catid);
|
||||
|
||||
if ($category)
|
||||
{
|
||||
$title = $category->title;
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = JText::_('MOD_POPULAR_UNEXISTING');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = '';
|
||||
}
|
||||
|
||||
return JText::plural('MOD_LATEST_TITLE' . $type . ($catid ? "_CATEGORY" : '') . ($who != '0' ? "_$who" : ''), (int) $params->get('count'), $title);
|
||||
}
|
||||
}
|
1
administrator/modules/mod_latest/index.html
Normal file
1
administrator/modules/mod_latest/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
16
administrator/modules/mod_latest/mod_latest.php
Normal file
16
administrator/modules/mod_latest/mod_latest.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_latest
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include dependancies.
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
$list = ModLatestHelper::getList($params);
|
||||
require JModuleHelper::getLayoutPath('mod_latest', $params->get('layout', 'default'));
|
111
administrator/modules/mod_latest/mod_latest.xml
Normal file
111
administrator/modules/mod_latest/mod_latest.xml
Normal file
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_latest</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>July 2004</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_LATEST_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_latest">mod_latest.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_latest.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_latest.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LATEST" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="count"
|
||||
type="text"
|
||||
default="5"
|
||||
label="MOD_LATEST_FIELD_COUNT_LABEL"
|
||||
description="MOD_LATEST_FIELD_COUNT_DESC" />
|
||||
<field
|
||||
name="ordering"
|
||||
type="list"
|
||||
default="c_dsc"
|
||||
label="MOD_LATEST_FIELD_ORDERING_LABEL"
|
||||
description="MOD_LATEST_FIELD_ORDERING_DESC">
|
||||
<option
|
||||
value="c_dsc">MOD_LATEST_FIELD_VALUE_ORDERING_ADDED</option>
|
||||
<option
|
||||
value="m_dsc">MOD_LATEST_FIELD_VALUE_ORDERING_MODIFIED</option>
|
||||
</field>
|
||||
<field
|
||||
id="catid"
|
||||
name="catid"
|
||||
type="category"
|
||||
extension="com_content"
|
||||
label="JCATEGORY"
|
||||
description="MOD_LATEST_FIELD_CATEGORY_DESC"
|
||||
default=""
|
||||
class="inputbox">
|
||||
<option
|
||||
value="">JOPTION_ANY_CATEGORY</option>
|
||||
</field>
|
||||
<field
|
||||
name="user_id"
|
||||
type="list"
|
||||
default="0"
|
||||
label="MOD_LATEST_FIELD_AUTHORS_LABEL"
|
||||
description="MOD_LATEST_FIELD_AUTHORS_DESC">
|
||||
<option
|
||||
value="0">MOD_LATEST_FIELD_VALUE_AUTHORS_ANYONE</option>
|
||||
<option
|
||||
value="by_me">MOD_LATEST_FIELD_VALUE_AUTHORS_BY_ME</option>
|
||||
<option
|
||||
value="not_me">MOD_LATEST_FIELD_VALUE_AUTHORS_NOT_BY_ME</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="automatic_title"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL"
|
||||
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
50
administrator/modules/mod_latest/tmpl/default.php
Normal file
50
administrator/modules/mod_latest/tmpl/default.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_latest
|
||||
*
|
||||
* @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::_('bootstrap.tooltip');
|
||||
?>
|
||||
<div class="row-striped">
|
||||
<?php if (count($list)) : ?>
|
||||
<?php foreach ($list as $i => $item) : ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<?php echo JHtml::_('jgrid.published', $item->state, $i, '', false); ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<strong class="row-title">
|
||||
<?php if ($item->link) : ?>
|
||||
<a href="<?php echo $item->link; ?>">
|
||||
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');?></a>
|
||||
<?php else : ?>
|
||||
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
|
||||
<?php endif; ?>
|
||||
</strong>
|
||||
|
||||
<small class="hasTooltip" title="<?php echo JHtml::tooltipText('MOD_LATEST_CREATED_BY'); ?>">
|
||||
<?php echo $item->author_name;?>
|
||||
</small>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<span class="small"><i
|
||||
class="icon-calendar"></i> <?php echo JHtml::_('date', $item->created, 'Y-m-d'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="alert"><?php echo JText::_('MOD_LATEST_NO_MATCHING_RESULTS');?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
1
administrator/modules/mod_latest/tmpl/index.html
Normal file
1
administrator/modules/mod_latest/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
80
administrator/modules/mod_logged/helper.php
Normal file
80
administrator/modules/mod_logged/helper.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_logged
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Helper for mod_logged
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_logged
|
||||
* @since 1.5
|
||||
*/
|
||||
abstract class ModLoggedHelper
|
||||
{
|
||||
/**
|
||||
* Get a list of logged users.
|
||||
*
|
||||
* @param JRegistry $params The module parameters.
|
||||
*
|
||||
* @return mixed An array of users, or false on error.
|
||||
*/
|
||||
public static function getList(&$params)
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$user = JFactory::getUser();
|
||||
$query = $db->getQuery(true)
|
||||
->select('s.time, s.client_id, u.id, u.name, u.username')
|
||||
->from('#__session AS s')
|
||||
->join('LEFT', '#__users AS u ON s.userid = u.id')
|
||||
->where('s.guest = 0');
|
||||
$db->setQuery($query, 0, $params->get('count', 5));
|
||||
|
||||
try
|
||||
{
|
||||
$results = $db->loadObjectList();
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
throw new RuntimeException($e->getMessage());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($results as $k => $result)
|
||||
{
|
||||
$results[$k]->logoutLink = '';
|
||||
|
||||
if ($user->authorise('core.manage', 'com_users'))
|
||||
{
|
||||
$results[$k]->editLink = JRoute::_('index.php?option=com_users&task=user.edit&id=' . $result->id);
|
||||
$results[$k]->logoutLink = JRoute::_('index.php?option=com_login&task=logout&uid=' . $result->id . '&' . JSession::getFormToken() . '=1');
|
||||
}
|
||||
|
||||
if ($params->get('name', 1) == 0)
|
||||
{
|
||||
$results[$k]->name = $results[$k]->username;
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the alternate title for the module
|
||||
*
|
||||
* @param JRegistry $params The module parameters.
|
||||
*
|
||||
* @return string The alternate title for the module.
|
||||
*/
|
||||
public static function getTitle($params)
|
||||
{
|
||||
return JText::plural('MOD_LOGGED_TITLE', $params->get('count'));
|
||||
}
|
||||
}
|
1
administrator/modules/mod_logged/index.html
Normal file
1
administrator/modules/mod_logged/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
16
administrator/modules/mod_logged/mod_logged.php
Normal file
16
administrator/modules/mod_logged/mod_logged.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_logged
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include dependancies.
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
$users = ModLoggedHelper::getList($params);
|
||||
require JModuleHelper::getLayoutPath('mod_logged', $params->get('layout', 'default'));
|
85
administrator/modules/mod_logged/mod_logged.xml
Normal file
85
administrator/modules/mod_logged/mod_logged.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_logged</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>January 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_LOGGED_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_logged">mod_logged.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_logged.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_logged.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LOGGED" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="count"
|
||||
type="text"
|
||||
default="5"
|
||||
label="MOD_LOGGED_FIELD_COUNT_LABEL"
|
||||
description="MOD_LOGGED_FIELD_COUNT_DESC" />
|
||||
|
||||
<field
|
||||
name="name"
|
||||
type="list"
|
||||
default="1"
|
||||
label="MOD_LOGGED_NAME"
|
||||
description="MOD_LOGGED_FIELD_NAME_DESC" >
|
||||
<option
|
||||
value="1">MOD_LOGGED_NAME</option>
|
||||
<option
|
||||
value="0">JGLOBAL_USERNAME</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
<field
|
||||
name="automatic_title"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL"
|
||||
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
|
49
administrator/modules/mod_logged/tmpl/default.php
Normal file
49
administrator/modules/mod_logged/tmpl/default.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_logged
|
||||
*
|
||||
* @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::_('bootstrap.tooltip');
|
||||
?>
|
||||
<div class="row-striped">
|
||||
<?php foreach ($users as $user) : ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<?php if ($user->client_id == 0) : ?>
|
||||
<a class="hasTooltip" title="<?php echo JHtml::tooltipText('MOD_LOGGED_LOGOUT'); ?>" href="<?php echo $user->logoutLink; ?>" class="btn btn-danger btn-mini">
|
||||
<i class="icon-remove icon-white" title="<?php echo JText::_('JLOGOUT'); ?>"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<strong class="row-title">
|
||||
<?php if (isset($user->editLink)) : ?>
|
||||
<a href="<?php echo $user->editLink; ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('JGRID_HEADING_ID'); ?> : <?php echo $user->id; ?>">
|
||||
<?php echo $user->name;?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo $user->name; ?>
|
||||
<?php endif; ?>
|
||||
</strong>
|
||||
|
||||
<small class="small hasTooltip" title="<?php echo JHtml::tooltipText('JCLIENT'); ?>">
|
||||
<?php if ($user->client_id) : ?>
|
||||
<?php echo JText::_('JADMINISTRATION'); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::_('JSITE'); ?>
|
||||
<?php endif;?>
|
||||
</small>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<span class="small hasTooltip" title="<?php echo JHtml::tooltipText('MOD_LOGGED_LAST_ACTIVITY'); ?>">
|
||||
<i class="icon-calendar"></i> <?php echo JHtml::_('date', $user->time, 'Y-m-d'); ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
1
administrator/modules/mod_logged/tmpl/index.html
Normal file
1
administrator/modules/mod_logged/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
59
administrator/modules/mod_login/helper.php
Normal file
59
administrator/modules/mod_login/helper.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_login
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Helper for mod_login
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_login
|
||||
* @since 1.6
|
||||
*/
|
||||
abstract class ModLoginHelper
|
||||
{
|
||||
/**
|
||||
* Get an HTML select list of the available languages.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getLanguageList()
|
||||
{
|
||||
$languages = JLanguageHelper::createLanguageList(null, JPATH_ADMINISTRATOR, false, true);
|
||||
|
||||
if (count($languages) <= 1)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
array_unshift($languages, JHtml::_('select.option', '', JText::_('JDEFAULTLANGUAGE')));
|
||||
|
||||
return JHtml::_('select.genericlist', $languages, 'lang', ' class="inputbox advancedSelect"', 'value', 'text', null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the redirect URI after login.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getReturnURI()
|
||||
{
|
||||
$uri = JUri::getInstance();
|
||||
$return = 'index.php' . $uri->toString(array('query'));
|
||||
|
||||
if ($return != 'index.php?option=com_login')
|
||||
{
|
||||
return base64_encode($return);
|
||||
}
|
||||
else
|
||||
{
|
||||
return base64_encode('index.php');
|
||||
}
|
||||
}
|
||||
}
|
1
administrator/modules/mod_login/index.html
Normal file
1
administrator/modules/mod_login/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
17
administrator/modules/mod_login/mod_login.php
Normal file
17
administrator/modules/mod_login/mod_login.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_login
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the syndicate functions only once
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
$langs = ModLoginHelper::getLanguageList();
|
||||
$return = ModLoginHelper::getReturnURI();
|
||||
require JModuleHelper::getLayoutPath('mod_login', $params->get('layout', 'default'));
|
68
administrator/modules/mod_login/mod_login.xml
Normal file
68
administrator/modules/mod_login/mod_login.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_login</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>March 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_LOGIN_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_login">mod_login.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_login.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_login.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LOGIN" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="usesecure"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="MOD_LOGIN_FIELD_USESECURE_LABEL"
|
||||
description="MOD_LOGIN_FIELD_USESECURE_DESC">
|
||||
<option
|
||||
value="0">JNo</option>
|
||||
<option
|
||||
value="1">JYes</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
83
administrator/modules/mod_login/tmpl/default.php
Normal file
83
administrator/modules/mod_login/tmpl/default.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_login
|
||||
*
|
||||
* @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::_('behavior.keepalive');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('formbehavior.chosen');
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$mainDirection = $document->direction == 'rtl' ? 'right' : 'left';
|
||||
$altDirection = $document->direction == 'rtl' ? 'left' : 'right';
|
||||
?>
|
||||
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="form-login" class="form-inline">
|
||||
<fieldset class="loginform">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="input-prepend input-append">
|
||||
<span class="add-on">
|
||||
<i class="icon-user hasTooltip" data-placement="<?php echo $mainDirection; ?>" title="<?php echo JText::_('JGLOBAL_USERNAME'); ?>"></i>
|
||||
<label for="mod-login-username" class="element-invisible">
|
||||
<?php echo JText::_('JGLOBAL_USERNAME'); ?>
|
||||
</label>
|
||||
</span>
|
||||
<input name="username" tabindex="1" id="mod-login-username" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_USERNAME'); ?>" size="15"/>
|
||||
<a href="<?php echo JUri::root(); ?>index.php?option=com_users&view=remind" class="btn width-auto hasTooltip" data-placement="<?php echo $altDirection; ?>" title="<?php echo JText::_('MOD_LOGIN_REMIND'); ?>">
|
||||
<i class="icon-help" title="<?php echo JText::_('MOD_LOGIN_REMIND'); ?>"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="input-prepend input-append">
|
||||
<span class="add-on">
|
||||
<i class="icon-lock hasTooltip" data-placement="<?php echo $mainDirection; ?>" title="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>"></i>
|
||||
<label for="mod-login-password" class="element-invisible">
|
||||
<?php echo JText::_('JGLOBAL_PASSWORD'); ?>
|
||||
</label>
|
||||
</span>
|
||||
<input name="passwd" tabindex="2" id="mod-login-password" type="password" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" size="15"/>
|
||||
<a href="<?php echo JUri::root(); ?>index.php?option=com_users&view=reset" class="btn width-auto hasTooltip" data-placement="<?php echo $altDirection; ?>" title="<?php echo JText::_('MOD_LOGIN_RESET'); ?>">
|
||||
<i class="icon-help" title="<?php echo JText::_('MOD_LOGIN_RESET'); ?>"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($langs)) : ?>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on">
|
||||
<i class="icon-comment hasTooltip" data-placement="<?php echo $mainDirection; ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('MOD_LOGIN_LANGUAGE'); ?>"></i>
|
||||
<label for="lang" class="element-invisible">
|
||||
<?php echo JText::_('MOD_LOGIN_LANGUAGE'); ?>
|
||||
</label>
|
||||
</span>
|
||||
<?php echo $langs; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="btn-group pull-left">
|
||||
<button tabindex="3" class="btn btn-primary btn-large">
|
||||
<i class="icon-lock icon-white"></i> <?php echo JText::_('MOD_LOGIN_LOGIN'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="option" value="com_login"/>
|
||||
<input type="hidden" name="task" value="login"/>
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>"/>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
1
administrator/modules/mod_login/tmpl/index.html
Normal file
1
administrator/modules/mod_login/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
144
administrator/modules/mod_menu/helper.php
Normal file
144
administrator/modules/mod_menu/helper.php
Normal file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Helper for mod_menu
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
* @since 1.5
|
||||
*/
|
||||
abstract class ModMenuHelper
|
||||
{
|
||||
/**
|
||||
* Get a list of the available menus.
|
||||
*
|
||||
* @return array An array of the available menus (from the menu types table).
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static function getMenus()
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('a.*, SUM(b.home) AS home')
|
||||
->from('#__menu_types AS a')
|
||||
->join('LEFT', '#__menu AS b ON b.menutype = a.menutype AND b.home != 0')
|
||||
->select('b.language')
|
||||
->join('LEFT', '#__languages AS l ON l.lang_code = language')
|
||||
->select('l.image')
|
||||
->select('l.sef')
|
||||
->select('l.title_native')
|
||||
->where('(b.client_id = 0 OR b.client_id IS NULL)');
|
||||
|
||||
// Sqlsrv change
|
||||
$query->group('a.id, a.menutype, a.description, a.title, b.menutype,b.language,l.image,l.sef,l.title_native');
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
$result = $db->loadObjectList();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of the authorised, non-special components to display in the components menu.
|
||||
*
|
||||
* @param boolean $authCheck An optional switch to turn off the auth check (to support custom layouts 'grey out' behaviour).
|
||||
*
|
||||
* @return array A nest array of component objects and submenus
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static function getComponents($authCheck = true)
|
||||
{
|
||||
$lang = JFactory::getLanguage();
|
||||
$user = JFactory::getUser();
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
$result = array();
|
||||
|
||||
// Prepare the query.
|
||||
$query->select('m.id, m.title, m.alias, m.link, m.parent_id, m.img, e.element')
|
||||
->from('#__menu AS m');
|
||||
|
||||
// Filter on the enabled states.
|
||||
$query->join('LEFT', '#__extensions AS e ON m.component_id = e.extension_id')
|
||||
->where('m.client_id = 1')
|
||||
->where('e.enabled = 1')
|
||||
->where('m.id > 1');
|
||||
|
||||
// Order by lft.
|
||||
$query->order('m.lft');
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
// Component list
|
||||
$components = $db->loadObjectList();
|
||||
|
||||
// Parse the list of extensions.
|
||||
foreach ($components as &$component)
|
||||
{
|
||||
// Trim the menu link.
|
||||
$component->link = trim($component->link);
|
||||
|
||||
if ($component->parent_id == 1)
|
||||
{
|
||||
// Only add this top level if it is authorised and enabled.
|
||||
if ($authCheck == false || ($authCheck && $user->authorise('core.manage', $component->element)))
|
||||
{
|
||||
// Root level.
|
||||
$result[$component->id] = $component;
|
||||
|
||||
if (!isset($result[$component->id]->submenu))
|
||||
{
|
||||
$result[$component->id]->submenu = array();
|
||||
}
|
||||
|
||||
// If the root menu link is empty, add it in.
|
||||
if (empty($component->link))
|
||||
{
|
||||
$component->link = 'index.php?option=' . $component->element;
|
||||
}
|
||||
|
||||
if (!empty($component->element))
|
||||
{
|
||||
// Load the core file then
|
||||
// Load extension-local file.
|
||||
$lang->load($component->element . '.sys', JPATH_BASE, null, false, false)
|
||||
|| $lang->load($component->element . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component->element, null, false, false)
|
||||
|| $lang->load($component->element . '.sys', JPATH_BASE, $lang->getDefault(), false, false)
|
||||
|| $lang->load($component->element . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component->element, $lang->getDefault(), false, false);
|
||||
}
|
||||
|
||||
$component->text = $lang->hasKey($component->title) ? JText::_($component->title) : $component->alias;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sub-menu level.
|
||||
if (isset($result[$component->parent_id]))
|
||||
{
|
||||
// Add the submenu link if it is defined.
|
||||
if (isset($result[$component->parent_id]->submenu) && !empty($component->link))
|
||||
{
|
||||
$component->text = $lang->hasKey($component->title) ? JText::_($component->title) : $component->alias;
|
||||
$result[$component->parent_id]->submenu[] = &$component;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result = JArrayHelper::sortObjects($result, 'text', 1, true, true);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
1
administrator/modules/mod_menu/index.html
Normal file
1
administrator/modules/mod_menu/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
452
administrator/modules/mod_menu/menu.php
Normal file
452
administrator/modules/mod_menu/menu.php
Normal file
@ -0,0 +1,452 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Tree based class to render the admin menu
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
* @since 1.5
|
||||
*/
|
||||
class JAdminCssMenu extends JObject
|
||||
{
|
||||
/**
|
||||
* CSS string to add to document head
|
||||
* @var string
|
||||
*/
|
||||
protected $_css = null;
|
||||
|
||||
/**
|
||||
* Root node
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $_root = null;
|
||||
|
||||
/**
|
||||
* Current working node
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $_current = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_root = new JMenuNode('ROOT');
|
||||
$this->_current = & $this->_root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to add a child
|
||||
*
|
||||
* @param JMenuNode &$node The node to process
|
||||
* @param boolean $setCurrent True to set as current working node
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addChild(JMenuNode &$node, $setCurrent = false)
|
||||
{
|
||||
$this->_current->addChild($node);
|
||||
|
||||
if ($setCurrent)
|
||||
{
|
||||
$this->_current = &$node;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
$this->_current = &$this->_current->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->_current = &$this->_root;
|
||||
}
|
||||
|
||||
public function addSeparator()
|
||||
{
|
||||
$this->addChild(new JMenuNode(null, null, 'separator', false));
|
||||
}
|
||||
|
||||
public function renderMenu($id = 'menu', $class = '')
|
||||
{
|
||||
$depth = 1;
|
||||
|
||||
if (!empty($id))
|
||||
{
|
||||
$id = 'id="' . $id . '"';
|
||||
}
|
||||
|
||||
if (!empty($class))
|
||||
{
|
||||
$class = 'class="' . $class . '"';
|
||||
}
|
||||
|
||||
// Recurse through children if they exist
|
||||
while ($this->_current->hasChildren())
|
||||
{
|
||||
echo "<ul " . $id . " " . $class . ">\n";
|
||||
|
||||
foreach ($this->_current->getChildren() as $child)
|
||||
{
|
||||
$this->_current = & $child;
|
||||
$this->renderLevel($depth++);
|
||||
}
|
||||
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
if ($this->_css)
|
||||
{
|
||||
// Add style to document head
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addStyleDeclaration($this->_css);
|
||||
}
|
||||
}
|
||||
|
||||
public function renderLevel($depth)
|
||||
{
|
||||
// Build the CSS class suffix
|
||||
$class = '';
|
||||
|
||||
if ($this->_current->hasChildren())
|
||||
{
|
||||
$class = ' class="dropdown"';
|
||||
}
|
||||
|
||||
if ($this->_current->class == 'separator')
|
||||
{
|
||||
$class = ' class="divider"';
|
||||
}
|
||||
|
||||
if ($this->_current->hasChildren() && $this->_current->class)
|
||||
{
|
||||
$class = ' class="dropdown-submenu"';
|
||||
}
|
||||
|
||||
if ($this->_current->class == 'disabled')
|
||||
{
|
||||
$class = ' class="disabled"';
|
||||
}
|
||||
|
||||
/*
|
||||
* Print the item
|
||||
*/
|
||||
echo "<li" . $class . ">";
|
||||
|
||||
/*
|
||||
* Print a link if it exists
|
||||
*/
|
||||
|
||||
$linkClass = array();
|
||||
$dataToggle = '';
|
||||
$dropdownCaret = '';
|
||||
|
||||
if ($this->_current->hasChildren())
|
||||
{
|
||||
$linkClass[] = 'dropdown-toggle';
|
||||
$dataToggle = ' data-toggle="dropdown"';
|
||||
|
||||
if (!$this->_current->getParent()->hasParent())
|
||||
{
|
||||
$dropdownCaret = ' <span class="caret"></span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_current->link != null && $this->_current->getParent()->title != 'ROOT')
|
||||
{
|
||||
$iconClass = $this->getIconClass($this->_current->class);
|
||||
|
||||
if (!empty($iconClass))
|
||||
{
|
||||
$linkClass[] = $iconClass;
|
||||
}
|
||||
}
|
||||
|
||||
// Implode out $linkClass for rendering
|
||||
$linkClass = ' class="' . implode(' ', $linkClass) . '"';
|
||||
|
||||
if ($this->_current->link != null && $this->_current->target != null)
|
||||
{
|
||||
echo "<a" . $linkClass . " " . $dataToggle . " href=\"" . $this->_current->link . "\" target=\"" . $this->_current->target . "\" >" . $this->_current->title . $dropdownCaret . "</a>";
|
||||
}
|
||||
elseif ($this->_current->link != null && $this->_current->target == null)
|
||||
{
|
||||
echo "<a" . $linkClass . " " . $dataToggle . " href=\"" . $this->_current->link . "\">" . $this->_current->title . $dropdownCaret . "</a>";
|
||||
}
|
||||
elseif ($this->_current->title != null)
|
||||
{
|
||||
echo "<a" . $linkClass . " " . $dataToggle . ">" . $this->_current->title . $dropdownCaret . "</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<span></span>";
|
||||
}
|
||||
|
||||
// Recurse through children if they exist
|
||||
while ($this->_current->hasChildren())
|
||||
{
|
||||
if ($this->_current->class)
|
||||
{
|
||||
$id = '';
|
||||
|
||||
if (!empty($this->_current->id))
|
||||
{
|
||||
$id = ' id="menu-' . strtolower($this->_current->id) . '"';
|
||||
}
|
||||
|
||||
echo '<ul' . $id . ' class="dropdown-menu menu-component">' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<ul class="dropdown-menu">' . "\n";
|
||||
}
|
||||
|
||||
foreach ($this->_current->getChildren() as $child)
|
||||
{
|
||||
$this->_current = & $child;
|
||||
$this->renderLevel($depth++);
|
||||
}
|
||||
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the CSS class name for an icon identifier or create one if
|
||||
* a custom image path is passed as the identifier
|
||||
*
|
||||
* @param string $identifier Icon identification string
|
||||
*
|
||||
* @return string CSS class name
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function getIconClass($identifier)
|
||||
{
|
||||
static $classes;
|
||||
|
||||
// Initialise the known classes array if it does not exist
|
||||
if (!is_array($classes))
|
||||
{
|
||||
$classes = array();
|
||||
}
|
||||
|
||||
/*
|
||||
* If we don't already know about the class... build it and mark it
|
||||
* known so we don't have to build it again
|
||||
*/
|
||||
if (!isset($classes[$identifier]))
|
||||
{
|
||||
if (substr($identifier, 0, 6) == 'class:')
|
||||
{
|
||||
// We were passed a class name
|
||||
$class = substr($identifier, 6);
|
||||
$classes[$identifier] = "menu-$class";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($identifier == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Build the CSS class for the icon
|
||||
$class = preg_replace('#\.[^.]*$#', '', basename($identifier));
|
||||
$class = preg_replace('#\.\.[^A-Za-z0-9\.\_\- ]#', '', $class);
|
||||
|
||||
$this->_css .= "\n.menu-$class {\n" .
|
||||
"\tbackground: url($identifier) no-repeat;\n" .
|
||||
"}\n";
|
||||
|
||||
$classes[$identifier] = "menu-$class";
|
||||
}
|
||||
}
|
||||
|
||||
return $classes[$identifier];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A Node for JAdminCssMenu
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
* @see JAdminCssMenu
|
||||
* @since 1.5
|
||||
*/
|
||||
class JMenuNode extends JObject
|
||||
{
|
||||
/**
|
||||
* Node Title
|
||||
*/
|
||||
public $title = null;
|
||||
|
||||
/**
|
||||
* Node Id
|
||||
*/
|
||||
public $id = null;
|
||||
|
||||
/**
|
||||
* Node Link
|
||||
*/
|
||||
public $link = null;
|
||||
|
||||
/**
|
||||
* Link Target
|
||||
*/
|
||||
public $target = null;
|
||||
|
||||
/**
|
||||
* CSS Class for node
|
||||
*/
|
||||
public $class = null;
|
||||
|
||||
/**
|
||||
* Active Node?
|
||||
*/
|
||||
public $active = false;
|
||||
|
||||
/**
|
||||
* Parent node
|
||||
* @var object
|
||||
*/
|
||||
protected $_parent = null;
|
||||
|
||||
/**
|
||||
* Array of Children
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_children = array();
|
||||
|
||||
public function __construct($title, $link = null, $class = null, $active = false, $target = null, $titleicon = null)
|
||||
{
|
||||
$this->title = $titleicon ? $title . $titleicon : $title;
|
||||
$this->link = JFilterOutput::ampReplace($link);
|
||||
$this->class = $class;
|
||||
$this->active = $active;
|
||||
|
||||
$this->id = null;
|
||||
|
||||
if (!empty($link) && $link !== '#')
|
||||
{
|
||||
$uri = new JUri($link);
|
||||
$params = $uri->getQuery(true);
|
||||
$parts = array();
|
||||
|
||||
foreach ($params as $value)
|
||||
{
|
||||
$parts[] = str_replace(array('.', '_'), '-', $value);
|
||||
}
|
||||
|
||||
$this->id = implode('-', $parts);
|
||||
}
|
||||
|
||||
$this->target = $target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add child to this node
|
||||
*
|
||||
* If the child already has a parent, the link is unset
|
||||
*
|
||||
* @param JMenuNode &$child The child to be added
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addChild(JMenuNode &$child)
|
||||
{
|
||||
$child->setParent($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parent of a this node
|
||||
*
|
||||
* If the node already has a parent, the link is unset
|
||||
*
|
||||
* @param JMenuNode &$parent The JMenuNode for parent to be set or null
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setParent(JMenuNode &$parent = null)
|
||||
{
|
||||
$hash = spl_object_hash($this);
|
||||
|
||||
if (!is_null($this->_parent))
|
||||
{
|
||||
unset($this->_parent->children[$hash]);
|
||||
}
|
||||
|
||||
if (!is_null($parent))
|
||||
{
|
||||
$parent->_children[$hash] = & $this;
|
||||
}
|
||||
|
||||
$this->_parent = & $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the children of this node
|
||||
*
|
||||
* @return array The children
|
||||
*/
|
||||
public function &getChildren()
|
||||
{
|
||||
return $this->_children;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parent of this node
|
||||
*
|
||||
* @return mixed JMenuNode object with the parent or null for no parent
|
||||
*/
|
||||
public function &getParent()
|
||||
{
|
||||
return $this->_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if this node has children
|
||||
*
|
||||
* @return boolean True if there are children
|
||||
*/
|
||||
public function hasChildren()
|
||||
{
|
||||
return (bool) count($this->_children);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if this node has a parent
|
||||
*
|
||||
* @return boolean True if there is a parent
|
||||
*/
|
||||
public function hasParent()
|
||||
{
|
||||
return $this->getParent() != null;
|
||||
}
|
||||
}
|
30
administrator/modules/mod_menu/mod_menu.php
Normal file
30
administrator/modules/mod_menu/mod_menu.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the module helper classes.
|
||||
if (!class_exists('ModMenuHelper'))
|
||||
{
|
||||
require __DIR__ . '/helper.php';
|
||||
}
|
||||
|
||||
if (!class_exists('JAdminCssMenu'))
|
||||
{
|
||||
require __DIR__ . '/menu.php';
|
||||
}
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
$user = JFactory::getUser();
|
||||
$input = JFactory::getApplication()->input;
|
||||
$menu = new JAdminCSSMenu;
|
||||
$enabled = $input->getBool('hidemainmenu') ? false : true;
|
||||
|
||||
// Render the module layout
|
||||
require JModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default'));
|
83
administrator/modules/mod_menu/mod_menu.xml
Normal file
83
administrator/modules/mod_menu/mod_menu.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_menu</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>March 2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_MENU_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_menu">mod_menu.php</filename>
|
||||
<filename>menu.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_menu.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_menu.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_MENU" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="shownew"
|
||||
type="list"
|
||||
default="1"
|
||||
label="MOD_MENU_FIELD_SHOWNEW"
|
||||
description="MOD_MENU_FIELD_SHOWNEW_DESC">
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="showhelp"
|
||||
type="list"
|
||||
default="1"
|
||||
label="MOD_MENU_FIELD_SHOWHELP"
|
||||
description="MOD_MENU_FIELD_SHOWHELP_DESC">
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="forum_url"
|
||||
type="url"
|
||||
class="inputbox"
|
||||
size="30"
|
||||
default=""
|
||||
label="MOD_MENU_FIELD_FORUMURL_LABEL"
|
||||
description="MOD_MENU_FIELD_FORUMURL_DESC"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
16
administrator/modules/mod_menu/tmpl/default.php
Normal file
16
administrator/modules/mod_menu/tmpl/default.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$direction = $document->direction == 'rtl' ? 'pull-right' : '';
|
||||
require JModuleHelper::getLayoutPath('mod_menu', $enabled ? 'default_enabled' : 'default_disabled');
|
||||
|
||||
$menu->renderMenu('menu', $enabled ? 'nav ' . $direction : 'nav disabled ' . $direction);
|
75
administrator/modules/mod_menu/tmpl/default_disabled.php
Normal file
75
administrator/modules/mod_menu/tmpl/default_disabled.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
$showhelp = $params->get('showhelp', 1);
|
||||
|
||||
/**
|
||||
* Site SubMenu
|
||||
**/
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_SYSTEM'), null, 'disabled'));
|
||||
|
||||
/**
|
||||
* Users Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_users'))
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COM_USERS'), null, 'disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Menus Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_menus'))
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENUS'), null, 'disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Content Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_content'))
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COM_CONTENT'), null, 'disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Components Submenu
|
||||
**/
|
||||
|
||||
// Get the authorised components and sub-menus.
|
||||
$components = ModMenuHelper::getComponents(true);
|
||||
|
||||
// Check if there are any components, otherwise, don't display the components menu item
|
||||
if ($components)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COMPONENTS'), null, 'disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Extensions Submenu
|
||||
**/
|
||||
$im = $user->authorise('core.manage', 'com_installer');
|
||||
$mm = $user->authorise('core.manage', 'com_modules');
|
||||
$pm = $user->authorise('core.manage', 'com_plugins');
|
||||
$tm = $user->authorise('core.manage', 'com_templates');
|
||||
$lm = $user->authorise('core.manage', 'com_languages');
|
||||
|
||||
if ($im || $mm || $pm || $tm || $lm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_EXTENSIONS'), null, 'disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Help Submenu
|
||||
**/
|
||||
if ($showhelp == 1) {
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_HELP'), null, 'disabled'));
|
||||
}
|
413
administrator/modules/mod_menu/tmpl/default_enabled.php
Normal file
413
administrator/modules/mod_menu/tmpl/default_enabled.php
Normal file
@ -0,0 +1,413 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @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;
|
||||
|
||||
/* @var $menu JAdminCSSMenu */
|
||||
|
||||
$shownew = (boolean) $params->get('shownew', 1);
|
||||
$showhelp = $params->get('showhelp', 1);
|
||||
$user = JFactory::getUser();
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
/**
|
||||
* Site SubMenu
|
||||
**/
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_SYSTEM'), '#'), true
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_CONTROL_PANEL'), 'index.php', 'class:cpanel')
|
||||
);
|
||||
|
||||
$menu->addSeparator();
|
||||
|
||||
if ($user->authorise('core.admin'))
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_CONFIGURATION'), 'index.php?option=com_config', 'class:config'));
|
||||
$menu->addSeparator();
|
||||
}
|
||||
|
||||
$chm = $user->authorise('core.manage', 'com_checkin');
|
||||
$cam = $user->authorise('core.manage', 'com_cache');
|
||||
|
||||
if ($chm || $cam )
|
||||
{
|
||||
// Keep this for when bootstrap supports submenus?
|
||||
/* $menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MAINTENANCE'), 'index.php?option=com_checkin', 'class:maintenance'), true
|
||||
);*/
|
||||
|
||||
if ($chm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_GLOBAL_CHECKIN'), 'index.php?option=com_checkin', 'class:checkin'));
|
||||
$menu->addSeparator();
|
||||
}
|
||||
|
||||
if ($cam)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_CLEAR_CACHE'), 'index.php?option=com_cache', 'class:clear'));
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_PURGE_EXPIRED_CACHE'), 'index.php?option=com_cache&view=purge', 'class:purge'));
|
||||
}
|
||||
|
||||
// $menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addSeparator();
|
||||
|
||||
if ($user->authorise('core.admin'))
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_SYSTEM_INFORMATION'), 'index.php?option=com_admin&view=sysinfo', 'class:info')
|
||||
);
|
||||
}
|
||||
|
||||
$menu->getParent();
|
||||
|
||||
/**
|
||||
* Users Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_users'))
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_USERS'), '#'), true
|
||||
);
|
||||
$createUser = $shownew && $user->authorise('core.create', 'com_users');
|
||||
$createGrp = $user->authorise('core.admin', 'com_users');
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_USER_MANAGER'), 'index.php?option=com_users&view=users', 'class:user'), $createUser
|
||||
);
|
||||
|
||||
if ($createUser)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_ADD_USER'), 'index.php?option=com_users&task=user.add', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
if ($createGrp)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_GROUPS'), 'index.php?option=com_users&view=groups', 'class:groups'), $createUser
|
||||
);
|
||||
|
||||
if ($createUser)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_ADD_GROUP'), 'index.php?option=com_users&task=group.add', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_LEVELS'), 'index.php?option=com_users&view=levels', 'class:levels'), $createUser
|
||||
);
|
||||
|
||||
if ($createUser)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_ADD_LEVEL'), 'index.php?option=com_users&task=level.add', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
}
|
||||
|
||||
$menu->addSeparator();
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_NOTES'), 'index.php?option=com_users&view=notes', 'class:user-note'), $createUser
|
||||
);
|
||||
|
||||
if ($createUser)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_ADD_NOTE'), 'index.php?option=com_users&task=note.add', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_USERS_NOTE_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_users', 'class:category'), $createUser
|
||||
);
|
||||
|
||||
if ($createUser)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_NEW_CATEGORY'), 'index.php?option=com_categories&task=category.add&extension=com_users.notes', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addSeparator();
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MASS_MAIL_USERS'), 'index.php?option=com_users&view=mail', 'class:massmail')
|
||||
);
|
||||
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Menus Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_menus'))
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MENUS'), '#'), true
|
||||
);
|
||||
$createMenu = $shownew && $user->authorise('core.create', 'com_menus');
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MENU_MANAGER'), 'index.php?option=com_menus&view=menus', 'class:menumgr'), $createMenu
|
||||
);
|
||||
|
||||
if ($createMenu)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MENU_MANAGER_NEW_MENU'), 'index.php?option=com_menus&view=menu&layout=edit', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addSeparator();
|
||||
|
||||
// Menu Types
|
||||
foreach (ModMenuHelper::getMenus() as $menuType)
|
||||
{
|
||||
$alt = '*' . $menuType->sef . '*';
|
||||
|
||||
if ($menuType->home == 0)
|
||||
{
|
||||
$titleicon = '';
|
||||
}
|
||||
elseif ($menuType->home == 1 && $menuType->language == '*')
|
||||
{
|
||||
$titleicon = ' <i class="icon-home"></i>';
|
||||
}
|
||||
elseif ($menuType->home > 1)
|
||||
{
|
||||
$titleicon = ' <span>'.JHtml::_('image', 'mod_languages/icon-16-language.png', $menuType->home, array('title' => JText::_('MOD_MENU_HOME_MULTIPLE')), true).'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$image = JHtml::_('image', 'mod_languages/' . $menuType->image . '.gif', null, null, true, true);
|
||||
|
||||
if (!$image)
|
||||
{
|
||||
$titleicon = ' <span>' . JHtml::_('image', 'mod_languages/icon-16-language.png', $alt, array('title' => $menuType->title_native), true) . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$titleicon = ' <span>' . JHtml::_('image', 'mod_languages/' . $menuType->image . '.gif', $alt, array('title' => $menuType->title_native), true) . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode($menuType->title, 'index.php?option=com_menus&view=items&menutype='.$menuType->menutype, 'class:menu', null, null, $titleicon), $createMenu
|
||||
);
|
||||
|
||||
if ($createMenu)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_MENU_MANAGER_NEW_MENU_ITEM'), 'index.php?option=com_menus&view=item&layout=edit&menutype='.$menuType->menutype, 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
}
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Content Submenu
|
||||
**/
|
||||
if ($user->authorise('core.manage', 'com_content'))
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT'), '#'), true
|
||||
);
|
||||
$createContent = $shownew && $user->authorise('core.create', 'com_content');
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_ARTICLE_MANAGER'), 'index.php?option=com_content', 'class:article'), $createContent
|
||||
);
|
||||
|
||||
if ($createContent)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_NEW_ARTICLE'), 'index.php?option=com_content&task=article.add', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_CATEGORY_MANAGER'), 'index.php?option=com_categories&extension=com_content', 'class:category'), $createContent
|
||||
);
|
||||
|
||||
if ($createContent)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_NEW_CATEGORY'), 'index.php?option=com_categories&task=category.add&extension=com_content', 'class:newarticle')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_COM_CONTENT_FEATURED'), 'index.php?option=com_content&view=featured', 'class:featured')
|
||||
);
|
||||
$menu->addSeparator();
|
||||
|
||||
if ($user->authorise('core.manage', 'com_media'))
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_MEDIA_MANAGER'), 'index.php?option=com_media', 'class:media'));
|
||||
}
|
||||
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Components Submenu
|
||||
**/
|
||||
|
||||
// Get the authorised components and sub-menus.
|
||||
$components = ModMenuHelper::getComponents(true);
|
||||
|
||||
// Check if there are any components, otherwise, don't render the menu
|
||||
if ($components)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COMPONENTS'), '#'), true);
|
||||
|
||||
foreach ($components as &$component)
|
||||
{
|
||||
if (!empty($component->submenu))
|
||||
{
|
||||
// This component has a db driven submenu.
|
||||
$menu->addChild(new JMenuNode($component->text, $component->link, $component->img), true);
|
||||
|
||||
foreach ($component->submenu as $sub)
|
||||
{
|
||||
$menu->addChild(new JMenuNode($sub->text, $sub->link, $sub->img));
|
||||
}
|
||||
|
||||
$menu->getParent();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu->addChild(new JMenuNode($component->text, $component->link, $component->img));
|
||||
}
|
||||
}
|
||||
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Extensions Submenu
|
||||
**/
|
||||
$im = $user->authorise('core.manage', 'com_installer');
|
||||
$mm = $user->authorise('core.manage', 'com_modules');
|
||||
$pm = $user->authorise('core.manage', 'com_plugins');
|
||||
$tm = $user->authorise('core.manage', 'com_templates');
|
||||
$lm = $user->authorise('core.manage', 'com_languages');
|
||||
|
||||
if ($im || $mm || $pm || $tm || $lm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_EXTENSIONS'), '#'), true);
|
||||
|
||||
if ($im)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_EXTENSION_MANAGER'), 'index.php?option=com_installer', 'class:install'));
|
||||
$menu->addSeparator();
|
||||
}
|
||||
|
||||
if ($mm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_MODULE_MANAGER'), 'index.php?option=com_modules', 'class:module'));
|
||||
}
|
||||
|
||||
if ($pm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_PLUGIN_MANAGER'), 'index.php?option=com_plugins', 'class:plugin'));
|
||||
}
|
||||
|
||||
if ($tm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_TEMPLATE_MANAGER'), 'index.php?option=com_templates', 'class:themes'));
|
||||
}
|
||||
|
||||
if ($lm)
|
||||
{
|
||||
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_EXTENSIONS_LANGUAGE_MANAGER'), 'index.php?option=com_languages', 'class:language'));
|
||||
}
|
||||
|
||||
$menu->getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Help Submenu
|
||||
**/
|
||||
if ($showhelp == 1)
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP'), '#'), true
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_JOOMLA'), 'index.php?option=com_admin&view=help', 'class:help')
|
||||
);
|
||||
$menu->addSeparator();
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_FORUM'), 'http://forum.joomla.org', 'class:help-forum', false, '_blank')
|
||||
);
|
||||
|
||||
if ($forum_url = $params->get('forum_url'))
|
||||
{
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_SUPPORT_CUSTOM_FORUM'), $forum_url, 'class:help-forum', false, '_blank')
|
||||
);
|
||||
}
|
||||
|
||||
$debug = $lang->setDebug(false);
|
||||
|
||||
if ($lang->hasKey('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE') && JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE') != '')
|
||||
{
|
||||
$forum_url = 'http://forum.joomla.org/viewforum.php?f=' . (int) JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE');
|
||||
$lang->setDebug($debug);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM'), $forum_url, 'class:help-forum', false, '_blank')
|
||||
);
|
||||
}
|
||||
|
||||
$lang->setDebug($debug);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_DOCUMENTATION'), 'http://docs.joomla.org', 'class:help-docs', false, '_blank')
|
||||
);
|
||||
$menu->addSeparator();
|
||||
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'http://extensions.joomla.org', 'class:help-jed', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_TRANSLATIONS'), 'http://community.joomla.org/translations.html', 'class:help-trans', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_RESOURCES'), 'http://resources.joomla.org', 'class:help-jrd', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_COMMUNITY'), 'http://community.joomla.org', 'class:help-community', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_SECURITY'), 'http://developer.joomla.org/security.html', 'class:help-security', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_DEVELOPER'), 'http://developer.joomla.org', 'class:help-dev', false, '_blank')
|
||||
);
|
||||
$menu->addChild(
|
||||
new JMenuNode(JText::_('MOD_MENU_HELP_SHOP'), 'http://shop.joomla.org', 'class:help-shop', false, '_blank')
|
||||
);
|
||||
$menu->getParent();
|
||||
}
|
1
administrator/modules/mod_menu/tmpl/index.html
Normal file
1
administrator/modules/mod_menu/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_multilangstatus/index.html
Normal file
1
administrator/modules/mod_multilangstatus/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,7 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
MOD_MULTILANGSTATUS="Multilanguage Status"
|
||||
MOD_MULTILANGSTATUS_XML_DESCRIPTION="This module shows the status of the multilanguage parameters."
|
@ -0,0 +1,7 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
MOD_MULTILANGSTATUS="Multilanguage Status"
|
||||
MOD_MULTILANGSTATUS_XML_DESCRIPTION="This module shows the status of the multilanguage parameters."
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_multilangstatus
|
||||
*
|
||||
* @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;
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_multilangstatus', $params->get('layout', 'default'));
|
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator"
|
||||
method="upgrade">
|
||||
<name>mod_multilangstatus</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>September 2011</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_MULTILANGSTATUS_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_multilangstatus">mod_multilangstatus.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
<folder>language</folder>
|
||||
</files>
|
||||
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB/en-GB.mod_multilangstatus.ini</language>
|
||||
<language tag="en-GB">language/en-GB/en-GB.mod_multilangstatus.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_MULTILANG" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
14
administrator/modules/mod_multilangstatus/tmpl/default.php
Normal file
14
administrator/modules/mod_multilangstatus/tmpl/default.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_multilangstatus
|
||||
*
|
||||
* @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::_('behavior.modal');
|
||||
?>
|
||||
<div class="btn-group multilanguage"><a class="modal" href="<?php echo JRoute::_('index.php?option=com_languages&view=multilangstatus&tmpl=component');?>" rel="{handler:'iframe', size:{x:700,y:400}}"><i class="icon-comment"></i> <?php echo JText::_('MOD_MULTILANGSTATUS');?></a></div>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
129
administrator/modules/mod_popular/helper.php
Normal file
129
administrator/modules/mod_popular/helper.php
Normal file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_popular
|
||||
*
|
||||
* @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;
|
||||
|
||||
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/models', 'ContentModel');
|
||||
|
||||
/**
|
||||
* Helper for mod_popular
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_popular
|
||||
* @since 1.6
|
||||
*/
|
||||
abstract class ModPopularHelper
|
||||
{
|
||||
/**
|
||||
* Get a list of the most popular articles
|
||||
*
|
||||
* @param JObject &$params The module parameters.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getList(&$params)
|
||||
{
|
||||
$user = JFactory::getuser();
|
||||
|
||||
// Get an instance of the generic articles model
|
||||
$model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
|
||||
|
||||
// Set List SELECT
|
||||
$model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' .
|
||||
' a.created, a.hits');
|
||||
|
||||
// Set Ordering filter
|
||||
$model->setState('list.ordering', 'a.hits');
|
||||
$model->setState('list.direction', 'DESC');
|
||||
|
||||
// Set Category Filter
|
||||
$categoryId = $params->get('catid');
|
||||
|
||||
if (is_numeric($categoryId))
|
||||
{
|
||||
$model->setState('filter.category_id', $categoryId);
|
||||
}
|
||||
|
||||
// Set User Filter.
|
||||
$userId = $user->get('id');
|
||||
|
||||
switch ($params->get('user_id'))
|
||||
{
|
||||
case 'by_me':
|
||||
$model->setState('filter.author_id', $userId);
|
||||
break;
|
||||
|
||||
case 'not_me':
|
||||
$model->setState('filter.author_id', $userId);
|
||||
$model->setState('filter.author_id.include', false);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the Start and Limit
|
||||
$model->setState('list.start', 0);
|
||||
$model->setState('list.limit', $params->get('count', 5));
|
||||
|
||||
$items = $model->getItems();
|
||||
|
||||
if ($error = $model->getError())
|
||||
{
|
||||
JError::raiseError(500, $error);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the links
|
||||
foreach ($items as &$item)
|
||||
{
|
||||
if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
|
||||
{
|
||||
$item->link = JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$item->link = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the alternate title for the module
|
||||
*
|
||||
* @param JObject $params The module parameters.
|
||||
*
|
||||
* @return string The alternate title for the module.
|
||||
*/
|
||||
public static function getTitle($params)
|
||||
{
|
||||
$who = $params->get('user_id');
|
||||
$catid = (int) $params->get('catid');
|
||||
|
||||
if ($catid)
|
||||
{
|
||||
$category = JCategories::getInstance('Content')->get($catid);
|
||||
|
||||
if ($category)
|
||||
{
|
||||
$title = $category->title;
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = JText::_('MOD_POPULAR_UNEXISTING');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = '';
|
||||
}
|
||||
|
||||
return JText::plural('MOD_POPULAR_TITLE' . ($catid ? "_CATEGORY" : '') . ($who != '0' ? "_$who" : ''), (int) $params->get('count'), $title);
|
||||
}
|
||||
}
|
1
administrator/modules/mod_popular/index.html
Normal file
1
administrator/modules/mod_popular/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
19
administrator/modules/mod_popular/mod_popular.php
Normal file
19
administrator/modules/mod_popular/mod_popular.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_popular
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the mod_popular functions only once.
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
// Get module data.
|
||||
$list = ModPopularHelper::getList($params);
|
||||
|
||||
// Render the module
|
||||
require JModuleHelper::getLayoutPath('mod_popular', $params->get('layout', 'default'));
|
100
administrator/modules/mod_popular/mod_popular.xml
Normal file
100
administrator/modules/mod_popular/mod_popular.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_popular</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>July 2004</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_POPULAR_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_popular">mod_popular.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_popular.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_popular.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_POPULAR" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="count"
|
||||
type="text"
|
||||
default="5"
|
||||
label="MOD_POPULAR_FIELD_COUNT_LABEL"
|
||||
description="MOD_POPULAR_FIELD_COUNT_DESC" />
|
||||
<field
|
||||
id="catid"
|
||||
name="catid"
|
||||
type="category"
|
||||
extension="com_content"
|
||||
label="JCATEGORY"
|
||||
description="MOD_POPULAR_FIELD_CATEGORY_DESC"
|
||||
default=""
|
||||
class="inputbox">
|
||||
<option
|
||||
value="">JOPTION_ANY_CATEGORY</option>
|
||||
</field>
|
||||
<field
|
||||
name="user_id"
|
||||
type="list"
|
||||
default="0"
|
||||
label="MOD_POPULAR_FIELD_AUTHORS_LABEL"
|
||||
description="MOD_POPULAR_FIELD_AUTHORS_DESC">
|
||||
<option
|
||||
value="0">MOD_POPULAR_FIELD_VALUE_ANYONE</option>
|
||||
<option
|
||||
value="by_me">MOD_POPULAR_FIELD_VALUE_ADDED_OR_MODIFIED_BY_ME</option>
|
||||
<option
|
||||
value="not_me">MOD_POPULAR_FIELD_VALUE_NOT_ADDED_OR_MODIFIED_BY_ME</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="automatic_title"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL"
|
||||
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
49
administrator/modules/mod_popular/tmpl/default.php
Normal file
49
administrator/modules/mod_popular/tmpl/default.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_popular
|
||||
*
|
||||
* @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::_('bootstrap.tooltip');
|
||||
?>
|
||||
<div class="row-striped">
|
||||
<?php if (count($list)) : ?>
|
||||
<?php foreach ($list as $i => $item) :
|
||||
// Calculate popular items
|
||||
$hits = (int) $item->hits;
|
||||
$hits_class = $hits >= 100 ? 'important' : $hits >= 25 ? 'warning' : $hits >= 10 ? 'info' : '';
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<span class="badge badge-<?php echo $hits_class;?> hasTooltip" title="<?php echo JHtml::tooltipText('JGLOBAL_HITS');?>"><?php echo $item->hits;?></span>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<strong class="row-title">
|
||||
<?php if ($item->link) :?>
|
||||
<a href="<?php echo $item->link; ?>">
|
||||
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');?></a>
|
||||
<?php else :
|
||||
echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');
|
||||
endif; ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<span class="small"><i class="icon-calendar"></i> <?php echo JHtml::_('date', $item->created, 'Y-m-d'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="alert"><?php echo JText::_('MOD_POPULAR_NO_MATCHING_RESULTS');?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
1
administrator/modules/mod_popular/tmpl/index.html
Normal file
1
administrator/modules/mod_popular/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
194
administrator/modules/mod_quickicon/helper.php
Normal file
194
administrator/modules/mod_quickicon/helper.php
Normal file
@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_quickicon
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Helper for mod_quickicon
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_quickicon
|
||||
* @since 1.6
|
||||
*/
|
||||
abstract class ModQuickIconHelper
|
||||
{
|
||||
/**
|
||||
* Stack to hold buttons
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected static $buttons = array();
|
||||
|
||||
/**
|
||||
* Helper method to return button list.
|
||||
*
|
||||
* This method returns the array by reference so it can be
|
||||
* used to add custom buttons or remove default ones.
|
||||
*
|
||||
* @param JObject $params The module parameters.
|
||||
*
|
||||
* @return array An array of buttons
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static function &getButtons($params)
|
||||
{
|
||||
$key = (string) $params;
|
||||
|
||||
if (!isset(self::$buttons[$key]))
|
||||
{
|
||||
$context = $params->get('context', 'mod_quickicon');
|
||||
|
||||
if ($context == 'mod_quickicon')
|
||||
{
|
||||
// Load mod_quickicon language file in case this method is called before rendering the module
|
||||
JFactory::getLanguage()->load('mod_quickicon');
|
||||
|
||||
self::$buttons[$key] = array(
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_content&task=article.add'),
|
||||
'image' => 'file-add',
|
||||
'icon' => 'header/icon-48-article-add.png',
|
||||
'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'),
|
||||
'access' => array('core.manage', 'com_content', 'core.create', 'com_content', )
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_content'),
|
||||
'image' => 'pencil-2',
|
||||
'icon' => 'header/icon-48-article.png',
|
||||
'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'),
|
||||
'access' => array('core.manage', 'com_content')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_categories&extension=com_content'),
|
||||
'image' => 'folder',
|
||||
'icon' => 'header/icon-48-category.png',
|
||||
'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'),
|
||||
'access' => array('core.manage', 'com_content')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_media'),
|
||||
'image' => 'pictures',
|
||||
'icon' => 'header/icon-48-media.png',
|
||||
'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'),
|
||||
'access' => array('core.manage', 'com_media')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_menus'),
|
||||
'image' => 'list-view',
|
||||
'icon' => 'header/icon-48-menumgr.png',
|
||||
'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'),
|
||||
'access' => array('core.manage', 'com_menus')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_users'),
|
||||
'image' => 'address',
|
||||
'icon' => 'header/icon-48-user.png',
|
||||
'text' => JText::_('MOD_QUICKICON_USER_MANAGER'),
|
||||
'access' => array('core.manage', 'com_users')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_modules'),
|
||||
'image' => 'cube',
|
||||
'icon' => 'header/icon-48-module.png',
|
||||
'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'),
|
||||
'access' => array('core.manage', 'com_modules')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_installer'),
|
||||
'image' => 'puzzle',
|
||||
'icon' => 'header/icon-48-extension.png',
|
||||
'text' => JText::_('MOD_QUICKICON_EXTENSION_MANAGER'),
|
||||
'access' => array('core.manage', 'com_installer')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_languages'),
|
||||
'image' => 'comments-2',
|
||||
'icon' => 'header/icon-48-language.png',
|
||||
'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'),
|
||||
'access' => array('core.manage', 'com_languages')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_config'),
|
||||
'image' => 'cog',
|
||||
'icon' => 'header/icon-48-config.png',
|
||||
'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'),
|
||||
'access' => array('core.manage', 'com_config', 'core.admin', 'com_config')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_templates'),
|
||||
'image' => 'eye',
|
||||
'icon' => 'header/icon-48-themes.png',
|
||||
'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'),
|
||||
'access' => array('core.manage', 'com_templates')
|
||||
),
|
||||
array(
|
||||
'link' => JRoute::_('index.php?option=com_admin&task=profile.edit&id=' . JFactory::getUser()->id),
|
||||
'image' => 'vcard',
|
||||
'icon' => 'header/icon-48-user-profile.png',
|
||||
'text' => JText::_('MOD_QUICKICON_PROFILE'),
|
||||
'access' => true
|
||||
),
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$buttons[$key] = array();
|
||||
}
|
||||
|
||||
// Include buttons defined by published quickicon plugins
|
||||
JPluginHelper::importPlugin('quickicon');
|
||||
$app = JFactory::getApplication();
|
||||
$arrays = (array) $app->triggerEvent('onGetIcons', array($context));
|
||||
|
||||
foreach ($arrays as $response)
|
||||
{
|
||||
foreach ($response as $icon)
|
||||
{
|
||||
$default = array(
|
||||
'link' => null,
|
||||
'image' => 'cog',
|
||||
'text' => null,
|
||||
'access' => true
|
||||
);
|
||||
$icon = array_merge($default, $icon);
|
||||
|
||||
if (!is_null($icon['link']) && !is_null($icon['text']))
|
||||
{
|
||||
self::$buttons[$key][] = $icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return self::$buttons[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the alternate title for the module
|
||||
*
|
||||
* @param JObject $params The module parameters.
|
||||
* @param JObject $module The module.
|
||||
*
|
||||
* @return string The alternate title for the module.
|
||||
*/
|
||||
public static function getTitle($params, $module)
|
||||
{
|
||||
$key = $params->get('context', 'mod_quickicon') . '_title';
|
||||
|
||||
if (JFactory::getLanguage()->hasKey($key))
|
||||
{
|
||||
return JText::_($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $module->title;
|
||||
}
|
||||
}
|
||||
}
|
1
administrator/modules/mod_quickicon/index.html
Normal file
1
administrator/modules/mod_quickicon/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
16
administrator/modules/mod_quickicon/mod_quickicon.php
Normal file
16
administrator/modules/mod_quickicon/mod_quickicon.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_quickicon
|
||||
*
|
||||
* @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;
|
||||
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
$buttons = ModQuickIconHelper::getButtons($params);
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_quickicon', $params->get('layout', 'default'));
|
83
administrator/modules/mod_quickicon/mod_quickicon.xml
Normal file
83
administrator/modules/mod_quickicon/mod_quickicon.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_quickicon</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>Nov 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_QUICKICON_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_quickicon">mod_quickicon.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_quickicon.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_quickicon.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_QUICKICON" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="context"
|
||||
type="text"
|
||||
default="mod_quickicon"
|
||||
description="MOD_QUICKICON_GROUP_DESC"
|
||||
label="MOD_QUICKICON_GROUP_LABEL"
|
||||
/>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="text"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
|
||||
|
||||
<field
|
||||
name="automatic_title"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL"
|
||||
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
18
administrator/modules/mod_quickicon/tmpl/default.php
Normal file
18
administrator/modules/mod_quickicon/tmpl/default.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_quickicon
|
||||
*
|
||||
* @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;
|
||||
|
||||
$html = JHtml::_('icons.buttons', $buttons);
|
||||
?>
|
||||
<?php if (!empty($html)) : ?>
|
||||
<div class="row-striped">
|
||||
<?php echo $html;?>
|
||||
</div>
|
||||
<?php endif;?>
|
1
administrator/modules/mod_quickicon/tmpl/index.html
Normal file
1
administrator/modules/mod_quickicon/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
149
administrator/modules/mod_stats_admin/helper.php
Normal file
149
administrator/modules/mod_stats_admin/helper.php
Normal file
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_stats_admin
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_stats_admin
|
||||
* @since 3.0
|
||||
*/
|
||||
class ModStatsHelper
|
||||
{
|
||||
/**
|
||||
* Method to retrieve information about the site
|
||||
*
|
||||
* @param JObject $params Params object
|
||||
*
|
||||
* @return array Array containing site information
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public static function getStats(&$params)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$db = JFactory::getDbo();
|
||||
$rows = array();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$serverinfo = $params->get('serverinfo');
|
||||
$siteinfo = $params->get('siteinfo');
|
||||
$counter = $params->get('counter');
|
||||
$increase = $params->get('increase');
|
||||
|
||||
$i = 0;
|
||||
if ($serverinfo)
|
||||
{
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_OS');
|
||||
$rows[$i]->icon = 'screen';
|
||||
$rows[$i]->data = substr(php_uname(), 0, 7);
|
||||
$i++;
|
||||
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_PHP');
|
||||
$rows[$i]->icon = 'cogs';
|
||||
$rows[$i]->data = phpversion();
|
||||
$i++;
|
||||
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_($db->name);
|
||||
$rows[$i]->icon = 'database';
|
||||
$rows[$i]->data = $db->getVersion();
|
||||
$i++;
|
||||
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JTEXT::_('MOD_STATS_TIME');
|
||||
$rows[$i]->icon = 'clock';
|
||||
$rows[$i]->data = JHtml::_('date', 'now', 'H:i');
|
||||
$i++;
|
||||
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_CACHING');
|
||||
$rows[$i]->icon = 'dashboard';
|
||||
$rows[$i]->data = $app->getCfg('caching') ? JText::_('JENABLED') : JText::_('JDISABLED');
|
||||
$i++;
|
||||
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_GZIP');
|
||||
$rows[$i]->icon = 'lightning';
|
||||
$rows[$i]->data = $app->getCfg('gzip') ? JText::_('JENABLED') : JText::_('JDISABLED');
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($siteinfo)
|
||||
{
|
||||
$query->select('COUNT(id) AS count_users')
|
||||
->from('#__users');
|
||||
$db->setQuery($query);
|
||||
$users = $db->loadResult();
|
||||
|
||||
$query->clear()
|
||||
->select('COUNT(id) AS count_items')
|
||||
->from('#__content')
|
||||
->where('state = 1');
|
||||
$db->setQuery($query);
|
||||
$items = $db->loadResult();
|
||||
|
||||
$query->clear()
|
||||
->select('COUNT(id) AS count_links ')
|
||||
->from('#__weblinks')
|
||||
->where('state = 1');
|
||||
$db->setQuery($query);
|
||||
$links = $db->loadResult();
|
||||
|
||||
if ($users)
|
||||
{
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_USERS');
|
||||
$rows[$i]->icon = 'users';
|
||||
$rows[$i]->data = $users;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($items)
|
||||
{
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_ARTICLES');
|
||||
$rows[$i]->icon = 'file';
|
||||
$rows[$i]->data = $items;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($links)
|
||||
{
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_WEBLINKS');
|
||||
$rows[$i]->icon = 'out-2';
|
||||
$rows[$i]->data = $links;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($counter)
|
||||
{
|
||||
$query->clear()
|
||||
->select('SUM(hits) AS count_hits')
|
||||
->from('#__content')
|
||||
->where('state = 1');
|
||||
$db->setQuery($query);
|
||||
$hits = $db->loadResult();
|
||||
|
||||
if ($hits)
|
||||
{
|
||||
$rows[$i] = new stdClass;
|
||||
$rows[$i]->title = JText::_('MOD_STATS_ARTICLES_VIEW_HITS');
|
||||
$rows[$i]->icon = 'eye';
|
||||
$rows[$i]->data = $hits + $increase;
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
}
|
1
administrator/modules/mod_stats_admin/index.html
Normal file
1
administrator/modules/mod_stats_admin/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,24 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
MOD_STATS_ADMIN="Statistics"
|
||||
MOD_STATS_ARTICLES="Articles"
|
||||
MOD_STATS_ARTICLES_VIEW_HITS="Articles View Hits"
|
||||
MOD_STATS_CACHING="Caching"
|
||||
MOD_STATS_FIELD_COUNTER_DESC="Display Hit Counter"
|
||||
MOD_STATS_FIELD_COUNTER_LABEL="Hit Counter"
|
||||
MOD_STATS_FIELD_INCREASECOUNTER_DESC="Enter the amount of hits to increase the counter by."
|
||||
MOD_STATS_FIELD_INCREASECOUNTER_LABEL="Increase Counter"
|
||||
MOD_STATS_FIELD_SERVERINFO_DESC="Display Server Information"
|
||||
MOD_STATS_FIELD_SERVERINFO_LABEL="Server Information"
|
||||
MOD_STATS_FIELD_SITEINFO_DESC="Display Site Information"
|
||||
MOD_STATS_FIELD_SITEINFO_LABEL="Site Information"
|
||||
MOD_STATS_GZIP="GZip"
|
||||
MOD_STATS_OS="OS"
|
||||
MOD_STATS_PHP="PHP"
|
||||
MOD_STATS_TIME="Time"
|
||||
MOD_STATS_USERS="Visitors"
|
||||
MOD_STATS_WEBLINKS="Web Links"
|
||||
MOD_STATS_XML_DESCRIPTION="The Statistics Module shows information about your server installation together with statistics on the Web site users, number of Articles in your database and the number of Web links you provide."
|
@ -0,0 +1,9 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
MOD_STATS_ADMIN="Statistics"
|
||||
MOD_STATS_XML_DESCRIPTION="The Statistics Module shows information about your server installation together with statistics on the Web site users, number of Articles in your database and the number of Web links you provide."
|
||||
MOD_STATS_LAYOUT_DEFAULT="Default"
|
||||
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
21
administrator/modules/mod_stats_admin/mod_stats_admin.php
Normal file
21
administrator/modules/mod_stats_admin/mod_stats_admin.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_stats
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the syndicate functions only once
|
||||
require_once __DIR__ . '/helper.php';
|
||||
|
||||
$serverinfo = $params->get('serverinfo');
|
||||
$siteinfo = $params->get('siteinfo');
|
||||
|
||||
$list = ModStatsHelper::getStats($params);
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_stats_admin', $params->get('layout', 'default'));
|
113
administrator/modules/mod_stats_admin/mod_stats_admin.xml
Normal file
113
administrator/modules/mod_stats_admin/mod_stats_admin.xml
Normal file
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator"
|
||||
method="upgrade">
|
||||
<name>mod_stats_admin</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>July 2004</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_STATS_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_stats_admin">mod_stats_admin.php</filename>
|
||||
<folder>tmpl</folder>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>mod_stats_admin.xml</filename>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_stats.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_stats.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_STATISTICS" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="serverinfo"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="MOD_STATS_FIELD_SERVERINFO_LABEL"
|
||||
description="MOD_STATS_FIELD_SERVERINFO_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="siteinfo"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="MOD_STATS_FIELD_SITEINFO_LABEL"
|
||||
description="MOD_STATS_FIELD_SITEINFO_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="counter"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="MOD_STATS_FIELD_COUNTER_LABEL"
|
||||
description="MOD_STATS_FIELD_COUNTER_DESC">
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="increase"
|
||||
type="text"
|
||||
default="0"
|
||||
label="MOD_STATS_FIELD_INCREASECOUNTER_LABEL"
|
||||
description="MOD_STATS_FIELD_INCREASECOUNTER_DESC" />
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
<field
|
||||
name="cache_time"
|
||||
type="text"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
|
||||
<field
|
||||
name="cachemode"
|
||||
type="hidden"
|
||||
default="static">
|
||||
<option
|
||||
value="static"></option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
16
administrator/modules/mod_stats_admin/tmpl/default.php
Normal file
16
administrator/modules/mod_stats_admin/tmpl/default.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_stats
|
||||
*
|
||||
* @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;
|
||||
?>
|
||||
<ul class="list-striped list-condensed stats-module<?php echo $moduleclass_sfx ?>">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li><i class="icon-<?php echo $item->icon;?>" title="<?php echo $item->title;?>"></i> <?php echo $item->title;?> <?php echo $item->data;?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
1
administrator/modules/mod_stats_admin/tmpl/index.html
Normal file
1
administrator/modules/mod_stats_admin/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_status/index.html
Normal file
1
administrator/modules/mod_status/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
65
administrator/modules/mod_status/mod_status.php
Normal file
65
administrator/modules/mod_status/mod_status.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_status
|
||||
*
|
||||
* @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;
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$user = JFactory::getUser();
|
||||
$db = JFactory::getDbo();
|
||||
$lang = JFactory::getLanguage();
|
||||
$input = JFactory::getApplication()->input;
|
||||
|
||||
// Get the number of unread messages in your inbox.
|
||||
$query = $db->getQuery(true)
|
||||
->select('COUNT(*)')
|
||||
->from('#__messages')
|
||||
->where('state = 0 AND user_id_to = ' . (int) $user->get('id'));
|
||||
|
||||
$db->setQuery($query);
|
||||
$unread = (int) $db->loadResult();
|
||||
|
||||
// Get the number of back-end logged in users.
|
||||
$query->clear()
|
||||
->select('COUNT(session_id)')
|
||||
->from('#__session')
|
||||
->where('guest = 0 AND client_id = 1');
|
||||
|
||||
$db->setQuery($query);
|
||||
$count = '<span class="badge">' . (int) $db->loadResult() . '</span>';
|
||||
|
||||
// Set the inbox link.
|
||||
if ($input->getBool('hidemainmenu'))
|
||||
{
|
||||
$inboxLink = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$inboxLink = JRoute::_('index.php?option=com_messages');
|
||||
}
|
||||
|
||||
// Set the inbox class.
|
||||
if ($unread)
|
||||
{
|
||||
$inboxClass = 'unread-messages';
|
||||
}
|
||||
else
|
||||
{
|
||||
$inboxClass = 'no-unread-messages';
|
||||
}
|
||||
|
||||
// Get the number of frontend logged in users.
|
||||
$query->clear()
|
||||
->select('COUNT(session_id)')
|
||||
->from('#__session')
|
||||
->where('guest = 0 AND client_id = 0');
|
||||
|
||||
$db->setQuery($query);
|
||||
$online_num = '<span class="badge">' . (int) $db->loadResult() . '</span>';
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_status', $params->get('layout', 'default'));
|
90
administrator/modules/mod_status/mod_status.xml
Normal file
90
administrator/modules/mod_status/mod_status.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_status</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>Feb 2006</creationDate>
|
||||
<copyright>(C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_STATUS_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_status">mod_status.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_status.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_status.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_STATUS" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field
|
||||
name="show_loggedin_users"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_LABEL"
|
||||
description="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="show_loggedin_users_admin"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_ADMIN_LABEL"
|
||||
description="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_ADMIN_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="show_messages"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="MOD_STATUS_FIELD_SHOW_MESSAGES_LABEL"
|
||||
description="MOD_STATUS_FIELD_SHOW_MESSAGES_DESC">
|
||||
<option
|
||||
value="0">JNO</option>
|
||||
<option
|
||||
value="1">JYES</option>
|
||||
</field>
|
||||
</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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
60
administrator/modules/mod_status/tmpl/default.php
Normal file
60
administrator/modules/mod_status/tmpl/default.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_status
|
||||
*
|
||||
* @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;
|
||||
|
||||
$hideLinks = $input->getBool('hidemainmenu');
|
||||
$task = $input->getCmd('task');
|
||||
$output = array();
|
||||
|
||||
// Print the Preview link to Main site.
|
||||
if ($params->get('show_viewsite', 1)) :
|
||||
$output[] = '<div class="btn-group viewsite"><a href="' . JUri::root() . '" target="_blank"><i class="icon-share-alt"></i> ' . JText::_('JGLOBAL_VIEW_SITE') . '</a></div><div class="btn-group divider">
|
||||
</div>';
|
||||
endif;
|
||||
|
||||
// Print the logged in users.
|
||||
if ($params->get('show_loggedin_users', 1)) :
|
||||
$output[] = '<div class="btn-group loggedin-users">' . JText::plural('MOD_STATUS_USERS', $online_num) . '</div><div class="btn-group divider">
|
||||
</div>';
|
||||
endif;
|
||||
|
||||
// Print the back-end logged in users.
|
||||
if ($params->get('show_loggedin_users_admin', 1)) :
|
||||
$output[] = '<div class="btn-group backloggedin-users">' . JText::plural('MOD_STATUS_BACKEND_USERS', $count) . '</div><div class="btn-group divider">
|
||||
</div>';
|
||||
endif;
|
||||
|
||||
// Print the inbox message.
|
||||
if ($params->get('show_messages', 1)) :
|
||||
$output[] = '<div class="btn-group ' . $inboxClass . '">' .
|
||||
($hideLinks ? '' : '<a href="' . $inboxLink . '">') .
|
||||
'<i class="icon-envelope"></i> ' .
|
||||
JText::plural('MOD_STATUS_MESSAGES', $unread) .
|
||||
($hideLinks ? '' : '</a>') .
|
||||
'<div class="btn-group divider"></div>' .
|
||||
'</div>';
|
||||
endif;
|
||||
|
||||
|
||||
// Print the logout link.
|
||||
if ($task == 'edit' || $task == 'editA' || $input->getInt('hidemainmenu'))
|
||||
{
|
||||
$logoutLink = '';
|
||||
} else {
|
||||
$logoutLink = JRoute::_('index.php?option=com_login&task=logout&' . JSession::getFormToken() . '=1');
|
||||
}
|
||||
if ($params->get('show_logout', 1)) :
|
||||
$output[] = '<div class="btn-group logout">' . ($hideLinks ? '' : '<a href="' . $logoutLink.'"><i class="icon-minus-2"></i> ') . JText::_('JLOGOUT') . ($hideLinks ? '' : '</a>') . '</div>';
|
||||
endif;
|
||||
|
||||
// Output the items.
|
||||
foreach ($output as $item) :
|
||||
echo $item;
|
||||
endforeach;
|
1
administrator/modules/mod_status/tmpl/index.html
Normal file
1
administrator/modules/mod_status/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_submenu/index.html
Normal file
1
administrator/modules/mod_submenu/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
24
administrator/modules/mod_submenu/mod_submenu.php
Normal file
24
administrator/modules/mod_submenu/mod_submenu.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_submenu
|
||||
*
|
||||
* @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;
|
||||
|
||||
$list = JSubMenuHelper::getEntries();
|
||||
$filters = JSubMenuHelper::getFilters();
|
||||
$action = JSubMenuHelper::getAction();
|
||||
|
||||
$displayMenu = count($list);
|
||||
$displayFilters = count($filters);
|
||||
|
||||
$hide = JFactory::getApplication()->input->getBool('hidemainmenu');
|
||||
|
||||
if ($displayMenu || $displayFilters)
|
||||
{
|
||||
require JModuleHelper::getLayoutPath('mod_submenu', $params->get('layout', 'default'));
|
||||
}
|
53
administrator/modules/mod_submenu/mod_submenu.xml
Normal file
53
administrator/modules/mod_submenu/mod_submenu.xml
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_submenu</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>Feb 2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_SUBMENU_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_submenu">mod_submenu.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_submenu.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_submenu.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_SUBMENU" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
60
administrator/modules/mod_submenu/tmpl/default.php
Normal file
60
administrator/modules/mod_submenu/tmpl/default.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_submenu
|
||||
*
|
||||
* @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;
|
||||
|
||||
?>
|
||||
<div id="sidebar">
|
||||
<div class="sidebar-nav">
|
||||
<?php if ($displayMenu) : ?>
|
||||
<ul id="submenu" class="nav nav-list">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<?php if (isset ($item[2]) && $item[2] == 1) :
|
||||
?><li class="active"><?php
|
||||
else :
|
||||
?><li><?php
|
||||
endif;
|
||||
?>
|
||||
<?php
|
||||
if ($hide) :
|
||||
?><a class="nolink"><?php echo $item[0]; ?></a><?php
|
||||
else :
|
||||
if (strlen($item[1])) :
|
||||
?><a href="<?php echo JFilterOutput::ampReplace($item[1]); ?>"><?php echo $item[0]; ?></a><?php
|
||||
else :
|
||||
?><?php echo $item[0]; ?><?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php if ($displayMenu && $displayFilters) : ?>
|
||||
<hr />
|
||||
<?php endif; ?>
|
||||
<?php if ($displayFilters) : ?>
|
||||
<div class="filter-select hidden-phone">
|
||||
<h4 class="page-header"><?php echo JText::_('JSEARCH_FILTER_LABEL');?></h4>
|
||||
<form action="<?php echo JRoute::_($action);?>" method="post">
|
||||
<?php foreach ($filters as $filter) : ?>
|
||||
<label for="<?php echo $filter['name']; ?>" class="element-invisible"><?php echo $filter['label']; ?></label>
|
||||
<select name="<?php echo $filter['name']; ?>" id="<?php echo $filter['name']; ?>" class="span12 small" onchange="this.form.submit()">
|
||||
<?php if (!$filter['noDefault']) : ?>
|
||||
<option value=""><?php echo $filter['label']; ?></option>
|
||||
<?php endif; ?>
|
||||
<?php echo $filter['options']; ?>
|
||||
</select>
|
||||
<hr class="hr-condensed" />
|
||||
<?php endforeach; ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
1
administrator/modules/mod_submenu/tmpl/index.html
Normal file
1
administrator/modules/mod_submenu/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_title/index.html
Normal file
1
administrator/modules/mod_title/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
18
administrator/modules/mod_title/mod_title.php
Normal file
18
administrator/modules/mod_title/mod_title.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_title
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Get the component title div
|
||||
if (isset(JFactory::getApplication()->JComponentTitle))
|
||||
{
|
||||
$title = JFactory::getApplication()->JComponentTitle;
|
||||
}
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_title', $params->get('layout', 'default'));
|
52
administrator/modules/mod_title/mod_title.xml
Normal file
52
administrator/modules/mod_title/mod_title.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_title</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>Nov 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_TITLE_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_title">mod_title.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_title.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_title.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_TITLE" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
14
administrator/modules/mod_title/tmpl/default.php
Normal file
14
administrator/modules/mod_title/tmpl/default.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_title
|
||||
*
|
||||
* @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($title)) : ?>
|
||||
<?php echo $title; ?>
|
||||
<?php endif; ?>
|
1
administrator/modules/mod_title/tmpl/index.html
Normal file
1
administrator/modules/mod_title/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/modules/mod_toolbar/index.html
Normal file
1
administrator/modules/mod_toolbar/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
14
administrator/modules/mod_toolbar/mod_toolbar.php
Normal file
14
administrator/modules/mod_toolbar/mod_toolbar.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_toolbar
|
||||
*
|
||||
* @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;
|
||||
|
||||
$toolbar = JToolbar::getInstance('toolbar')->render('toolbar');
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_toolbar', $params->get('layout', 'default'));
|
52
administrator/modules/mod_toolbar/mod_toolbar.xml
Normal file
52
administrator/modules/mod_toolbar/mod_toolbar.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.1"
|
||||
client="administrator">
|
||||
<name>mod_toolbar</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>Nov 2005</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2013 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.0.0</version>
|
||||
<description>MOD_TOOLBAR_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_toolbar">mod_toolbar.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.mod_toolbar.ini</language>
|
||||
<language tag="en-GB">en-GB.mod_toolbar.sys.ini</language>
|
||||
</languages>
|
||||
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_TOOLBAR" />
|
||||
<config>
|
||||
<fields name="params">
|
||||
<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" rows="3"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
13
administrator/modules/mod_toolbar/tmpl/default.php
Normal file
13
administrator/modules/mod_toolbar/tmpl/default.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_toolbar
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Echo the toolbar.
|
||||
echo $toolbar;
|
1
administrator/modules/mod_toolbar/tmpl/index.html
Normal file
1
administrator/modules/mod_toolbar/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user