Update on v2.0.3 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
parent
109b5ce972
commit
792a4acd6c
@ -21,7 +21,7 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c
|
||||
* Content - Componentbuilder Admin Headers Tabs plugin.
|
||||
*
|
||||
* @package ComponentbuilderAdminHeadersTabs
|
||||
* @since 2.0.1
|
||||
* @since 2.0.3
|
||||
*/
|
||||
class PlgContentComponentbuilderAdminHeadersTabs extends CMSPlugin
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" version="4" group="content" method="upgrade">
|
||||
<name>PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS</name>
|
||||
<creationDate>15th February, 2023</creationDate>
|
||||
<creationDate>26th February, 2023</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>2.0.1</version>
|
||||
<version>2.0.3</version>
|
||||
<description>PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_XML_DESCRIPTION</description>
|
||||
|
||||
<!-- Scripts to run on installation -->
|
||||
|
@ -942,6 +942,176 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_import_custom_controller Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_import_custom_controller"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_CONTROLLER_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_YES</option>
|
||||
<option value="0">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_NO</option>
|
||||
</field>
|
||||
<!-- Import_custom_controller Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="import_custom_controller"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_LABEL"
|
||||
description="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION"
|
||||
width="100%"
|
||||
height="100px"
|
||||
cols="15"
|
||||
rows="10"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="false"
|
||||
validate="code"
|
||||
showon="add_import_custom_controller:1"
|
||||
/>
|
||||
<!-- Power_import_custom_controller Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="power_import_custom_controller"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
buttons="add,remove,move"
|
||||
description="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION"
|
||||
icon="list"
|
||||
max="50"
|
||||
showon="add_import_custom_controller:1">
|
||||
<form hidden="true" name="list_power_import_custom_controller_modal" repeat="true">
|
||||
<!-- Power Field. Type: Powers. (custom) -->
|
||||
<field
|
||||
type="powers"
|
||||
name="power"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_LABEL"
|
||||
class="list_class span12"
|
||||
multiple="false"
|
||||
default="0"
|
||||
button="false"
|
||||
/>
|
||||
<!-- As Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="as"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_AS_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
default="default"
|
||||
class="text_area"
|
||||
filter="STRING"
|
||||
autocomplete="on"
|
||||
/>
|
||||
<!-- Build Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="build"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_BUILD_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ALWAYS</option>
|
||||
<option value="2">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_BASED_ON_COMPONENT</option>
|
||||
<option value="6">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_EXCLUDE</option>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_import_custom_model Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_import_custom_model"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_MODEL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_YES</option>
|
||||
<option value="0">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_NO</option>
|
||||
</field>
|
||||
<!-- Import_custom_model Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
name="import_custom_model"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_LABEL"
|
||||
description="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_DESCRIPTION"
|
||||
width="100%"
|
||||
height="100px"
|
||||
cols="15"
|
||||
rows="10"
|
||||
buttons="no"
|
||||
syntax="php"
|
||||
editor="codemirror|none"
|
||||
filter="raw"
|
||||
required="false"
|
||||
validate="code"
|
||||
showon="add_import_custom_model:1"
|
||||
/>
|
||||
<!-- Power_import_custom_model Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="power_import_custom_model"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
buttons="add,remove,move"
|
||||
description="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_DESCRIPTION"
|
||||
icon="list"
|
||||
max="50"
|
||||
showon="add_import_custom_model:1">
|
||||
<form hidden="true" name="list_power_import_custom_model_modal" repeat="true">
|
||||
<!-- Power Field. Type: Powers. (custom) -->
|
||||
<field
|
||||
type="powers"
|
||||
name="power"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_LABEL"
|
||||
class="list_class span12"
|
||||
multiple="false"
|
||||
default="0"
|
||||
button="false"
|
||||
/>
|
||||
<!-- As Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="as"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_AS_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
default="default"
|
||||
class="text_area"
|
||||
filter="STRING"
|
||||
autocomplete="on"
|
||||
/>
|
||||
<!-- Build Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="build"
|
||||
label="PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_BUILD_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ALWAYS</option>
|
||||
<option value="2">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_BASED_ON_COMPONENT</option>
|
||||
<option value="6">
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_EXCLUDE</option>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_ajax_model Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
|
@ -1,6 +1,6 @@
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS="Content - Componentbuilder Admin Headers Tabs"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_DESCRIPTION="This plugin is used to set admin class custom headers."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Admin Headers Tabs (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set admin class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th October, 2020</small></p>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Admin Headers Tabs (v.2.0.3)</h1> <div style='clear: both;'></div><p>This plugin is used to set admin class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th October, 2020</small></p>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_CLASS_HEADERS="Class Headers"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_ADMIN_VIEW_MODEL_LABEL="Target Admin View<br />Model Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_YES="Yes"
|
||||
@ -88,6 +88,20 @@ PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_SITE_ADMIN_VIEW_DESCRIPTION="The de
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_SITE_ADMIN_VIEW_LABEL="Power Header<br />
|
||||
<small>(site.admin.view)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_SITE_ADMIN_VIEW_DESCRIPTION="The power header for site admin view. So only use this if you have selected the admin edit view to be added to the site area."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_CONTROLLER_LABEL="Target Import Custom<br />Controller Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_LABEL="Class Header<br />
|
||||
<small>(import.custom.controller)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION="The class header for import custom controller."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_LABEL="Power Header<br />
|
||||
<small>(import.custom.controller)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION="The power header for admin view controller."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_MODEL_LABEL="Target Import Custom<br />Model Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_LABEL="Class Header<br />
|
||||
<small>(import.custom.model)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_DESCRIPTION="The class header for import custom model."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_LABEL="Power Header<br />
|
||||
<small>(import.custom.model)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_DESCRIPTION="The power header for admin view model."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
|
||||
<small>(ajax.model)</small>"
|
||||
|
@ -1,6 +1,6 @@
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS="Content - Componentbuilder Admin Headers Tabs"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_DESCRIPTION="This plugin is used to set admin class custom headers."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Admin Headers Tabs (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set admin class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th October, 2020</small></p>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Admin Headers Tabs (v.2.0.3)</h1> <div style='clear: both;'></div><p>This plugin is used to set admin class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th October, 2020</small></p>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_CLASS_HEADERS="Class Headers"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_ADMIN_VIEW_MODEL_LABEL="Target Admin View<br />Model Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_YES="Yes"
|
||||
@ -88,6 +88,20 @@ PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_SITE_ADMIN_VIEW_DESCRIPTION="The de
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_SITE_ADMIN_VIEW_LABEL="Power Header<br />
|
||||
<small>(site.admin.view)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_SITE_ADMIN_VIEW_DESCRIPTION="The power header for site admin view. So only use this if you have selected the admin edit view to be added to the site area."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_CONTROLLER_LABEL="Target Import Custom<br />Controller Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_LABEL="Class Header<br />
|
||||
<small>(import.custom.controller)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION="The class header for import custom controller."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_LABEL="Power Header<br />
|
||||
<small>(import.custom.controller)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_CONTROLLER_DESCRIPTION="The power header for admin view controller."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_IMPORT_CUSTOM_MODEL_LABEL="Target Import Custom<br />Model Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_LABEL="Class Header<br />
|
||||
<small>(import.custom.model)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_IMPORT_CUSTOM_MODEL_DESCRIPTION="The class header for import custom model."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_LABEL="Power Header<br />
|
||||
<small>(import.custom.model)</small>"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_POWER_IMPORT_CUSTOM_MODEL_DESCRIPTION="The power header for admin view model."
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
|
||||
PLG_CONTENT_COMPONENTBUILDERADMINHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
|
||||
<small>(ajax.model)</small>"
|
||||
|
126
script.php
126
script.php
@ -57,10 +57,13 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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)
|
||||
@ -78,12 +81,14 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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 plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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)
|
||||
@ -176,12 +184,14 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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 plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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)
|
||||
@ -212,12 +225,14 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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,10 +242,54 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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.1.18 or higher installed
|
||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
||||
(
|
||||
($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 v3.1.18 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)
|
||||
@ -248,12 +307,14 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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.0.14 or higher before installing this plugin.', 'error');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// check that componentbuilder is installed
|
||||
@ -263,69 +324,38 @@ class plgContentComponentbuilderAdminHeadersTabsInstallerScript
|
||||
$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.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');
|
||||
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');
|
||||
$app->enqueueMessage('Please upgrade to JCB v3.1.18 or higher before installing this plugin.', '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
|
||||
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)
|
||||
)
|
||||
{
|
||||
$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');
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user