diff --git a/componentbuilderheaderscompiler.php b/componentbuilderheaderscompiler.php index cdd484e..e3b2271 100644 --- a/componentbuilderheaderscompiler.php +++ b/componentbuilderheaderscompiler.php @@ -24,7 +24,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; * Extension - Componentbuilder Headers Compiler plugin. * * @package ComponentbuilderHeadersCompiler - * @since 2.2.2 + * @since 2.2.3 */ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin { @@ -118,6 +118,16 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin 'field' => 'admin_views_controller', 'context' => 'admin.views.controller', 'view' => 'name_list' + ), + 'add_import_custom_controller' => array( + 'field' => 'import_custom_controller', + 'context' => 'import.custom.controller', + 'view' => 'name_list' + ), + 'add_import_custom_model' => array( + 'field' => 'import_custom_model', + 'context' => 'import.custom.model', + 'view' => 'name_list' ) ), 'site_view_headers' => diff --git a/componentbuilderheaderscompiler.xml b/componentbuilderheaderscompiler.xml index 10e253d..3d57558 100644 --- a/componentbuilderheaderscompiler.xml +++ b/componentbuilderheaderscompiler.xml @@ -1,13 +1,13 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER - 15th February, 2023 + 26th February, 2023 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 - 2.2.2 + 2.2.3 PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini index a94e2c8..331ed41 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.ini @@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes 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. Also be sure to set your code where you would like to set Custom Headers." -PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.2)

This plugin is used to set the custom headers for your classes 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_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.3)

This plugin is used to set the custom headers for your classes 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. Also be sure to set your code where you would like to set Custom Headers.

Created by Llewellyn van der Merwe
Development started 24th May, 2020

" \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini index a94e2c8..331ed41 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderheaderscompiler.sys.ini @@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes 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. Also be sure to set your code where you would like to set Custom Headers." -PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.2)

This plugin is used to set the custom headers for your classes 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_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder Headers Compiler (v.2.2.3)

This plugin is used to set the custom headers for your classes 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. Also be sure to set your code where you would like to set Custom Headers.

Created by Llewellyn van der Merwe
Development started 24th May, 2020

" \ No newline at end of file diff --git a/script.php b/script.php index 79ea23b..110554b 100644 --- a/script.php +++ b/script.php @@ -57,10 +57,13 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); return false; } + // load the helper class JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + // block install $blockInstall = true; + // check the version of JCB $manifest = ComponentbuilderHelper::manifest(); if (isset($manifest->version) && strpos($manifest->version, '.') !== false) @@ -78,12 +81,14 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $blockInstall = false; } } + // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.0 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error'); return false; - } + } + // check that componentbuilder is installed $pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'; @@ -155,10 +160,13 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); return false; } + // load the helper class JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + // block install $blockInstall = true; + // check the version of JCB $manifest = ComponentbuilderHelper::manifest(); if (isset($manifest->version) && strpos($manifest->version, '.') !== false) @@ -176,12 +184,14 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $blockInstall = false; } } + // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.0 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error'); return false; - } + } + // check that componentbuilder is installed @@ -191,10 +201,13 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); return false; } + // load the helper class JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + // block install $blockInstall = true; + // check the version of JCB $manifest = ComponentbuilderHelper::manifest(); if (isset($manifest->version) && strpos($manifest->version, '.') !== false) @@ -212,12 +225,14 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $blockInstall = false; } } + // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.0 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error'); return false; - } + } + // check that componentbuilder is installed @@ -227,33 +242,38 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); return false; } + // load the helper class JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + // block install $blockInstall = true; + // check the version of JCB $manifest = ComponentbuilderHelper::manifest(); if (isset($manifest->version) && strpos($manifest->version, '.') !== false) { // get the version $jcbVersion = explode('.', $manifest->version); - // check that we have JCB 3.0.14 or higher installed + // check that we have JCB 3.1.18 or higher installed if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 && ( - ($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) || - ($jcbVersion[0] == 3 && $jcbVersion[1] > 0) || + ($jcbVersion[0] == 3 && $jcbVersion[1] == 1 && $jcbVersion[2] >= 18) || + ($jcbVersion[0] == 3 && $jcbVersion[1] > 1) || $jcbVersion[0] > 3) ) { $blockInstall = false; } } + // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.14 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB v3.1.18 or higher before installing this plugin.', 'error'); return false; - } + } + } return true;