Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanramosnet committed Apr 30, 2013
1 parent 1e93569 commit 042ada3
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.buildpath
.project
.settings
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
11 changes: 11 additions & 0 deletions language/es-ES/es-ES.plg_quickicon_myicons.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; $Id: es-ES.plg_quickicon_myicons.ini $
; Joomla! Project
; Copyright (C) 2013 Iván Ramos Jiménez. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note: All the ini files need to be saved as UTF-8 - NO BOM!

PLG_QUICKICON_MYICONS="Enlaces rápidos - MyIcons"
PLG_QUICKICON_MYICONS_GROUP_DESC="El grupo de este plugin (este valor se compara con el usado como valor del grupo en los módulos del tipo <strong>Enlaces rápidos<strong> para inyectar iconos)"
PLG_QUICKICON_MYICONS_ADD_USER="Añadir nuevo usuario"
PLG_QUICKICON_MYICONS_GROUP_LABEL="Grupo"
PLG_QUICKICON_MYICONS_XML_DESCRIPTION="Enlaces de acceso rápido MyIcons"
9 changes: 9 additions & 0 deletions language/es-ES/es-ES.plg_quickicon_myicons.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
; $Id: es-ES.plg_quickicon_myicons.sys.ini $
; Joomla! Project
; Copyright (C) 2013 Iván Ramos Jiménez. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note: All the ini files need to be saved as UTF-8 - NO BOM!

PLG_QUICKICON_MYICONS="Enlaces rápidos - MyIcons"
PLG_QUICKICON_MYICONS_XML_DESCRIPTION="Enlaces de acceso rápido MyIcons"

1 change: 1 addition & 0 deletions language/es-ES/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
1 change: 1 addition & 0 deletions language/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
57 changes: 57 additions & 0 deletions myicons.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* @package Joomla.Plugin
* @subpackage Quickicon.MyIcons
*
* @copyright Copyright (C) 2013 Iván Ramos Jiménez, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/**
* MyIcons plugin
*
* @package Joomla.Plugin
* @subpackage Quickicon.MyIcons
* @since 1.0
*/
class PlgQuickiconMyicons extends JPlugin
{
/**
* Load the language file on instantiation.
*
* @var boolean
* @since 3.1
*/
protected $autoloadLanguage = true;

/**
* This method is called when the Quick Icons module is constructing its set
* of icons. You can return an array which defines a single icon and it will
* be rendered right after the stock Quick Icons.
*
* @param $context The calling context
*
* @return array A list of icon definition associative arrays, consisting of the
* keys link, image, text and access.
*
* @since 2.5
*/
public function onGetIcons($context)
{
if ($context != $this->params->get('context', 'mod_quickicon'))
{
return;
}

return array(
array(
'link' => 'index.php?option=com_users&task=user.add',
'image' => 'user',
'text' => JText::_('PLG_QUICKICON_MYICONS_ADD_USER'),
'access' => array('core.manage', 'com_users', 'core.create', 'com_users', )
)
);
}
}
32 changes: 32 additions & 0 deletions myicons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="quickicon">
<name>plg_quickicon_myicons</name>
<author>Iván Ramos Jiménez</author>
<creationDate>30 April 2013</creationDate>
<copyright>Copyright (C) 2013 Iván Ramos Jiménez. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>ivan.ramos.name</authorUrl>
<version>1.0.0</version>
<description>PLG_QUICKICON_MYICONS_XML_DESCRIPTION</description>
<files>
<filename plugin="myicons">myicons.php</filename>
<filename>index.html</filename>
</files>
<languages>
<language tag="es-ES">language/es-ES/es-ES.plg_quickicon_myicons.ini</language>
<language tag="es-ES">language/es-ES/es-ES.plg_quickicon_myicons.sys.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="basic">
<field name="context"
type="text"
default="mod_quickicon"
description="PLG_QUICKICON_MYICONS_GROUP_DESC"
label="PLG_QUICKICON_MYICONS_GROUP_LABEL"
/>
</fieldset>
</fields>
</config>
</extension>

0 comments on commit 042ada3

Please sign in to comment.