52
0

Compare commits

..

23 Commits
5.x ... 3.x

Author SHA1 Message Date
4b5acffedc
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-06-07 22:29:57 +02:00
40ace267c5
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-06-05 16:29:28 +02:00
16c928c733
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-16 15:13:36 +02:00
b0aafb7eda
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-13 12:23:57 +02:00
6070a3ac7a
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-10 18:07:21 +02:00
01345745bf
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-06 07:40:18 +02:00
2021c84dd8
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-03 07:54:09 +02:00
8201d70a20
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-02 16:10:47 +02:00
c4aa55cdc6
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-30 10:29:24 +02:00
eafedd6b66
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-27 15:45:07 +02:00
3b961b27cf
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-24 21:10:42 +02:00
2572920fef
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 15:32:19 +02:00
2251418e73
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 00:59:42 +02:00
4c4633f108
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-16 19:05:17 +02:00
75c0c4826c
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-09 13:07:08 +02:00
846bbc433b
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-06 19:48:58 +02:00
816a3137b2
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-27 15:04:19 +02:00
c3db4c75a6
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-26 22:30:10 +02:00
ec31369930
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-20 14:19:16 +02:00
3b6ed39a07
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-15 12:00:50 +02:00
1bd9f9bc89
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 12:40:25 +02:00
dbbea86dc4
Update on v2.0.1 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-11 16:56:07 +02:00
18fd689410
Update on v2.0.1 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-10 13:40:49 +02:00
6 changed files with 83 additions and 12 deletions

View File

@ -13,20 +13,23 @@
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Form\Form;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Plugin\CMSPlugin;
use VDM\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Component\ComponentHelper;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
/**
* Content - Componentbuilder Component Headers Tabs plugin.
*
* @package ComponentbuilderComponentHeadersTabs
* @since 3.0.0
* @since 2.0.1
*/
class PlgContentComponentbuilderComponentHeadersTabs extends CMSPlugin
{
/**
* Affects constructor behaviour. If true, language files will be loaded automatically.
* Affects constructor behavior. If true, language files will be loaded automatically.
*
* @var boolean
* @since 1.0
@ -36,8 +39,8 @@ class PlgContentComponentbuilderComponentHeadersTabs extends CMSPlugin
/**
* Runs on content preparation of form.
*
* @param Form $form The form
* @param \stdClass $data The data
* @param JForm $form The form
* @param stdClass $data The data
*
* @return boolean
*

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="5.0" group="content" method="upgrade">
<extension type="plugin" version="3.10" group="content" method="upgrade">
<name>PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS</name>
<creationDate>7th June, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
@ -7,7 +7,7 @@
<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>3.0.0</version>
<version>2.0.1</version>
<description>PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION</description>
<!-- Scripts to run on installation -->

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- default paths of joomla_component form points to componentbuilder -->
<form
addruleprefix="VDM\Component\Componentbuilder\Administrator\Rule"
addfieldprefix="VDM\Component\Componentbuilder\Administrator\Field"
addrulepath="/administrator/components/com_componentbuilder/models/rules"
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
<fields name="params">
<fieldset name="joomla_component_headers" label="PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_CLASS_HEADERS">

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.3.0.0)</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 10th March, 2024</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.2.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_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.3.0.0)</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 10th March, 2024</small></p>"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Component Headers Tabs (v.2.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_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_ADD_ADMIN_COMPONENT_LABEL="Admin Component<br />Header"
PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_YES="Yes"

View File

@ -24,4 +24,72 @@ use Joomla\CMS\Filesystem\Folder;
*/
class plgContentComponentbuilderComponentHeadersTabsInstallerScript
{
/**
* Called before any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install|update)
* @param Joomla\CMS\Installer\InstallerAdapter $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function preflight($route, $adapter)
{
// get application
$app = Factory::getApplication();
// the default for both install and update
$jversion = new JVersion();
if (!$jversion->isCompatible('3.8.0'))
{
$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');
return false;
}
if ('install' === $route)
{
// 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.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 v3.0.14 or higher before installing this plugin.', 'error');
return false;
}
}
return true;
}
}