52
0

update - v1.0.3

This commit is contained in:
Llewellyn van der Merwe 2021-12-08 22:41:36 +02:00
parent ad03accaa5
commit 335d4b68d0
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
6 changed files with 70 additions and 11 deletions

View File

@ -21,7 +21,7 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c
* Content - Componentbuilder Custom Admin Headers Tabs plugin. * Content - Componentbuilder Custom Admin Headers Tabs plugin.
* *
* @package ComponentbuilderCustomAdminHeadersTabs * @package ComponentbuilderCustomAdminHeadersTabs
* @since 1.0.2 * @since 1.0.3
*/ */
class PlgContentComponentbuilderCustomAdminHeadersTabs extends CMSPlugin class PlgContentComponentbuilderCustomAdminHeadersTabs extends CMSPlugin
{ {

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="content" method="upgrade"> <extension type="plugin" version="4" group="content" method="upgrade">
<name>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS</name> <name>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS</name>
<creationDate>3rd December, 2021</creationDate> <creationDate>8th December, 2021</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.0.2</version> <version>1.0.3</version>
<description>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION</description> <description>PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_XML_DESCRIPTION</description>
<!-- Scripts to run on installation --> <!-- Scripts to run on installation -->

View File

@ -376,6 +376,50 @@
showon="add_custom_admin_views_controller:1" showon="add_custom_admin_views_controller:1"
button="true" button="true"
/> />
<!-- Add_ajax_model Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_ajax_model"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_AJAX_MODEL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_YES</option>
<option value="0">
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_NO</option>
</field>
<!-- Ajax_model Field. Type: Editor. (joomla) -->
<field
type="editor"
name="ajax_model"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_MODEL_LABEL"
description="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_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_ajax_model:1"
/>
<!-- Power_ajax_model Field. Type: Powers. (custom) -->
<field
type="powers"
name="power_ajax_model"
label="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_LABEL"
description="PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION"
class="list_class span12"
multiple="true"
default="0"
showon="add_ajax_model:1"
button="true"
/>
</fields> </fields>
</fieldset> </fieldset>
</fields> </fields>

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.1.0.2)</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.1.0.3)</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_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>."
@ -83,4 +83,11 @@ PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header<br /> PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header<br />
<small>(custom.admin.views.controller)</small><br /> <small>(custom.admin.views.controller)</small><br />
<b>getListQuery</b>" <b>getListQuery</b>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a <b>getListQuery</b> as your <b>Main Get</b>, and have custom code in the <b>PHP (controller methods)</b> under the Custom Buttons tab." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a <b>getListQuery</b> as your <b>Main Get</b>, and have custom code in the <b>PHP (controller methods)</b> under the Custom Buttons tab."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model."

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.1.0.2)</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.1.0.3)</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_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>."
@ -83,4 +83,11 @@ PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header<br /> PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header<br />
<small>(custom.admin.views.controller)</small><br /> <small>(custom.admin.views.controller)</small><br />
<b>getListQuery</b>" <b>getListQuery</b>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a <b>getListQuery</b> as your <b>Main Get</b>, and have custom code in the <b>PHP (controller methods)</b> under the Custom Buttons tab." PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a <b>getListQuery</b> as your <b>Main Get</b>, and have custom code in the <b>PHP (controller methods)</b> under the Custom Buttons tab."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model."
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERCUSTOMADMINHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model."

View File

@ -43,11 +43,12 @@ class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
if ('install' === $route) if ('install' === $route)
{ {
// 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))
{ {
$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('JCB must first be installed from <a href="https://git.vdm.dev/joomla/Component-Builder-Pro/" target="_blank">Joomla Component Builder</a>.', 'error');
return false; return false;
} }
// load the helper class // load the helper class
@ -60,8 +61,8 @@ class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
{ {
// get the version // get the version
$jcbVersion = explode('.', $manifest->version); $jcbVersion = explode('.', $manifest->version);
// check that we have JCB 2.12.6 or higher installed // check that we have JCB 3 or higher installed
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && (($jcbVersion[1] == 12 && $jcbVersion[2] >= 6) || ($jcbVersion[1] > 12))) || $jcbVersion[0] >= 3)) if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3)
{ {
$blockInstall = false; $blockInstall = false;
} }
@ -69,7 +70,7 @@ class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
// allow install if all conditions are met // allow install if all conditions are met
if ($blockInstall) if ($blockInstall)
{ {
$app->enqueueMessage('Please upgrade to JCB 2.12.6 or higher before installing this plugin.', 'error'); $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.0 or higher before installing this plugin.', 'error');
return false; return false;
} }
} }