From 55df862be0f06d501dc581fbcb48167f37660170 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Wed, 20 Nov 2024 08:08:26 +0100 Subject: [PATCH 01/13] add new buttion for {attachments id=xxx } --- .../admin/src/Model/AttachmentsModel.php | 7 +- .../admin/src/View/Attachments/HtmlView.php | 26 +++- .../admin/tmpl/attachments/default.php | 17 ++- .../admin/tmpl/attachments/default_body.php | 14 +- .../admin/tmpl/attachments/default_head.php | 2 + .../site/src/Model/AttachmentsModel.php | 18 ++- .../insert_attachments_id_token.xml | 23 +++ ...ditors-xtd_insert_attachments_id_token.ini | 17 +++ ...rs-xtd_insert_attachments_id_token.sys.ini | 16 ++ ...ditors-xtd_insert_attachments_id_token.ini | 17 +++ ...rs-xtd_insert_attachments_id_token.sys.ini | 16 ++ .../services/provider.php | 39 +++++ .../Extension/InsertAttachmentsIdToken.php | 137 ++++++++++++++++++ 13 files changed, 337 insertions(+), 12 deletions(-) create mode 100644 insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml create mode 100644 insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini create mode 100644 insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini create mode 100644 insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini create mode 100644 insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini create mode 100644 insert_attachments_id_token_btn_plugin/services/provider.php create mode 100644 insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php diff --git a/attachments_component/admin/src/Model/AttachmentsModel.php b/attachments_component/admin/src/Model/AttachmentsModel.php index 5e36f815..222ddc45 100644 --- a/attachments_component/admin/src/Model/AttachmentsModel.php +++ b/attachments_component/admin/src/Model/AttachmentsModel.php @@ -45,6 +45,7 @@ public function __construct($config = array()) if (empty($config['filter_fields'])) { $config['filter_fields'] = array( 'id', + 'parent_id', 'a.state', 'a.access', 'a.filename', @@ -80,7 +81,11 @@ protected function getListQuery() /** @var \Joomla\Database\DatabaseDriver $db */ $db = Factory::getContainer()->get('DatabaseDriver'); $query = $db->getQuery(true); - + $id = $this->getState('filter.parent_id'); + if (is_numeric($id)) + { + $query->where('a.parent_id = ' . (int) $id); + } $query->select('a.*, a.id as id'); $query->from('#__attachments as a'); diff --git a/attachments_component/admin/src/View/Attachments/HtmlView.php b/attachments_component/admin/src/View/Attachments/HtmlView.php index 6378fd13..c5ecac97 100644 --- a/attachments_component/admin/src/View/Attachments/HtmlView.php +++ b/attachments_component/admin/src/View/Attachments/HtmlView.php @@ -16,6 +16,7 @@ use JMCameron\Component\Attachments\Administrator\Helper\AttachmentsPermissions; use JMCameron\Component\Attachments\Site\Helper\AttachmentsDefines; use JMCameron\Plugin\AttachmentsPluginFramework\AttachmentsPluginManager; +use JMCameron\Component\Attachments\Administrator\Model\AttachmentsModel; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; @@ -52,10 +53,18 @@ public function display($tpl = null) return; } + $app = Factory::getApplication(); + $jinput = $app->getInput(); + $this->editor = $jinput->getString('editor', null); + $id = $jinput->getInt('parent_id', null); + if ($id) { + $model = $this->getModel(); + $model->setState('filter.parent_id', $id); + } $this->items = $this->get('Items'); $this->state = $this->get('State'); $this->pagination = $this->get('Pagination'); - + // Check for errors. if (count($errors = $this->get('Errors'))) { throw new \Exception(implode("\n", $errors) . ' (ERR 175)', 500); @@ -166,9 +175,22 @@ public function display($tpl = null) } // Set the toolbar - $this->addToolBar(); + if ( !$this->editor ) { + $this->addToolBar(); + } // Display the attachments + if ( $this->editor ) { + $document = Factory::getDocument(); + HTMLHelper::_('jquery.framework'); + $document->addScriptDeclaration('function insertAttachmentsIdToken($, editorName) { + let editor = parent.Joomla.editors.instances[editorName]; + var adminform = document.getElementById("adminForm"); + var Data = new FormData(adminform); + editor.replaceSelection("{attachmentsid id=" + Data.getAll("cid[]") +"}"); + $(".btn-close", parent.document).click(); + }'); + } parent::display($tpl); } diff --git a/attachments_component/admin/tmpl/attachments/default.php b/attachments_component/admin/tmpl/attachments/default.php index b6b1a0c7..578fd55d 100644 --- a/attachments_component/admin/tmpl/attachments/default.php +++ b/attachments_component/admin/tmpl/attachments/default.php @@ -14,8 +14,10 @@ use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; + // No direct access defined('_JEXEC') or die('Restricted access'); @@ -31,7 +33,14 @@ ?>
-loadTemplate('filter');?> +editor ) : ?> + + +editor ) { + echo $this->loadTemplate('filter'); + } +?> loadTemplate('head');?>loadTemplate('body');?> @@ -44,5 +53,11 @@ + + diff --git a/attachments_component/admin/tmpl/attachments/default_body.php b/attachments_component/admin/tmpl/attachments/default_body.php index 5cb41387..9ca540a7 100644 --- a/attachments_component/admin/tmpl/attachments/default_body.php +++ b/attachments_component/admin/tmpl/attachments/default_body.php @@ -115,10 +115,14 @@ ?> "> + editor ) : ?> + + editor ) : ?> +
- editor ) : ?> + + + uri_type == 'url') && $superimpose_link_icons ) { if ( $item->url_valid ) { echo HTMLHelper::image('com_attachments/file_icons/link_arrow.png', '', 'class="link_overlay"', true); @@ -127,7 +131,11 @@ echo HTMLHelper::image('com_attachments/file_icons/link_broken.png', '', 'class="link_overlay"', true); } } - ?>  + editor ) : ?> + + +  uri_type == 'file' ) { echo $item->filename; diff --git a/attachments_component/admin/tmpl/attachments/default_head.php b/attachments_component/admin/tmpl/attachments/default_head.php index d27ef2b4..aa6f242b 100644 --- a/attachments_component/admin/tmpl/attachments/default_head.php +++ b/attachments_component/admin/tmpl/attachments/default_head.php @@ -30,8 +30,10 @@ _list != null ) { @@ -349,6 +349,10 @@ public function &getAttachmentsList() $parent_id = $this->getParentId(); $parent_type = $this->getParentType(); $parent_entity = $this->getParentEntity(); + + if ($attachmentid) { + $parent_id = '%'; + } // Use parent entity corresponding to values saved in the attachments table $parent = $this->getParentClass(); @@ -387,7 +391,9 @@ public function &getAttachmentsList() $query = $db->getQuery(true); $query->select('a.*, u.name as creator_name')->from('#__attachments AS a'); $query->leftJoin('#__users AS u ON u.id = a.created_by'); - + if ($attachmentid != null) { + $query->where('a.id in (' . $attachmentid . ')' ); + } if ( $parent_id == 0 ) { // If the parent ID is zero, the parent is being created so we have // do the query differently @@ -395,7 +401,9 @@ public function &getAttachmentsList() $query->where('a.parent_id IS NULL AND u.id=' . (int)$user_id); } else { - $query->where('a.parent_id='.(int)$parent_id); + if ($parent_id != '%') { + $query->where('a.parent_id LIKE "'.(int)$parent_id . '"'); + } // Handle the state part of the query if ( $user->authorise('core.edit.state', 'com_attachments') ) { @@ -497,7 +505,7 @@ public function numAttachments() * * @return true if there are attachments and some should be visible */ - public function someVisible() + public function someVisible($attachmentid=null) { // See if the attachments list has been loaded if ( $this->_list == null ) { @@ -508,7 +516,7 @@ public function someVisible() } // Since the attachments have not been loaded, load them now - $this->getAttachmentsList(); + $this->getAttachmentsList($attachmentid); } return $this->_some_visible; diff --git a/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml new file mode 100644 index 00000000..16cd1cb1 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml @@ -0,0 +1,23 @@ + + + plg_editors-xtd_insert_attachments_id_token_btn + 4.0.4 + November 9, 2024 + Jonathan M. Cameron + (C) 2007-2024 Jonathan M. Cameron. All rights reserved. + http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL + jmcameron@jmcameron.net + https://github.com/jmcameron/attachments/ + ATTACH_INSERT_ATTACHMENTSID_TOKEN_BUTTON_PLUGIN_DESCRIPTION + JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken + + src + services + + + language/en-GB/en-GB.plg_editors-xtd_insert_attachmentsid_token.ini + language/en-GB/en-GB.plg_editors-xtd_insert_attachmentsid_token.sys.ini + language/fr-FR/fr-FR.plg_editors-xtd_insert_attachmentsid_token.ini + language/fr-FR/fr-FR.plg_editors-xtd_insert_attachmentsid_token.sys.ini + + diff --git a/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini new file mode 100644 index 00000000..a8bb870f --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini @@ -0,0 +1,17 @@ +; en-GB.plg_editors-xtd_add_attachment.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 + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +INSERT_ATTACHMENTS_ID_TOKEN="Insert {attachments id=xxx} token" +INSERT_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Place the cursor in the location where you want the attachments list to display (in the front end) and then click on this button. This inserts the {attachments} token that the 'Custom Placement' option uses. Some HTML is also added to hide the token when attachments lists are not shown." +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments id=xxx} custom placement token while editing articles or categories." diff --git a/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini new file mode 100644 index 00000000..9e1b0389 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini @@ -0,0 +1,16 @@ +; en-GB.plg_editors-xtd_add_attachment.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 + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +ATTACH_INSERT_ATTACHMENTSID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments} custom placement token while editing articles or categories." +PLG_EDITORS-XTD_INSERT_ATTACHMENTSID_TOKEN_BTN="Editor Button - Insert Attachments Token" diff --git a/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini b/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini new file mode 100644 index 00000000..d418853a --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini @@ -0,0 +1,17 @@ +; fr-FR.plg_editors-xtd_add_attachment.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 + +; French translation by: Marc-André Ladouceur (2.0), Pascal Adalian and Sylvain Faivre + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +ATTACH_ATTACHMENTS_ID_TOKEN="Inserer le symbole {attachments id=xxx}" +ATTACH_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Placer le curseur à l'endroit où vous voulez la liste des pièces jointes à afficher (dans le front-end) et ensuite cliquez sur ce bouton. Ceci insert le symbole {attachments} qui utilise l'option 'Emplacement personnalisé'. Un peu de HTML est aussi ajouté pour cacher le symbole quand les listes de pièces jointes ne sont pas affichées." +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Ajoute un bouton qui vous permet d'insérer un symbole d'emplacement personnalisé {attachments id=xxx} pendant la modification." diff --git a/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini b/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini new file mode 100644 index 00000000..898c1cd9 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini @@ -0,0 +1,16 @@ +; fr-FR.plg_editors-xtd_add_attachment.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 + +; French translation by: Marc-André Ladouceur (2.0), Pascal Adalian and Sylvain Faivre + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Ajoute un bouton qui vous permet d'insérer un symbole d'emplacement personnalisé {attachments id=xxx} pendant la modification." +PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Bouton Editer - Insére un symbole Pièces jointes (id)" diff --git a/insert_attachments_id_token_btn_plugin/services/provider.php b/insert_attachments_id_token_btn_plugin/services/provider.php new file mode 100644 index 00000000..79771f85 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/services/provider.php @@ -0,0 +1,39 @@ +set( + PluginInterface::class, + function (Container $container) { + $dispatcher = $container->get(DispatcherInterface::class); + $plugin = new InsertAttachmentsIdToken( + $dispatcher, + (array) PluginHelper::getPlugin('editors-xtd', 'insert_attachments_id_token') + ); + $plugin->setApplication(Factory::getApplication()); + + return $plugin; + } + ); + } +}; diff --git a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php new file mode 100644 index 00000000..05b4e2b5 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php @@ -0,0 +1,137 @@ + 'onEditorButtonsSetup']; + } + + + + public function onEditorButtonsSetup(EditorButtonsSetupEvent $event) + { + $subject = $event->getButtonsRegistry(); + $disabled = $event->getDisabledButtons(); + + if (\in_array($this->_name, $disabled)) { + return; + } + + $this->loadLanguage(); + $app = Factory::getApplication(); + $jinput = $app->getInput(); + $this->editor = $jinput->getString('editor', null); + $this->id = $jinput->getInt('id', null); + $button = $this->onDisplay($event->getEditorId(), $jinput->getInt('id', null)); + + if ($button && $this->_name) { + $subject->add(new Button($this->_name, $button->getProperties())); + } + } + + /** + * Add Attachment button + * + * @param string $name The name of the editor form + * @param int $asset The asset ID for the entity being edited + * @param int $author The ID of the author of the entity + * + * @return CMSObject button + */ + public function onDisplay($name, $id) + { + // Add the regular css file + HTMLHelper::stylesheet('media/com_attachments/css/attachments_list.css'); + HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_dark.css'); + HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button.css'); + + // Handle RTL styling (if necessary) + $lang = $this->app->getLanguage(); + // Get ready for language things + $lang = $this->app->getLanguage(); + if ( !$lang->load('plg_editors-xtd_insert_attachments_id_token', dirname(__FILE__)) ) { + // If the desired translation is not available, at least load the English + $lang->load('plg_editors-xtd_insert_attachments_id_token', JPATH_ADMINISTRATOR, 'en-GB'); + } + if ( $lang->isRTL() ) { + HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_rtl.css'); + HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button_rtl.css'); + } + + // Load the language file from the frontend + $lang->load('com_attachments', JPATH_ADMINISTRATOR.'/components/com_attachments'); + + $link = "/index.php?option=com_attachments&tmpl=component&parent_id=" . $id; + $link .= '&editor=' . $name . '&XDEBUG_SESSION_START=test'; + $button = new CMSObject(); + + // Finalize the [Add Attachment] button info + $button->modal = true; + $button->class = 'btn'; + $button->text = Text::_('ATTACH_ATTACHMENTS_ID_TOKEN'); + $button->name = 'paperclipid'; + $button->link = $link; + $button->icon = 'attachment'; + $button->iconSVG = ''; + $button->options = "{handler: 'iframe', size: {x: 920, y: 530}}"; + + return $button; + } +} From 43e56eb8ac21d122016fb34dc3998791c8ff41c6 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 14:29:22 +0200 Subject: [PATCH 02/13] Fix translation messages --- .../insert_attachments_id_token.xml | 8 ++++---- .../src/Extension/InsertAttachmentsIdToken.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml index 16cd1cb1..0386632f 100644 --- a/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml +++ b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml @@ -15,9 +15,9 @@ services - language/en-GB/en-GB.plg_editors-xtd_insert_attachmentsid_token.ini - language/en-GB/en-GB.plg_editors-xtd_insert_attachmentsid_token.sys.ini - language/fr-FR/fr-FR.plg_editors-xtd_insert_attachmentsid_token.ini - language/fr-FR/fr-FR.plg_editors-xtd_insert_attachmentsid_token.sys.ini + language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini + language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini + language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini + language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini diff --git a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php index 05b4e2b5..4342ebc3 100644 --- a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php +++ b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php @@ -125,7 +125,7 @@ public function onDisplay($name, $id) // Finalize the [Add Attachment] button info $button->modal = true; $button->class = 'btn'; - $button->text = Text::_('ATTACH_ATTACHMENTS_ID_TOKEN'); + $button->text = Text::_('INSERT_ATTACHMENTS_ID_TOKEN'); $button->name = 'paperclipid'; $button->link = $link; $button->icon = 'attachment'; From 171ea0ca1c964eaf55c37c9639a5ad55848186b4 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 14:30:17 +0200 Subject: [PATCH 03/13] Remove XDEBUG_SESSION_START --- .../src/Extension/InsertAttachmentsIdToken.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php index 4342ebc3..38237285 100644 --- a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php +++ b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php @@ -119,7 +119,7 @@ public function onDisplay($name, $id) $lang->load('com_attachments', JPATH_ADMINISTRATOR.'/components/com_attachments'); $link = "/index.php?option=com_attachments&tmpl=component&parent_id=" . $id; - $link .= '&editor=' . $name . '&XDEBUG_SESSION_START=test'; + $link .= '&editor=' . $name; $button = new CMSObject(); // Finalize the [Add Attachment] button info From 38b84a01e100c38f366a65d22d1a16dae0de8457 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 14:32:36 +0200 Subject: [PATCH 04/13] Fix token name --- attachments_component/admin/src/View/Attachments/HtmlView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments_component/admin/src/View/Attachments/HtmlView.php b/attachments_component/admin/src/View/Attachments/HtmlView.php index c5ecac97..96c5f6bf 100644 --- a/attachments_component/admin/src/View/Attachments/HtmlView.php +++ b/attachments_component/admin/src/View/Attachments/HtmlView.php @@ -187,7 +187,7 @@ public function display($tpl = null) let editor = parent.Joomla.editors.instances[editorName]; var adminform = document.getElementById("adminForm"); var Data = new FormData(adminform); - editor.replaceSelection("{attachmentsid id=" + Data.getAll("cid[]") +"}"); + editor.replaceSelection("{attachments id=" + Data.getAll("cid[]") +"}"); $(".btn-close", parent.document).click(); }'); } From ef85c0091d4b64ac8a6ffe4717a0c476889007ea Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 14:33:05 +0200 Subject: [PATCH 05/13] Remove unnecessary code --- .../site/src/Model/AttachmentsModel.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/attachments_component/site/src/Model/AttachmentsModel.php b/attachments_component/site/src/Model/AttachmentsModel.php index 6a1a8fc2..18655a8e 100644 --- a/attachments_component/site/src/Model/AttachmentsModel.php +++ b/attachments_component/site/src/Model/AttachmentsModel.php @@ -350,10 +350,6 @@ public function &getAttachmentsList($attachmentid=null) $parent_type = $this->getParentType(); $parent_entity = $this->getParentEntity(); - if ($attachmentid) { - $parent_id = '%'; - } - // Use parent entity corresponding to values saved in the attachments table $parent = $this->getParentClass(); @@ -401,10 +397,8 @@ public function &getAttachmentsList($attachmentid=null) $query->where('a.parent_id IS NULL AND u.id=' . (int)$user_id); } else { - if ($parent_id != '%') { - $query->where('a.parent_id LIKE "'.(int)$parent_id . '"'); - } - + $query->where('a.parent_id='.(int)$parent_id); + // Handle the state part of the query if ( $user->authorise('core.edit.state', 'com_attachments') ) { // Do not filter on state since this user can change the state of any attachment From 56afe459f7262889039a66c92ccf9fbd18482387 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 14:34:27 +0200 Subject: [PATCH 06/13] Remove test code --- attachments_component/admin/tmpl/attachments/default.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/attachments_component/admin/tmpl/attachments/default.php b/attachments_component/admin/tmpl/attachments/default.php index 578fd55d..e0e5214a 100644 --- a/attachments_component/admin/tmpl/attachments/default.php +++ b/attachments_component/admin/tmpl/attachments/default.php @@ -55,9 +55,5 @@ - + From 65f6b47724954fb94c354d806266377c4365f37e Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 15:27:08 +0200 Subject: [PATCH 07/13] Add a description of the list and a more descriptive text for the button when showing the add attachment ids dialog --- .../admin/language/el-GR/el-GR.com_attachments.ini | 2 ++ .../admin/language/en-GB/en-GB.com_attachments.ini | 2 ++ attachments_component/admin/tmpl/attachments/default.php | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/attachments_component/admin/language/el-GR/el-GR.com_attachments.ini b/attachments_component/admin/language/el-GR/el-GR.com_attachments.ini index 018917c7..1145058e 100644 --- a/attachments_component/admin/language/el-GR/el-GR.com_attachments.ini +++ b/attachments_component/admin/language/el-GR/el-GR.com_attachments.ini @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Προσπέλασε/κάνε λήψη αυ ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Προστέθηκαν δεδομένα για %d συνημμένα!" ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Προστέθηκαν ονόματα αρχείων εικονιδίων σε %d συνημμένα." ATTACH_ADD_ATTACHMENT="Προσθήκη συνημμένου" +ATTACH_ADD_ATTACHMENT_IDS="Προσθήκη επιλεγμένων συνημμένων" +ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="Αυτή είναι μια λίστα των συνημμένων που έχουν ήδη προστεθεί στο άρθρο/κατηγορία. Επιλέξτε αυτό(ά) που θέλετε να προσθέσετε χρησιμοποιώντας την ένδειξη και πατήστε το κουμπί 'Προσθήκη επιλεγμένων συνημμένων'." ATTACH_ADD_ATTACHMENT_TITLE="Πρόσθεσε συνημμένο σε αυτό το άρθρο ή αντικείμενο περιεχομένου" ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Πρόσθεσε το συνημμένο σε %s (αντί για %s)" ATTACH_ADD_URL="Προσθήκη URL" diff --git a/attachments_component/admin/language/en-GB/en-GB.com_attachments.ini b/attachments_component/admin/language/en-GB/en-GB.com_attachments.ini index 605171e8..0a848d30 100644 --- a/attachments_component/admin/language/en-GB/en-GB.com_attachments.ini +++ b/attachments_component/admin/language/en-GB/en-GB.com_attachments.ini @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Access/download this attachment" ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Added data for %d attachments!" ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Added icon filenames to %d attachment(s)." ATTACH_ADD_ATTACHMENT="Add attachment" +ATTACH_ADD_ATTACHMENT_IDS="Add selected attachments" +ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="This is a list of attachments already added the the article/category. Select which one(s) you want to insert using the token and press the 'Add selected attachments' button." ATTACH_ADD_ATTACHMENT_TITLE="Add attachment to this article or content item" ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Add the attachment to a %s (instead of %s)" ATTACH_ADD_URL="Add URL" diff --git a/attachments_component/admin/tmpl/attachments/default.php b/attachments_component/admin/tmpl/attachments/default.php index e0e5214a..a7a771bb 100644 --- a/attachments_component/admin/tmpl/attachments/default.php +++ b/attachments_component/admin/tmpl/attachments/default.php @@ -22,7 +22,8 @@ defined('_JEXEC') or die('Restricted access'); // Add the attachments admin CSS files -$document = Factory::getApplication()->getDocument(); +$app = Factory::getApplication(); +$document = $app->getDocument(); $uri = Uri::getInstance(); // load tooltip behavior @@ -31,10 +32,13 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); +// Make sure the translations are available +$lang = $app->getLanguage(); ?>
editor ) : ?> - +

+ editor ) { From e1c70bc130f1ac7eca15ea228ba1c7c1ff4d4dcb Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 16:10:05 +0200 Subject: [PATCH 08/13] Add Greek translation --- ..._editors-xtd_insert_attachments_id_token.ini | 17 +++++++++++++++++ ...tors-xtd_insert_attachments_id_token.sys.ini | 16 ++++++++++++++++ pkg_attachments/pkg_attachments.xml | 1 + 3 files changed, 34 insertions(+) create mode 100644 insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini create mode 100644 insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini diff --git a/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini b/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini new file mode 100644 index 00000000..ccb3265b --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini @@ -0,0 +1,17 @@ +; el-GR.plg_editors-xtd_add_attachment.ini +; Attachments for Joomla! extension +; Copyright (C) 2007-2024 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 + +; Greek translation + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +INSERT_ATTACHMENTS_ID_TOKEN="Εισαγωγή ένδειξης {attachments id=xxx}" +INSERT_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Τοποθετήστε στον δρομέα στο σημείο που θέλετε να εμφανιστεί η λίστα των συνημμένων (στο front end) και πατήστε αυτό το κουμπί. Αυτό εισάγει την ένδειξη {attachments} που χρησιμοποιεί η επιλογή 'Προσαρμοσμένη Τοποθέτηση'. Θα προστεθεί κάποια επιπλέον HTML για να κρύψει την ένδειξη όταν οι λίστες συνημμένων δεν εμφανίζονται." +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Το πρόσθετο εισαγωγής ένδειξης προσθέτει ένα κουμπί που σας επιτρέπει να εισάγετε μια ένδειξη προσαρμοσμένης τοποθέτησης {attachments id=xxx} κατά την επεξεργασία άρθρων ή κατηγοριών." diff --git a/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini b/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini new file mode 100644 index 00000000..4298ec73 --- /dev/null +++ b/insert_attachments_id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini @@ -0,0 +1,16 @@ +; el-GR.plg_editors-xtd_add_attachment.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 + +; NOTE TO TRANSLATORS: +; Do not translate the '{attachments}' part of any of the right-hand +; strings below! It must appear exactly as '{attachments}' in the +; article/parent text in order for the substitutions to work correctly in +; 'custom placement' mode.! + +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Το πρόσθετο εισαγωγής ένδειξης προσθέτει ένα κουμπί που σας επιτρέπει να εισάγετε μια ένδειξη προσαρμοσμένης τοποθέτησης {attachments id=xxx} κατά την επεξεργασία άρθρων ή κατηγοριών." +PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Κουμπί - Εισαγωγή Ένδειξης Συνημμένων Με Αναγνωριστικό" diff --git a/pkg_attachments/pkg_attachments.xml b/pkg_attachments/pkg_attachments.xml index 24508651..dbb8e4a1 100644 --- a/pkg_attachments/pkg_attachments.xml +++ b/pkg_attachments/pkg_attachments.xml @@ -21,6 +21,7 @@ attachments_for_content.zip show_attachments_in_editor_plugin.zip add_attachment_btn_plugin.zip + insert_attachments_id_token_btn_plugin.zip insert_attachments_token_btn_plugin.zip attachments_quickicon_plugin.zip From 7b15f74ae761fda59813164befcda2cf10c0f14c Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 16:10:15 +0200 Subject: [PATCH 09/13] Fix greek string --- .../el-GR.plg_editors-xtd_insert_attachments_token.sys.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insert_attachments_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_token.sys.ini b/insert_attachments_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_token.sys.ini index 089f43db..a53f2e51 100644 --- a/insert_attachments_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_token.sys.ini +++ b/insert_attachments_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_token.sys.ini @@ -13,4 +13,4 @@ ; 'custom placement' mode.! ATTACH_INSERT_ATTACHMENTS_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Το πρόσθετο 'Εισαγωγή ένδεξης συνημμένων' προσθέτει ένα κουμπί που επιτρέπει την εισαγωγή μιας ένδειξης {attachments} προσαρμοσμένης τοποθέτησης κατά την επεξεργασία άρθρων ή κατηγοριών." -PLG_EDITORS-XTD_INSERT_ATTACHMENTS_TOKEN_BTN="Κουμπί - Εισαγωή Ένδειξης Συνημμένων" +PLG_EDITORS-XTD_INSERT_ATTACHMENTS_TOKEN_BTN="Κουμπί - Εισαγωγή Ένδειξης Συνημμένων" From 17a474137f521b0221fbad3f854d1942d43a3036 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 16:10:38 +0200 Subject: [PATCH 10/13] Fix english translation tokens --- .../en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini index 9e1b0389..76f10854 100644 --- a/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini +++ b/insert_attachments_id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini @@ -12,5 +12,5 @@ ; article/parent text in order for the substitutions to work correctly in ; 'custom placement' mode.! -ATTACH_INSERT_ATTACHMENTSID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments} custom placement token while editing articles or categories." -PLG_EDITORS-XTD_INSERT_ATTACHMENTSID_TOKEN_BTN="Editor Button - Insert Attachments Token" +ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments id=xxx} custom placement token while editing articles or categories." +PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Editor Button - Insert Attachments ID Token" From ad23bbd9ec4f1e7242af2025895928183701529d Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 16:11:04 +0200 Subject: [PATCH 11/13] Add new button plugin to package --- Makefile | 1 + attachments_component/install.attachments.php | 1 + .../insert_attachments_id_token.xml | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a370e2a7..7becf85f 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ all: parts $(ZIPFILE) INSTALLS = attachments_plugin \ add_attachment_btn_plugin \ + insert_attachments_id_token_btn_plugin \ insert_attachments_token_btn_plugin \ attachments_plugin_framework \ attachments_for_content \ diff --git a/attachments_component/install.attachments.php b/attachments_component/install.attachments.php index e49136bd..a881b194 100644 --- a/attachments_component/install.attachments.php +++ b/attachments_component/install.attachments.php @@ -67,6 +67,7 @@ class com_AttachmentsInstallerScript implements InstallerScriptInterface 'plg_attachments_plugin_framework', 'plg_attachments_for_content', 'plg_editors-xtd_add_attachment_btn', + 'plg_editors-xtd_insert_attachments_id_token_btn', 'plg_editors-xtd_insert_attachments_token_btn', 'plg_system_show_attachments_in_editor', 'plg_quickicon_attachments' diff --git a/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml index 0386632f..f75af7e7 100644 --- a/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml +++ b/insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml @@ -8,7 +8,7 @@ http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL jmcameron@jmcameron.net https://github.com/jmcameron/attachments/ - ATTACH_INSERT_ATTACHMENTSID_TOKEN_BUTTON_PLUGIN_DESCRIPTION + ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken src @@ -17,6 +17,8 @@ language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini + language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini + language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini From 649709f273c3244ffb9aa1389e08b27ec9307204 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 24 Nov 2024 16:16:06 +0200 Subject: [PATCH 12/13] Revert unnecessary changes --- attachments_component/admin/tmpl/attachments/default.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/attachments_component/admin/tmpl/attachments/default.php b/attachments_component/admin/tmpl/attachments/default.php index a7a771bb..458e20c1 100644 --- a/attachments_component/admin/tmpl/attachments/default.php +++ b/attachments_component/admin/tmpl/attachments/default.php @@ -22,8 +22,7 @@ defined('_JEXEC') or die('Restricted access'); // Add the attachments admin CSS files -$app = Factory::getApplication(); -$document = $app->getDocument(); +$document = Factory::getApplication()->getDocument(); $uri = Uri::getInstance(); // load tooltip behavior @@ -32,8 +31,6 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -// Make sure the translations are available -$lang = $app->getLanguage(); ?> editor ) : ?> From 5a9483458967175d52f1d3bde2e3bcbb6e6d8ed7 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Tue, 26 Nov 2024 19:33:22 +0100 Subject: [PATCH 13/13] Corect some missing translations for french --- .../admin/language/fr-FR/fr-FR.com_attachments.ini | 2 ++ .../admin/language/fr-FR/fr-FR.com_attachments.sys.ini | 1 + pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.ini b/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.ini index 95835319..a6ea57a4 100644 --- a/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.ini +++ b/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.ini @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Voir/télécharger cette pièce jointe" ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Donnée ajoutée pour %d pièces jointes!" ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Icône ajoutée à %d pièce(s)-jointe(s)." ATTACH_ADD_ATTACHMENT="Ajouter une pièce jointe" +ATTACH_ADD_ATTACHMENT_IDS="Ajoute la(les) pièces jointe(s) sélectionnée(s)" +ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="Si desssous vous avez la liste des pièces jointes déjà ajoutées à l'article/la catégorie. Selectionnez celle(s) qu vous voulez ajouter avec le token et apputer sur le bouton 'Ajoute la(les) pièces jointe(s) sélectionnée(s)'." ATTACH_ADD_ATTACHMENT_TITLE="Ajouter la pièce jointe à l'article ou au contenu" ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Ajouter la pièce jointe à un %s (Au lieu de %s)" ATTACH_ADD_URL="Ajouter l'adresse" diff --git a/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.sys.ini b/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.sys.ini index 4f37cdf0..661503a6 100644 --- a/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.sys.ini +++ b/attachments_component/admin/language/fr-FR/fr-FR.com_attachments.sys.ini @@ -13,3 +13,4 @@ ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_16PLUS="Attachments pour Joomla 2.5+" ATTACH_PLEASE_REPORT_BUGS_AND_SUGGESTIONS_TO_S="Merci de signaler les bugs et vos suggestions à %s" COM_ATTACHMENTS="Attachments" COM_ATTACHMENTS_CONFIGURATION="Configuration du composant Attachments" +ATTACH_PACKAGE_NOTICE_UNINSTALL_PACKAGE_S="Pou désinstaller l'extension 'Attachments, désinstaller le Package '%s'!" diff --git a/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini b/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini index baa10aed..e0eb676e 100644 --- a/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini +++ b/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini @@ -7,5 +7,4 @@ ; English translation ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_40PLUS="Attachments for Joomla 4.0+" -ATTACH_PACKAGE_NOTICE_UNINSTALL_PACKAGE_S="To uninstall the Attachments extension, uninstall the Package '%s'!" PKG_ATTACHMENTS="Package: Attachments for Joomla 4.0+"