52
0

Compare commits

...

41 Commits
5.x ... 4.x

Author SHA1 Message Date
319c64e789
Release of v4.0.0 2024-11-07 10:56:26 +02:00
976f3f7e4f
Release of v4.0.0 2024-10-13 17:35:12 +02:00
53f0aab067
Release of v4.0.0 2024-10-08 00:34:39 +02:00
64d1b6b2c4
Release of v4.0.0 2024-09-30 01:58:53 +02:00
d750aade2f
Release of v4.0.0 2024-09-20 03:03:09 +02:00
273bead98a
Release of v4.0.0 2024-09-19 05:50:18 +02:00
38e87173c2
Release of v4.0.0 2024-09-18 04:41:54 +02:00
a7357d3f6e
Release of v4.0.0 2024-08-23 19:51:16 +02:00
69c7f28dae
Release of v4.0.0 2024-08-21 21:38:56 +02:00
33de1ca8af
Release of v4.0.0 2024-08-20 22:35:50 +02:00
09f97fcaa9
Release of v4.0.0 2024-08-16 19:23:07 +02:00
463e2fb8b3
Release of v4.0.0 2024-08-15 01:38:49 +02:00
fa0299ac35
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-27 22:51:45 +02:00
031d423b5a
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-26 15:33:19 +02:00
a2e891b599
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-20 22:39:22 +02:00
434467f2bb
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 14:57:56 +02:00
a5b668f9af
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-17 02:38:33 +02:00
f4fea98d1d
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-08 22:54:12 +02:00
a32a6c9b4a
Update on v3.0.0 (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-28 03:50:30 +02:00
8686abcdab
Update on v3.0.0 (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-21 01:37:13 +02:00
f9eb5b3649
Update on v3.0.0 (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 23:07:37 +02:00
79ed7d4128
Update on v3.0.0 (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:38:32 +02:00
cb7ab7413f
Update on v3.0.0 (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 16:06:17 +02:00
8a914b477f
Update on v3.0.0 (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:22:56 +02:00
b68fa0bf61
Update on v3.0.0 (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:12:11 +02:00
dc175e0fef
Update on v3.0.0 (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:43:47 +02:00
f7e27e711c
Update on v3.0.0 (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:12:58 +02:00
b5ff162fd5
Update on v3.0.0 (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:42:14 +02:00
f6ded1c6d2
Update on v3.0.0 (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:51:57 +02:00
5fc5467669
Update on v3.0.0 (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:31:12 +02:00
318babf0fe
Update on v3.0.0 (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 01:07:22 +02:00
0ff21aba5b
Update on v3.0.0 (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 20:03:38 +02:00
b8bfd62138
Update on v3.0.0 (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:49:29 +02:00
fe1a595646
Update on v3.0.0 (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-07 11:54:20 +02:00
c78d07d0f3
Update on v3.0.0 (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 23:29:23 +02:00
8c171f2d16
Update on v3.0.0 (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:31:36 +02:00
74b8b6647f
Update on v3.0.0 (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:20:20 +02:00
e41a799757
Update on v3.0.0 (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:12:09 +02:00
0510e222ff
Update on v3.0.0 (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:50:20 +02:00
79bcbde0d0
Update on v3.0.0 (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 17:01:01 +02:00
972343a4eb
Release of v3.0.0 2024-03-11 16:14:23 +02:00
9 changed files with 87 additions and 403 deletions

View File

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.10" group="content" method="upgrade"> <extension type="plugin" version="4.0" group="content" method="upgrade">
<name>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS</name> <name>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS</name>
<creationDate>9th March, 2024</creationDate> <creationDate>7th November, 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>2.0.1</version> <version>4.0.0</version>
<namespace path="src">VDM\Plugin\Content\ComponentbuilderCustomAdminHeadersTabs</namespace>
<description>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION</description> <description>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION</description>
<!-- Scripts to run on installation --> <!-- Scripts to run on installation -->
@ -15,15 +16,16 @@
<!-- Language files --> <!-- Language files -->
<languages folder="language"> <languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_content_componentbuildercustomadminheaderstabs.ini</language> <language tag="en-GB">en-GB/plg_content_componentbuildercustomadminheaderstabs.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_content_componentbuildercustomadminheaderstabs.sys.ini</language> <language tag="en-GB">en-GB/plg_content_componentbuildercustomadminheaderstabs.sys.ini</language>
</languages> </languages>
<!-- Plugin files --> <!-- Plugin files -->
<files> <files>
<filename plugin="componentbuildercustomadminheaderstabs">componentbuildercustomadminheaderstabs.php</filename> <folder plugin="componentbuildercustomadminheaderstabs">services</folder>
<filename>index.html</filename> <filename>index.html</filename>
<folder>language</folder>
<folder>forms</folder> <folder>forms</folder>
<folder>services</folder>
<folder>src</folder>
</files> </files>
</extension> </extension>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- default paths of custom_admin_view form points to componentbuilder --> <!-- default paths of custom_admin_view form points to componentbuilder -->
<form <form
addrulepath="/administrator/components/com_componentbuilder/models/rules" addruleprefix="VDM\Component\Componentbuilder\Administrator\Rule"
addfieldpath="/administrator/components/com_componentbuilder/models/fields" addfieldprefix="VDM\Component\Componentbuilder\Administrator\Field"
> >
<fields name="params"> <fields name="params">
<fieldset name="custom_admin_view_headers" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS"> <fieldset name="custom_admin_view_headers" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS">
@ -59,6 +59,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -145,6 +146,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -231,6 +233,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -317,6 +320,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -403,6 +407,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -489,6 +494,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -575,6 +581,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -661,6 +668,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"
@ -746,6 +754,7 @@
name="power" name="power"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL" label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_LABEL"
class="list_class span12" class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
button="false" button="false"

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS="Content - Componentbuilder Custom Admin Headers Tabs" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS="Content - Componentbuilder Custom Admin Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_DESCRIPTION="This plugin is used to set custom admin class custom headers." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_DESCRIPTION="This plugin is used to set custom admin class custom headers."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Custom Admin Headers Tabs (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set custom 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 8th December, 2020</small></p>" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Custom Admin Headers Tabs (v.4.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set custom 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 10th March, 2024</small></p>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS="Class Headers" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View<br />Model Header" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View<br />Model Header"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a <b>getItem</b> as your <b>Main Get</b>." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a <b>getItem</b> as your <b>Main Get</b>."

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS="Content - Componentbuilder Custom Admin Headers Tabs" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS="Content - Componentbuilder Custom Admin Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_DESCRIPTION="This plugin is used to set custom admin class custom headers." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_DESCRIPTION="This plugin is used to set custom admin class custom headers."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Custom Admin Headers Tabs (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to set custom 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 8th December, 2020</small></p>" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Custom Admin Headers Tabs (v.4.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to set custom 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 10th March, 2024</small></p>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS="Class Headers" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View<br />Model Header" PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View<br />Model Header"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a <b>getItem</b> as your <b>Main Get</b>." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a <b>getItem</b> as your <b>Main Get</b>."

View File

@ -20,386 +20,8 @@ use Joomla\CMS\Filesystem\Folder;
/** /**
* Content - Componentbuilder Custom Admin Headers Tabs script file. * Content - Componentbuilder Custom Admin Headers Tabs script file.
* *
* @package PlgContentComponentbuilderCustomAdminHeadersTabs * @package ComponentbuilderCustomAdminHeadersTabs
*/ */
class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
{ {
/**
* 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)
{
// needs fix
// 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;
}
// 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;
}
// 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;
}
// 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.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)
{
// 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;
}
// 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.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)
{
// 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;
}
} }

1
services/index.html Normal file
View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

48
services/provider.php Normal file
View File

@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\DI\ServiceProviderInterface;
use Joomla\DI\Container;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Plugin\Content\ComponentbuilderCustomAdminHeadersTabs\Extension\ComponentbuilderCustomAdminHeadersTabs;
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
* @since 4.3.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = new ComponentbuilderCustomAdminHeadersTabs(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('content', 'componentbuildercustomadminheaderstabs')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};

View File

@ -8,27 +8,28 @@
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VDM\Plugin\Content\ComponentbuilderCustomAdminHeadersTabs\Extension;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Joomla\Utilities\ArrayHelper;
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Form\Form;
use Joomla\CMS\Plugin\CMSPlugin;
use VDM\Joomla\Utilities\ArrayHelper;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
/** /**
* Content - Componentbuilder Custom Admin Headers Tabs plugin. * Content - Componentbuilder Custom Admin Headers Tabs plugin.
* *
* @package ComponentbuilderCustomAdminHeadersTabs * @package ComponentbuilderCustomAdminHeadersTabs
* @since 2.0.1 * @since 4.0.0
*/ */
class PlgContentComponentbuilderCustomAdminHeadersTabs extends CMSPlugin final class ComponentbuilderCustomAdminHeadersTabs extends CMSPlugin
{ {
/** /**
* Affects constructor behavior. If true, language files will be loaded automatically. * Affects constructor behaviour. If true, language files will be loaded automatically.
* *
* @var boolean * @var boolean
* @since 1.0 * @since 1.0
@ -38,8 +39,8 @@ class PlgContentComponentbuilderCustomAdminHeadersTabs extends CMSPlugin
/** /**
* Runs on content preparation of form. * Runs on content preparation of form.
* *
* @param JForm $form The form * @param Form $form The form
* @param stdClass $data The data * @param \stdClass $data The data
* *
* @return boolean * @return boolean
* *
@ -53,11 +54,11 @@ class PlgContentComponentbuilderCustomAdminHeadersTabs extends CMSPlugin
if (strpos($context, 'com_componentbuilder.custom_admin_view') === 0) if (strpos($context, 'com_componentbuilder.custom_admin_view') === 0)
{ {
// Add the forms path // Add the forms path
Form::addFormPath(__DIR__ . '/forms'); Form::addFormPath(__DIR__ . '/../../forms');
// add the admin view params for privacy integration // add the admin view params for privacy integration
$form->loadFile('custom_admin_view'); $form->loadFile('custom_admin_view');
// update all editors to use this components global editor // update all editors to use this components global editor
$global_editor = \JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); $global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// set the field editor value (with none as fallback) // set the field editor value (with none as fallback)
$editors = $form->getXml()->xpath('descendant::fields[@name="custom_admin_view_headers"]//field[@type="editor"]'); $editors = $form->getXml()->xpath('descendant::fields[@name="custom_admin_view_headers"]//field[@type="editor"]');
// check if we found any // check if we found any

1
src/Extension/index.html Normal file
View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>