Skip to content
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

[4.4] EOS - Plugin Disabling Quick Icon Display and adding correct text definitions #2849

Closed
jgerman-bot opened this issue Jun 25, 2023 · 0 comments · Fixed by #2854
Closed

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#40774 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/language/en-GB/plg_quickicon_eos.ini b/administrator/language/en-GB/plg_quickicon_eos.ini
index f4af7d0ce768..2a47e0fe6e5b 100644
--- a/administrator/language/en-GB/plg_quickicon_eos.ini
+++ b/administrator/language/en-GB/plg_quickicon_eos.ini
@@ -3,37 +3,11 @@
 ; License GNU General Public License version 2 or later; see LICENSE.txt
 ; Note : All ini files need to be saved as UTF-8
 
-PLG_QUICKICON_EOS="Quick Icon - Joomla! End Of Support Notification"
-PLG_QUICKICON_EOS_GROUPNAME_EOS="End Of Support"
-PLG_QUICKICON_EOS_GROUPNAME_INFO="Upgrade Information"
-PLG_QUICKICON_EOS_GROUPNAME_WARNING="Support Status"
-PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to the next version</a> as soon as possible.</p>"
-PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED_SHORT="Support has ended for your version of Joomla <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS_MESSAGE_INFO_01="<p>The latest version of Joomla has arrived! Find out all that it has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">its features</a> and improvements.</p>"
-PLG_QUICKICON_EOS_MESSAGE_INFO_01_SHORT="The latest version of Joomla has arrived! <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS_MESSAGE_INFO_02="<p>When is the time to migrate to the next version? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">how to use the Pre-Update Checker</a>. </p>"
-PLG_QUICKICON_EOS_MESSAGE_INFO_02_SHORT="Use Pre-Update Check for extension compatibility <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY="<p>This version of Joomla has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to migrate</a> to the next version of Joomla today.</p>"
-PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY_SHORT="This version of Joomla ends support on %1$s. <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for this version of Joomla. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to the latest version of Joomla</a> as soon as possible.</p>"
-PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING_SHORT="End of support for this version of Joomla on %1$s. <span class=\"icon-new-tab\"></span>"
+PLG_QUICKICON_EOS="Quick Icon - Joomla 4.4 End Of Support Notification"
+PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla 4.4. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Upgrade to Joomla 5</a> as soon as possible.</p>"
+PLG_QUICKICON_EOS_MESSAGE_INFO_01="<p>Joomla 5 has arrived! Find out all that Joomla 5 has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Joomla 5 features</a> and improvements.</p>"
+PLG_QUICKICON_EOS_MESSAGE_INFO_02="<p>When is the time to upgrade to Joomla 5? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\"> how to use the Pre-Update Checker</a>.</p>"
+PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY="<p>Joomla 4.4 has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to upgrade</a> to Joomla 5 today.</p>"
+PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for Joomla 4.4 <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Upgrade to Joomla 5</a> as soon as possible.</p>"
 PLG_QUICKICON_EOS_SNOOZE_BUTTON="Snooze this message for all users"
-PLG_QUICKICON_EOS_XML_DESCRIPTION="Checks for the end of support status of Joomla and notifies you when visiting the Control Panel page."
-; Below is a copy of the 3.10 text definitions for reference.
-PLG_QUICKICON_EOS310="Quick Icon - Joomla 3.10 End Of Support Notification"
-PLG_QUICKICON_EOS310_GROUPNAME_EOS="End Of Support"
-PLG_QUICKICON_EOS310_GROUPNAME_INFO="Upgrade Information"
-PLG_QUICKICON_EOS310_GROUPNAME_WARNING="Support Status"
-PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla 3.10. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to Joomla 4</a> <span class=\"icon-new-tab\"></span>as soon as possible.</p>"
-PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED_SHORT="Support has ended for Joomla 3.10 <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS310_MESSAGE_INFO_01="<p>Joomla 4 has arrived! Find out all that Joomla 4 has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Joomla 4 features</a> <span class=\"icon-new-tab\"></span>and improvements.</p>"
-PLG_QUICKICON_EOS310_MESSAGE_INFO_01_SHORT="Joomla 4 has arrived! <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS310_MESSAGE_INFO_02="<p>When is the time to migrate to Joomla 4? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">how to use the Pre-Update Checker</a>. <span class=\"icon-new-tab\"></span></p>"
-PLG_QUICKICON_EOS310_MESSAGE_INFO_02_SHORT="Use Pre-Update Check for extension compatibility <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY="<p>Joomla 3.10 has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to migrate</a> <span class=\"icon-new-tab\"></span>to Joomla 4 today.</p>"
-PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY_SHORT="Joomla 3.10 to end support on %1$s. <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for Joomla 3.10. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to Joomla 4</a> <span class=\"icon-new-tab\"></span>as soon as possible.</p>"
-PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING_SHORT="End of support for Joomla 3.10 on %1$s. <span class=\"icon-new-tab\"></span>"
-PLG_QUICKICON_EOS310_SNOOZE_BUTTON="Snooze this message for all users"
-PLG_QUICKICON_EOS310_XML_DESCRIPTION="Checks for the end of support status of Joomla 3.10 and notifies you when visiting the Control Panel page."
-;All of this text is currently being written for Joomla 5 by Phil Watson and Jenn Gress. TODO
+PLG_QUICKICON_EOS_XML_DESCRIPTION="Checks for the end of support status of Joomla 4.4 and notifies you when visiting the Control Panel page."
diff --git a/plugins/quickicon/eos/src/Extension/Eos.php b/plugins/quickicon/eos/src/Extension/Eos.php
index 0cc7beec9bef..a269585b9995 100644
--- a/plugins/quickicon/eos/src/Extension/Eos.php
+++ b/plugins/quickicon/eos/src/Extension/Eos.php
@@ -82,11 +82,10 @@ public static function getSubscribedEvents(): array
     }
 
     /**
-     * Check and show the the alert and quickicon message.
+     * Check and show the the alert.
      *
      * 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.
+     * of icons.
      *
      * @param   QuickIconsEvent  $event  The event object
      *
@@ -128,27 +127,6 @@ public function getEndOfServiceNotification(QuickIconsEvent $event): void
 
         $app->getDocument()->getWebAssetManager()
             ->registerAndUseScript('plg_quickicon_eos.script', 'plg_quickicon_eos/snooze.js', [], ['type' => 'module']);
-
-        $result               = $event->getArgument('result', []);
-        $messageTextQuickIcon = sprintf(
-            $app->getLanguage()->_($this->currentMessage['quickiconText']),
-            HTMLHelper::_('date', Eos::EOS_DATE, $app->getLanguage()->_('DATE_FORMAT_LC3'))
-        );
-
-        // The message as quickicon
-
-        $result[] = [
-            [
-                'link'  => $this->currentMessage['messageLink'],
-                'image' => $this->currentMessage['image'],
-                'text'  => $messageTextQuickIcon,
-                'id'    => 'plg_quickicon_eos',
-                'group' => $this->currentMessage['groupText'],
-                'class' => $this->currentMessage['messageType'],
-            ],
-        ];
-
-        $event->setArgument('result', $result);
     }
 
     /**
@@ -209,70 +187,55 @@ private function getMessageInfo(int $monthsUntilEOS, int $inverted): array
         // The EOS date has passed - Support has ended
         if ($inverted === 1) {
             return [
-                'id'            => 5,
-                'messageText'   => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED',
-                'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED_SHORT',
-                'messageType'   => 'error',
-                'image'         => 'fa fa-life-ring',
-                'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
-                'groupText'     => 'PLG_QUICKICON_EOS_GROUPNAME_EOS',
-                'snoozable'     => false,
+                'id'          => 5,
+                'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED',
+                'messageType' => 'error',
+                'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
+                'snoozable'   => false,
             ];
         }
 
         // The security support is ending in 6 months
         if ($monthsUntilEOS < 6) {
             return [
-                'id'            => 4,
-                'messageText'   => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING',
-                'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING_SHORT',
-                'messageType'   => 'warning',
-                'image'         => 'fa fa-life-ring',
-                'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
-                'groupText'     => 'PLG_QUICKICON_EOS_GROUPNAME_WARNING',
-                'snoozable'     => true,
+                'id'          => 4,
+                'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING',
+                'messageType' => 'warning',
+                'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
+                'snoozable'   => true,
             ];
         }
 
         // We are in security only mode now, 12 month to go from now on
         if ($monthsUntilEOS < 12) {
             return [
-                'id'            => 3,
-                'messageText'   => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY',
-                'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY_SHORT',
-                'messageType'   => 'warning',
-                'image'         => 'fa fa-life-ring',
-                'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
-                'groupText'     => 'PLG_QUICKICON_EOS_GROUPNAME_WARNING',
-                'snoozable'     => true,
+                'id'          => 3,
+                'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY',
+                'messageType' => 'warning',
+                'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
+                'snoozable'   => true,
             ];
         }
 
         // We still have 16 month to go, lets remind our users about the pre upgrade checker
         if ($monthsUntilEOS < 16) {
             return [
-                'id'            => 2,
-                'messageText'   => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02',
-                'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02_SHORT',
-                'messageType'   => 'info',
-                'image'         => 'fa fa-life-ring',
-                'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check',
-                'groupText'     => 'PLG_QUICKICON_EOS_GROUPNAME_INFO',
-                'snoozable'     => true,
+                'id'          => 2,
+                'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02',
+                'messageType' => 'info',
+                'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check',
+                'snoozable'   => true,
             ];
         }
 
         // Lets start our messages 2 month after the initial release, still 22 month to go
         if ($monthsUntilEOS < 22) {
             return [
-                'id'            => 1,
-                'messageText'   => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01',
-                'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01_SHORT',
-                'messageType'   => 'info',
-                'image'         => 'fa fa-life-ring',
-                'messageLink'   => 'https://www.joomla.org/4/#features',
-                'groupText'     => 'PLG_QUICKICON_EOS_GROUPNAME_INFO',
-                'snoozable'     => true,
+                'id'          => 1,
+                'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01',
+                'messageType' => 'info',
+                'messageLink' => 'https://joomla.org/5',
+                'snoozable'   => true,
             ];
         }
 
@tecpromotion tecpromotion changed the title EOS - Plugin Disabling Quick Icon Display and adding correct text definitions [4.4] EOS - Plugin Disabling Quick Icon Display and adding correct text definitions Jul 1, 2023
tecpromotion added a commit to tecpromotion/joomla that referenced this issue Jul 1, 2023
zero-24 pushed a commit that referenced this issue Jul 12, 2023
…xt definitions (#2854)

* add two new files

* fix #2849

* fix #2855

* fix
@heelc29 heelc29 closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants