-
Notifications
You must be signed in to change notification settings - Fork 22
add new button for {attachments id=xxx } #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
55df862
add new buttion for {attachments id=xxx }
43e56eb
Fix translation messages
parapente 171ea0c
Remove XDEBUG_SESSION_START
parapente 38b84a0
Fix token name
parapente ef85c00
Remove unnecessary code
parapente 56afe45
Remove test code
parapente 65f6b47
Add a description of the list and a more descriptive text for the but…
parapente 4824aa3
Merge branch 'master' into attachmentsid
parapente e1c70bc
Add Greek translation
parapente 7b15f74
Fix greek string
parapente 17a4741
Fix english translation tokens
parapente ad23bbd
Add new button plugin to package
parapente 649709f
Revert unnecessary changes
parapente 5a94834
Corect some missing translations for french
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
insert_attachments_id_token_btn_plugin/insert_attachments_id_token.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <extension type="plugin" group="editors-xtd" version="4.0" method="upgrade"> | ||
| <name>plg_editors-xtd_insert_attachments_id_token_btn</name> | ||
| <version>4.0.4</version> | ||
| <creationDate>November 9, 2024</creationDate> | ||
| <author>Jonathan M. Cameron</author> | ||
| <copyright>(C) 2007-2024 Jonathan M. Cameron. All rights reserved.</copyright> | ||
| <license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license> | ||
| <authorEmail>[email protected]</authorEmail> | ||
| <authorUrl>https://github.com/jmcameron/attachments/</authorUrl> | ||
| <description>ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION</description> | ||
| <namespace path="src">JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken</namespace> | ||
| <files> | ||
| <folder>src</folder> | ||
| <folder plugin="insert_attachments_id_token">services</folder> | ||
| </files> | ||
| <languages> | ||
| <language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini</language> | ||
| <language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini</language> | ||
| <language tag="el-GR">language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini</language> | ||
| <language tag="el-GR">language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini</language> | ||
| <language tag="fr-FR">language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini</language> | ||
| <language tag="fr-FR">language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini</language> | ||
| </languages> | ||
| </extension> |
17 changes: 17 additions & 0 deletions
17
..._id_token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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} κατά την επεξεργασία άρθρων ή κατηγοριών." |
16 changes: 16 additions & 0 deletions
16
...token_btn_plugin/language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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="Κουμπί - Εισαγωγή Ένδειξης Συνημμένων Με Αναγνωριστικό" |
17 changes: 17 additions & 0 deletions
17
..._id_token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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." |
16 changes: 16 additions & 0 deletions
16
...token_btn_plugin/language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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_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" |
17 changes: 17 additions & 0 deletions
17
..._id_token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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." |
16 changes: 16 additions & 0 deletions
16
...token_btn_plugin/language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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)" |
39 changes: 39 additions & 0 deletions
39
insert_attachments_id_token_btn_plugin/services/provider.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <?php | ||
|
|
||
| \defined('_JEXEC') or die; | ||
|
|
||
| use Joomla\CMS\Extension\PluginInterface; | ||
| use Joomla\CMS\Factory; | ||
| use Joomla\CMS\Plugin\PluginHelper; | ||
| use Joomla\DI\Container; | ||
| use Joomla\DI\ServiceProviderInterface; | ||
| use Joomla\Event\DispatcherInterface; | ||
| use JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken\Extension\InsertAttachmentsIdToken; | ||
|
|
||
| return new class () implements ServiceProviderInterface { | ||
| /** | ||
| * Registers the service provider with a DI container. | ||
| * | ||
| * @param Container $container The DI container. | ||
| * | ||
| * @return void | ||
| * | ||
| * @since 4.3.0 | ||
| */ | ||
| public function register(Container $container) | ||
| { | ||
| $container->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; | ||
| } | ||
| ); | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.