Release of v2.0.0
This commit is contained in:
parent
fb5c46b329
commit
b837015787
@ -18,15 +18,12 @@ use Joomla\Registry\Registry;
|
|||||||
use VDM\Joomla\Utilities\JsonHelper;
|
use VDM\Joomla\Utilities\JsonHelper;
|
||||||
use VDM\Joomla\Utilities\ArrayHelper;
|
use VDM\Joomla\Utilities\ArrayHelper;
|
||||||
use VDM\Joomla\Utilities\StringHelper;
|
use VDM\Joomla\Utilities\StringHelper;
|
||||||
|
use VDM\Joomla\Componentbuilder\Compiler\Factory;
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
|
||||||
|
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
|
||||||
/**
|
/**
|
||||||
* Extension - Componentbuilder Field Ordering Compiler plugin.
|
* Extension - Componentbuilder Field Ordering Compiler plugin.
|
||||||
*
|
*
|
||||||
* @package ComponentbuilderFieldOrderingCompiler
|
* @package ComponentbuilderFieldOrderingCompiler
|
||||||
* @since 1.1.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
class PlgExtensionComponentbuilderFieldOrderingCompiler extends CMSPlugin
|
class PlgExtensionComponentbuilderFieldOrderingCompiler extends CMSPlugin
|
||||||
{
|
{
|
||||||
@ -49,7 +46,7 @@ class PlgExtensionComponentbuilderFieldOrderingCompiler extends CMSPlugin
|
|||||||
// setup the view key name
|
// setup the view key name
|
||||||
$name_list = StringHelper::safe($view->name_list);
|
$name_list = StringHelper::safe($view->name_list);
|
||||||
// load the admin view details
|
// load the admin view details
|
||||||
CFactory::_('Compiler.Builder.Views.Default.Ordering')->set($name_list, $view->params['fieldordering']);
|
Factory::_('Compiler.Builder.Views.Default.Ordering')->set($name_list, $view->params['fieldordering']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="plugin" version="3.10" group="extension" method="upgrade">
|
<extension type="plugin" version="4.0" group="extension" method="upgrade">
|
||||||
<name>PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER</name>
|
<name>PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER</name>
|
||||||
<creationDate>9th March, 2024</creationDate>
|
<creationDate>11th March, 2024</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
<version>1.1.0</version>
|
<version>2.0.0</version>
|
||||||
<description>PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION</description>
|
<description>PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION</description>
|
||||||
|
|
||||||
<!-- Scripts to run on installation -->
|
<!-- Scripts to run on installation -->
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER="Extension - Componentbuilder Field Ordering Compiler"
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER="Extension - Componentbuilder Field Ordering Compiler"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_DESCRIPTION="This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering."
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_DESCRIPTION="This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering."
|
||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Field Ordering Compiler (v.1.1.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 21st May, 2020</small></p>"
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Field Ordering Compiler (v.2.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
@ -1,3 +1,3 @@
|
|||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER="Extension - Componentbuilder Field Ordering Compiler"
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER="Extension - Componentbuilder Field Ordering Compiler"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_DESCRIPTION="This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering."
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_DESCRIPTION="This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering."
|
||||||
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Field Ordering Compiler (v.1.1.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 21st May, 2020</small></p>"
|
PLG_EXTENSION_COMPONENTBUILDERFIELDORDERINGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Field Ordering Compiler (v.2.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set the ordring for your component views 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 admin views where you would like to use Field Ordering.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
138
script.php
138
script.php
@ -48,9 +48,6 @@ class plgExtensionComponentbuilderFieldOrderingCompilerInstallerScript
|
|||||||
|
|
||||||
if ('install' === $route)
|
if ('install' === $route)
|
||||||
{
|
{
|
||||||
// needs fix
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -58,141 +55,6 @@ class plgExtensionComponentbuilderFieldOrderingCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
||||||
return false;
|
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.0 or higher installed
|
|
||||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
|
||||||
(
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
|
|
||||||
$jcbVersion[0] > 3)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
$blockInstall = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// allow install if all conditions are met
|
|
||||||
if ($blockInstall)
|
|
||||||
{
|
|
||||||
$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';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', '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 2.10.13 or higher installed
|
|
||||||
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) || $jcbVersion[0] >= 3))
|
|
||||||
{
|
|
||||||
$blockInstall = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// allow install if all conditions are met
|
|
||||||
if ($blockInstall)
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Please upgrade to JCB 2.10.13 or higher before installing this plugin.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', '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.0 or higher installed
|
|
||||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
|
||||||
(
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
|
|
||||||
$jcbVersion[0] > 3)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
$blockInstall = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// allow install if all conditions are met
|
|
||||||
if ($blockInstall)
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user