52
0

update - v1.0.3

This commit is contained in:
Llewellyn van der Merwe 2021-12-08 22:41:54 +02:00
parent 2b7e9ced42
commit f1400c41c2
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 Site Headers Tabs plugin.
*
* @package ComponentbuilderSiteHeadersTabs
* @since 1.0.2
* @since 1.0.3
*/
class PlgContentComponentbuilderSiteHeadersTabs extends CMSPlugin
{

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_COMPONENTBUILDERSITEHEADERSTABS</name>
<creationDate>3rd December, 2021</creationDate>
<creationDate>8th December, 2021</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.2</version>
<version>1.0.3</version>
<description>PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_XML_DESCRIPTION</description>
<!-- Scripts to run on installation -->

View File

@ -376,6 +376,50 @@
showon="add_site_views_controller:1"
button="true"
/>
<!-- Add_ajax_model Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_ajax_model"
label="PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_ADD_AJAX_MODEL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_YES</option>
<option value="0">
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_NO</option>
</field>
<!-- Ajax_model Field. Type: Editor. (joomla) -->
<field
type="editor"
name="ajax_model"
label="PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_AJAX_MODEL_LABEL"
description="PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_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_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_LABEL"
description="PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION"
class="list_class span12"
multiple="true"
default="0"
showon="add_ajax_model:1"
button="true"
/>
</fields>
</fieldset>
</fields>

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS="Content - Componentbuilder Site Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_DESCRIPTION="This plugin is used to set site class custom headers."
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Site Headers Tabs (v.1.0.2)</h1> <div style='clear: both;'></div><p>This plugin is used to set site 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_COMPONENTBUILDERSITEHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Site Headers Tabs (v.1.0.3)</h1> <div style='clear: both;'></div><p>This plugin is used to set site 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_COMPONENTBUILDERSITEHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_ADD_SITE_VIEW_MODEL_LABEL="Target Site View<br />Model Header"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_ADD_SITE_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_COMPONENTBUILDERSITEHEADERSTABS_SITE_VIEWS_CONTROLLER_DESCRIPTION="T
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_LABEL="Power Header<br />
<small>(site.views.controller)</small><br />
<b>getListQuery</b>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site 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_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site 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_COMPONENTBUILDERSITEHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model."
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model."

View File

@ -1,6 +1,6 @@
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS="Content - Componentbuilder Site Headers Tabs"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_DESCRIPTION="This plugin is used to set site class custom headers."
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Site Headers Tabs (v.1.0.2)</h1> <div style='clear: both;'></div><p>This plugin is used to set site 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_COMPONENTBUILDERSITEHEADERSTABS_XML_DESCRIPTION="<h1>Content - Componentbuilder Site Headers Tabs (v.1.0.3)</h1> <div style='clear: both;'></div><p>This plugin is used to set site 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_COMPONENTBUILDERSITEHEADERSTABS_CLASS_HEADERS="Class Headers"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_ADD_SITE_VIEW_MODEL_LABEL="Target Site View<br />Model Header"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_ADD_SITE_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_COMPONENTBUILDERSITEHEADERSTABS_SITE_VIEWS_CONTROLLER_DESCRIPTION="T
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_LABEL="Power Header<br />
<small>(site.views.controller)</small><br />
<b>getListQuery</b>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site 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_COMPONENTBUILDERSITEHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site 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_COMPONENTBUILDERSITEHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model<br />Class Header"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_AJAX_MODEL_LABEL="Class Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model."
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header<br />
<small>(ajax.model)</small>"
PLG_CONTENT_COMPONENTBUILDERSITEHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model."

View File

@ -43,11 +43,12 @@ class plgContentComponentbuilderSiteHeadersTabsInstallerScript
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');
$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;
}
// load the helper class
@ -60,8 +61,8 @@ class plgContentComponentbuilderSiteHeadersTabsInstallerScript
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 2.12.6 or higher installed
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && (($jcbVersion[1] == 12 && $jcbVersion[2] >= 6) || ($jcbVersion[1] > 12))) || $jcbVersion[0] >= 3))
// check that we have JCB 3 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3)
{
$blockInstall = false;
}
@ -69,7 +70,7 @@ class plgContentComponentbuilderSiteHeadersTabsInstallerScript
// allow install if all conditions are met
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;
}
}