tutto cho che serve attachments
This commit is contained in:
87
plugins/quickicon/attachments/attachments.php
Normal file
87
plugins/quickicon/attachments/attachments.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* Attachments quickicon plugin
|
||||
*
|
||||
* @package Attachments
|
||||
* @subpackage Attachments.Quickicon_Plugin
|
||||
*
|
||||
* @copyright Copyright (C) 2013-2018 Jonathan M. Cameron, All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
* @link http://joomlacode.org/gf/project/attachments/frs/
|
||||
* @author Jonathan M. Cameron
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die('Restricted access');
|
||||
|
||||
jimport('joomla.plugin.plugin');
|
||||
|
||||
|
||||
/**
|
||||
* Attachments quickcion plugin class
|
||||
*
|
||||
* @package Attachments
|
||||
* @subpackage Attachments.Quickicon_Plugin
|
||||
*/
|
||||
class PlgQuickiconAttachments extends JPlugin
|
||||
{
|
||||
/*
|
||||
* Constructor.
|
||||
*
|
||||
* @access protected
|
||||
* @param object $subject The object to observe
|
||||
* @param array $config An array that holds the plugin configuration
|
||||
*/
|
||||
public function __construct(& $subject, $config)
|
||||
{
|
||||
parent::__construct($subject, $config);
|
||||
$this->loadLanguage();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
// See if we should show the icon
|
||||
if ($context != $this->params->get('context', 'mod_quickicon') ||
|
||||
!JFactory::getUser()->authorise('core.manage', 'com_attachments'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the CSS file
|
||||
JHtml::stylesheet('com_attachments/attachments_quickicon.css', array(), true);
|
||||
|
||||
if (version_compare(JVERSION, '3.0', 'ge'))
|
||||
{
|
||||
$image = 'flag-2';
|
||||
$icon = JUri::root() . '/media/com_attachments/images/attachments_logo48.png';
|
||||
}
|
||||
else
|
||||
{
|
||||
$image = JUri::root() . '/media/com_attachments/images/attachments_logo48.png';
|
||||
$icon = '';
|
||||
}
|
||||
|
||||
// Return the icon info for the quickicon system
|
||||
return
|
||||
array(
|
||||
array(
|
||||
'link' => 'index.php?option=com_attachments',
|
||||
'image' => $image,
|
||||
'icon' => $icon,
|
||||
'text' => JText::_('PLG_QUICKICON_ATTACHMENTS_ICON'),
|
||||
'id' => 'plg_quickicon_attachment'));
|
||||
}
|
||||
}
|
||||
29
plugins/quickicon/attachments/attachments.xml
Normal file
29
plugins/quickicon/attachments/attachments.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" group="quickicon" version="2.5" method="upgrade">
|
||||
<name>plg_quickicon_attachments</name>
|
||||
<version>3.2.6</version>
|
||||
<creationDate>March 26, 2018</creationDate>
|
||||
<author>Jonathan M. Cameron</author>
|
||||
<copyright>(C) 2007-2018 Jonathan M. Cameron. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
|
||||
<authorEmail>jmcameron@jmcameron.net</authorEmail>
|
||||
<authorUrl>http://joomlacode.org/gf/project/attachments/</authorUrl>
|
||||
<description>PLG_QUICKICON_ATTACHMENTS_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="attachments">attachments.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>language</folder>
|
||||
</files>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="context"
|
||||
type="text"
|
||||
default="mod_quickicon"
|
||||
description="PLG_QUICKICON_ATTACHMENTS_GROUP_DESC"
|
||||
label="PLG_QUICKICON_ATTACHMENTS_GROUP_LABEL"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
1
plugins/quickicon/attachments/index.html
Normal file
1
plugins/quickicon/attachments/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,13 @@
|
||||
; en-GB.plg_quickicon_attachments.ini
|
||||
; Attachments for Joomla! extension
|
||||
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
|
||||
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
; English translation
|
||||
|
||||
PLG_QUICKICON_ATTACHMENTS="Quick Icon - Attachments"
|
||||
PLG_QUICKICON_ATTACHMENTS_GROUP_DESC="The group of this plugin (this value is compared with the group value used in <b>Quick Icons</b> modules to inject icons)"
|
||||
PLG_QUICKICON_ATTACHMENTS_GROUP_LABEL="Group"
|
||||
PLG_QUICKICON_ATTACHMENTS_ICON="Attachments Manager"
|
||||
PLG_QUICKICON_ATTACHMENTS_XML_DESCRIPTION="Manage the attachments for articles, categories, and other content types."
|
||||
@ -0,0 +1,10 @@
|
||||
; en-GB.plg_quickicon_attachments.sys.ini
|
||||
; Attachments for Joomla! extension
|
||||
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
|
||||
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
; English translation
|
||||
|
||||
PLG_QUICKICON_ATTACHMENTS="Quick Icon - Attachments"
|
||||
PLG_QUICKICON_ATTACHMENTS_XML_DESCRIPTION="Manage the attachments for articles, categories, and other content types."
|
||||
1
plugins/quickicon/attachments/language/en-GB/index.html
Normal file
1
plugins/quickicon/attachments/language/en-GB/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/quickicon/attachments/language/index.html
Normal file
1
plugins/quickicon/attachments/language/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/quickicon/attachments/language/it-IT/index.html
Normal file
1
plugins/quickicon/attachments/language/it-IT/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,13 @@
|
||||
; it-IT.plg_quickicon_attachments.ini
|
||||
; Attachments for Joomla! extension
|
||||
; Copyright (C) 2007-2013 Jonathan M. Cameron, All rights reserved.
|
||||
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
; Italian translation by: Piero Mattirolo (2.0-3.1), Lemminkainen (version 1.3.4)
|
||||
|
||||
PLG_QUICKICON_ATTACHMENTS="Icona rapida - Allegati"
|
||||
PLG_QUICKICON_ATTACHMENTS_GROUP_DESC="Il gruppo di questo plugin (questo valore è confrontato con il valore del gruppo utilizzato nei moduli <b>Icone rapide</b> per inserire icone"
|
||||
PLG_QUICKICON_ATTACHMENTS_GROUP_LABEL="Gruppo"
|
||||
PLG_QUICKICON_ATTACHMENTS_ICON="Gestione Allegati"
|
||||
PLG_QUICKICON_ATTACHMENTS_XML_DESCRIPTION="Gestisce allegati per articoli, categorie e altri tipi di contenuti"
|
||||
@ -0,0 +1,10 @@
|
||||
; it-IT.plg_quickicon_attachments.sys.ini
|
||||
; Attachments for Joomla! extension
|
||||
; Copyright (C) 2007-2013 Jonathan M. Cameron, All rights reserved.
|
||||
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
; Italian translation by: Piero Mattirolo (2.0-3.1), Lemminkainen (version 1.3.4)
|
||||
|
||||
PLG_QUICKICON_ATTACHMENTS="Icona rapida - Allegati"
|
||||
PLG_QUICKICON_ATTACHMENTS_XML_DESCRIPTION="Gestisce allegati per articoli, categorie e altri tipi di contenuti"
|
||||
Reference in New Issue
Block a user