From 82e603b50930573a983abfe548d405a39026d150 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 9 May 2022 14:26:07 +0200 Subject: [PATCH] update - v1.0.2 --- componentbuilderpowersautoloadercompiler.php | 6 ++-- componentbuilderpowersautoloadercompiler.xml | 26 ++++++++--------- fields/joomlaplugins.php | 4 +-- ...mponentbuilderpowersautoloadercompiler.ini | 28 +++++++++---------- ...entbuilderpowersautoloadercompiler.sys.ini | 28 +++++++++---------- script.php | 6 ++-- 6 files changed, 49 insertions(+), 49 deletions(-) diff --git a/componentbuilderpowersautoloadercompiler.php b/componentbuilderpowersautoloadercompiler.php index 6a9af9d..e5228e2 100644 --- a/componentbuilderpowersautoloadercompiler.php +++ b/componentbuilderpowersautoloadercompiler.php @@ -22,7 +22,7 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c * Extension - Componentbuilder Powers Autoloader Compiler plugin. * * @package ComponentbuilderPowersAutoloaderCompiler - * @since 1.0.1 + * @since 1.0.2 */ class PlgExtensionComponentbuilderPowersAutoloaderCompiler extends CMSPlugin { @@ -44,7 +44,7 @@ class PlgExtensionComponentbuilderPowersAutoloaderCompiler extends CMSPlugin public function jcb_ce_onAfterGet(&$context, $compiler) { // check if this component needs a power autoloader plugin loaded - if ($this->componentActive($context) && ComponentbuilderHelper::checkArray($compiler->powers)) + if ($compiler->addPower && $this->componentActive($context) && ComponentbuilderHelper::checkArray($compiler->powers)) { // now get the plugin ID if set if (($id = (int) $this->params->get('plugin', 0)) !== 0) @@ -56,7 +56,7 @@ class PlgExtensionComponentbuilderPowersAutoloaderCompiler extends CMSPlugin } else { - JFactory::getApplication()->enqueueMessage(JText::_('PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED'), 'Error'); + JFactory::getApplication()->enqueueMessage(JText::_('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED'), 'Error'); } } } diff --git a/componentbuilderpowersautoloadercompiler.xml b/componentbuilderpowersautoloadercompiler.xml index a5dffd3..8fba17f 100644 --- a/componentbuilderpowersautoloadercompiler.xml +++ b/componentbuilderpowersautoloadercompiler.xml @@ -1,14 +1,14 @@ - PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER - 10th March, 2022 + PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER + 9th May, 2022 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 1.0.1 - PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION + 1.0.2 + PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION script.php @@ -32,17 +32,17 @@ -
- + + PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ALL + PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_SELECTED authorise('joomla_plugin.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $button[] = ' '; } @@ -90,7 +90,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.ini b/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.ini index a72c5de..2d7ffe0 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.ini @@ -1,14 +1,14 @@ -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER="Extension - Componentbuilder Powers Autoloader Compiler" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_DESCRIPTION="This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Powers Autoloader Compiler (v.1.0.1)

This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.

Created by Llewellyn van der Merwe
Development started 13th November, 2021

" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED="You do not have a global power plugin setup, so the powers plugin autoloader could not be added." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_GLOBAL_AUTOLOADER="Global Autoloader" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_LABEL="Select your power autoloader plugin here." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_DESCRIPTION="If you don't yet have a global powers autoloader plugin, watch this tutorial to see how to setup it up." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_PLUGIN_LABEL="Plugins" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ALL="All" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_SELECTED="Selected" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_LABEL="Components" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_DESCRIPTION="Select the components you would like to be targeted." \ No newline at end of file +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER="Extension - Componentbuilder Powers Autoloader Compiler" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_DESCRIPTION="This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Powers Autoloader Compiler (v.1.0.2)

This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.

Created by Llewellyn van der Merwe
Development started 13th November, 2021

" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED="You do not have a global power plugin setup, so the powers plugin autoloader could not be added." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_GLOBAL_AUTOLOADER="Global Autoloader" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_LABEL="Select your power autoloader plugin here." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_DESCRIPTION="If you don't yet have a global powers autoloader plugin, watch this tutorial to see how to setup it up." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_PLUGIN_LABEL="Plugins" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ALL="All" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_SELECTED="Selected" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_LABEL="Components" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_DESCRIPTION="Select the components you would like to be targeted." \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.sys.ini b/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.sys.ini index a72c5de..2d7ffe0 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.sys.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderpowersautoloadercompiler.sys.ini @@ -1,14 +1,14 @@ -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER="Extension - Componentbuilder Powers Autoloader Compiler" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_DESCRIPTION="This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Powers Autoloader Compiler (v.1.0.1)

This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.

Created by Llewellyn van der Merwe
Development started 13th November, 2021

" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED="You do not have a global power plugin setup, so the powers plugin autoloader could not be added." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_GLOBAL_AUTOLOADER="Global Autoloader" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_LABEL="Select your power autoloader plugin here." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_DESCRIPTION="If you don't yet have a global powers autoloader plugin, watch this tutorial to see how to setup it up." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_PLUGIN_LABEL="Plugins" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ALL="All" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_SELECTED="Selected" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_LABEL="Components" -PLG_EXTENSIONCOMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_DESCRIPTION="Select the components you would like to be targeted." \ No newline at end of file +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER="Extension - Componentbuilder Powers Autoloader Compiler" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_DESCRIPTION="This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Powers Autoloader Compiler (v.1.0.2)

This plugin is used to build the power autoloader plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.

Created by Llewellyn van der Merwe
Development started 13th November, 2021

" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_POWER_PLUGIN_SETUP_SO_THE_POWERS_PLUGIN_AUTOLOADER_COULD_NOT_BE_ADDED="You do not have a global power plugin setup, so the powers plugin autoloader could not be added." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_GLOBAL_AUTOLOADER="Global Autoloader" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_LABEL="Select your power autoloader plugin here." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_NOTE_SELECT_POWER_PLUGIN_DESCRIPTION="If you don't yet have a global powers autoloader plugin, watch this tutorial to see how to setup it up." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_PLUGIN_LABEL="Plugins" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_ALL="All" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_SELECTED="Selected" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_LABEL="Components" +PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_COMPONENTS_DESCRIPTION="Select the components you would like to be targeted." \ No newline at end of file diff --git a/script.php b/script.php index c1f6796..77cec21 100644 --- a/script.php +++ b/script.php @@ -61,10 +61,10 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript { // get the version $jcbVersion = explode('.', $manifest->version); - // check that we have JCB 3.0.5 or higher installed + // check that we have JCB 3.0.10 or higher installed if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 && ( - ($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 5) || + ($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 10) || ($jcbVersion[0] == 3 && $jcbVersion[1] > 0) || $jcbVersion[0] > 3) ) @@ -75,7 +75,7 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.5 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.10 or higher before installing this plugin.', 'error'); return false; } }