52
0

update - v1.0.2

This commit is contained in:
Llewellyn van der Merwe 2022-01-10 16:10:56 +02:00
parent 3fd78ed7bd
commit 075d9ee49c
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
5 changed files with 15 additions and 9 deletions

View File

@ -21,10 +21,11 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c
* Content - Componentbuilder Component Headers Tabs plugin.
*
* @package ComponentbuilderComponentHeadersTabs
* @since 1.0.1
* @since 1.0.2
*/
class PlgContentComponentbuilderComponentHeadersTabs extends CMSPlugin
{
/**
* Affects constructor behavior. If true, language files will be loaded automatically.
*
@ -47,7 +48,7 @@ class PlgContentComponentbuilderComponentHeadersTabs extends CMSPlugin
{
$context = $form->getName();
// When this is componentbuilder joomla component
// When this is componentbuilder joomla_component
if (strpos($context, 'com_componentbuilder.joomla_component') === 0)
{
// Add the forms path

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="content" method="upgrade">
<name>PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS</name>
<creationDate>7th January, 2022</creationDate>
<creationDate>10th January, 2022</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>1.0.1</version>
<version>1.0.2</version>
<description>PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION</description>
<!-- Scripts to run on installation -->

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS="Content - Componentbuilder Component Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_DESCRIPTION="This plugin is used to set component class custom headers."
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.1.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set component class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 26th December, 2020</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.1.0.2)</h1> <div style='clear: both;'></div><p>This plugin is used to set component class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 26th December, 2020</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_ADD_ADMIN_COMPONENT_LABEL="Admin Component<br />Header"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_YES="Yes"

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS="Content - Componentbuilder Component Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_DESCRIPTION="This plugin is used to set component class custom headers."
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.1.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set component class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 26th December, 2020</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.1.0.2)</h1> <div style='clear: both;'></div><p>This plugin is used to set component class custom headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 26th December, 2020</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_ADD_ADMIN_COMPONENT_LABEL="Admin Component<br />Header"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_YES="Yes"

View File

@ -61,8 +61,13 @@ class plgContentComponentbuilderComponentHeadersTabsInstallerScript
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3)
// check that we have JCB 3.0.5 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[0] > 3)
)
{
$blockInstall = false;
}
@ -70,7 +75,7 @@ class plgContentComponentbuilderComponentHeadersTabsInstallerScript
// 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-Pro v3.0.5 or higher before installing this plugin.', 'error');
return false;
}
}