commit 57b7df4e9190cd598d84b01017be1cc674ad5e83 Author: Llewellyn van der Merwe Date: Mon Jan 10 16:11:20 2022 +0200 first commit - v1.0.0 diff --git a/componentbuilderdynamicgetheaderstabs.php b/componentbuilderdynamicgetheaderstabs.php new file mode 100644 index 0000000..4f1d35f --- /dev/null +++ b/componentbuilderdynamicgetheaderstabs.php @@ -0,0 +1,74 @@ + + * @git 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\Form\Form; +use Joomla\CMS\Plugin\CMSPlugin; + +JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + +/** + * Content - Componentbuilder Dynamic Get Headers Tabs plugin. + * + * @package ComponentbuilderDynamicGetHeadersTabs + * @since 1.0.0 + */ +class PlgContentComponentbuilderDynamicGetHeadersTabs extends CMSPlugin +{ + + /** + * Affects constructor behavior. If true, language files will be loaded automatically. + * + * @var boolean + * @since 1.0 + */ + protected $autoloadLanguage = true; + + /** + * Runs on content preparation of form. + * + * @param JForm $form The form + * @param stdClass $data The data + * + * @return boolean + * + * @since 1.0 + */ + public function onContentPrepareForm(Form $form, $data) + { + $context = $form->getName(); + + // When this is componentbuilder dynamic_get + if (strpos($context, 'com_componentbuilder.dynamic_get') === 0) + { + // Add the forms path + Form::addFormPath(__DIR__ . '/forms'); + // add the admin view params for privacy integration + $form->loadFile('dynamic_get'); + // update all editors to use this components global editor + $global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none'); + // set the field editor value (with none as fallback) + $editors = $form->getXml()->xpath('descendant::fields[@name="dynamic_get_headers"]//field[@type="editor"]'); + // check if we found any + if (ComponentbuilderHelper::checkArray($editors)) + { + foreach ($editors as $editor) + { + // set the editor to the global option + $editor['editor'] = $global_editor . '|none'; + } + } + } + return true; + } +} diff --git a/componentbuilderdynamicgetheaderstabs.xml b/componentbuilderdynamicgetheaderstabs.xml new file mode 100644 index 0000000..a4efcaa --- /dev/null +++ b/componentbuilderdynamicgetheaderstabs.xml @@ -0,0 +1,31 @@ + + + PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS + 10th January, 2022 + Llewellyn van der Merwe + joomla@vdm.io + https://dev.vdm.io + Copyright (C) 2015 Vast Development Method. All rights reserved. + GNU General Public License version 2 or later; see LICENSE.txt + 1.0.0 + PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_XML_DESCRIPTION + + + script.php + + + + en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.ini + en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.sys.ini + + + + + componentbuilderdynamicgetheaderstabs.php + index.html + language + fields + forms + rules + + \ No newline at end of file diff --git a/fields/index.html b/fields/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/fields/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fields/powers.php b/fields/powers.php new file mode 100644 index 0000000..ebcbcd3 --- /dev/null +++ b/fields/powers.php @@ -0,0 +1,184 @@ + + * @git 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'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Powers Form Field class for the Componentbuilder component + */ +class JFormFieldPowers extends JFormFieldList +{ + /** + * The powers field type. + * + * @var string + */ + public $type = 'powers'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = JFactory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) JUri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = JFactory::getUser(); + // only add if user allowed to create power + if ($user->authorise('power.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit power + if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + jQuery(document).ready(function() { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { + e.preventDefault(); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + if (value > 0) { + // hide the create button + jQuery('#".$button_code_name."Create').hide(); + // show edit button + jQuery('#".$button_code_name."Edit').show(); + var url = 'index.php?option=com_componentbuilder&view=powers&task=power.edit&id='+value+'".$refJ."'; + jQuery('#".$button_code_name."Edit').attr('href', url); + } else { + // show the create button + jQuery('#".$button_code_name."Create').show(); + // hide edit button + jQuery('#".$button_code_name."Edit').hide(); + } + }"; + } + // check if button was created for power field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = JFactory::getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // Get the user object. + $user = JFactory::getUser(); + // Get the databse object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name','a.name','a.type','a.power_version'),array('id','power_admin_component_system_name','name','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // if none was found, we add this to set an alternative to set custom + if (!$items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_NONE_FOUND')); + } + if ($items) + { + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERCOMPONENTHEADERSTABS_SELECT_AN_OPTION')); + } + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->power_admin_component_system_name . ' [' . $item->type . ' ' . $item->name . '] (v' . $item->version . ')'); + } + } + return $options; + + } +} diff --git a/forms/dynamic_get.xml b/forms/dynamic_get.xml new file mode 100644 index 0000000..e03bd4a --- /dev/null +++ b/forms/dynamic_get.xml @@ -0,0 +1,794 @@ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/forms/index.html b/forms/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/forms/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.ini b/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.ini new file mode 100644 index 0000000..cf639aa --- /dev/null +++ b/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.ini @@ -0,0 +1,173 @@ +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS="Content - Componentbuilder Dynamic Get Headers Tabs" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_DESCRIPTION="This plugin is used to set dynamic gets class headers." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_XML_DESCRIPTION="

Content - Componentbuilder Dynamic Get Headers Tabs (v.1.0.0)

This plugin is used to set dynamic gets class headers.

Created by Llewellyn van der Merwe
Development started 10th January, 2022

" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CLASS_HEADERS="Class Headers" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_MODEL_LABEL="Target Site View
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_MODEL_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_YES="Yes" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_NO="No" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_MODEL_LABEL="Class Header
+(site.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_MODEL_DESCRIPTION="The class header for site view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_MODEL_LABEL="Power Header
+(site.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_MODEL_DESCRIPTION="The power header for site view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_HTML_LABEL="Target Site View
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_HTML_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_HTML_LABEL="Class Header Header
+(site.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_HTML_DESCRIPTION="The class header header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_HTML_LABEL="Power Header
+(site.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_HTML_DESCRIPTION="The power header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_LABEL="Target Site View
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_LABEL="Default Template Header
+(site.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_DESCRIPTION="The default template header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_LABEL="Power Header
+(site.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_DESCRIPTION="The power header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_CONTROLLER_LABEL="Target Site View
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_CONTROLLER_DESCRIPTION="Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_CONTROLLER_LABEL="Class Header
+(site.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_CONTROLLER_DESCRIPTION="The class header for site view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_CONTROLLER_LABEL="Power Header
+(site.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_CONTROLLER_DESCRIPTION="The power header for site view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_MODEL_LABEL="Target Site Views
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_MODEL_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_MODEL_LABEL="Class Header
+(site.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_MODEL_DESCRIPTION="The class header for site views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_MODEL_LABEL="Power Header
+(site.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_MODEL_DESCRIPTION="The power header for site views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_HTML_LABEL="Target Site Views
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_HTML_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_HTML_LABEL="Class Header
+(site.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_HTML_DESCRIPTION="The class header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_HTML_LABEL="Power Header
+(site.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_HTML_DESCRIPTION="The power header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_LABEL="Target Site Views
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_LABEL="Default Template Header
+(site.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_DESCRIPTION="The default template header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_LABEL="Power Header
+(site.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_DESCRIPTION="The power header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_CONTROLLER_LABEL="Target Site Views
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_CONTROLLER_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_CONTROLLER_LABEL="Class Header
+(site.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_CONTROLLER_DESCRIPTION="The class header for site views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_LABEL="Power Header
+(site.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Class Header
+(custom.admin.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="The class header for custom admin view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Power Header
+(custom.admin.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="The power header for custom admin view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_HTML_LABEL="Target Custom Admin View
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_HTML_LABEL="Class Header
+(custom.admin.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="The class header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_HTML_LABEL="Power Header
+(custom.admin.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="The power header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_LABEL="Target Custom Admin View
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_LABEL="Default Template Header
+(custom.admin.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_DESCRIPTION="The default template header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_LABEL="Power Header
+(custom.admin.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_DESCRIPTION="The power header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Target Custom Admin View
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Class Header
+(custom.admin.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="The class header for custom admin view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Power Header
+(custom.admin.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="The power header for custom admin view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Target Custom Admin Views
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Class Header
+(custom.admin.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="The class header for custom admin views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Power Header
+(custom.admin.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="The power header for custom admin views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Target Custom Admin Views
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Class Header
+(custom.admin.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="The class header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Power Header
+(custom.admin.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="The power header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_LABEL="Target Custom Admin Views
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_LABEL="Default Template Header
+(custom.admin.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_DESCRIPTION="The default template header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_LABEL="Power Header
+(custom.admin.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_DESCRIPTION="The power header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Target Custom Admin Views
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Class Header
+(custom.admin.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The class header for custom admin views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header
+(custom.admin.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_AJAX_MODEL_LABEL="Class Header
+(ajax.model)" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header
+(ajax.model)" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model." \ No newline at end of file diff --git a/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.sys.ini b/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.sys.ini new file mode 100644 index 0000000..cf639aa --- /dev/null +++ b/language/en-GB/en-GB.plg_content_componentbuilderdynamicgetheaderstabs.sys.ini @@ -0,0 +1,173 @@ +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS="Content - Componentbuilder Dynamic Get Headers Tabs" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_DESCRIPTION="This plugin is used to set dynamic gets class headers." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_XML_DESCRIPTION="

Content - Componentbuilder Dynamic Get Headers Tabs (v.1.0.0)

This plugin is used to set dynamic gets class headers.

Created by Llewellyn van der Merwe
Development started 10th January, 2022

" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CLASS_HEADERS="Class Headers" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_MODEL_LABEL="Target Site View
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_MODEL_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_YES="Yes" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_NO="No" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_MODEL_LABEL="Class Header
+(site.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_MODEL_DESCRIPTION="The class header for site view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_MODEL_LABEL="Power Header
+(site.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_MODEL_DESCRIPTION="The power header for site view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_HTML_LABEL="Target Site View
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_HTML_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_HTML_LABEL="Class Header Header
+(site.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_HTML_DESCRIPTION="The class header header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_HTML_LABEL="Power Header
+(site.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_HTML_DESCRIPTION="The power header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_LABEL="Target Site View
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_LABEL="Default Template Header
+(site.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_DESCRIPTION="The default template header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_LABEL="Power Header
+(site.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_DESCRIPTION="The power header for site view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_CONTROLLER_LABEL="Target Site View
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEW_CONTROLLER_DESCRIPTION="Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_CONTROLLER_LABEL="Class Header
+(site.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEW_CONTROLLER_DESCRIPTION="The class header for site view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_CONTROLLER_LABEL="Power Header
+(site.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEW_CONTROLLER_DESCRIPTION="The power header for site view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_MODEL_LABEL="Target Site Views
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_MODEL_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_MODEL_LABEL="Class Header
+(site.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_MODEL_DESCRIPTION="The class header for site views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_MODEL_LABEL="Power Header
+(site.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_MODEL_DESCRIPTION="The power header for site views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_HTML_LABEL="Target Site Views
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_HTML_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_HTML_LABEL="Class Header
+(site.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_HTML_DESCRIPTION="The class header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_HTML_LABEL="Power Header
+(site.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_HTML_DESCRIPTION="The power header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_LABEL="Target Site Views
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_LABEL="Default Template Header
+(site.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_DESCRIPTION="The default template header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_LABEL="Power Header
+(site.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_DESCRIPTION="The power header for site views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_CONTROLLER_LABEL="Target Site Views
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_SITE_VIEWS_CONTROLLER_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_CONTROLLER_LABEL="Class Header
+(site.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_SITE_VIEWS_CONTROLLER_DESCRIPTION="The class header for site views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_LABEL="Power Header
+(site.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_SITE_VIEWS_CONTROLLER_DESCRIPTION="The power header for site views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Target Custom Admin View
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Class Header
+(custom.admin.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="The class header for custom admin view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_MODEL_LABEL="Power Header
+(custom.admin.view.model)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_MODEL_DESCRIPTION="The power header for custom admin view model. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_HTML_LABEL="Target Custom Admin View
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_HTML_LABEL="Class Header
+(custom.admin.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="The class header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_HTML_LABEL="Power Header
+(custom.admin.view.html)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_HTML_DESCRIPTION="The power header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_LABEL="Target Custom Admin View
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_DESCRIPTION="Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_LABEL="Default Template Header
+(custom.admin.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_DESCRIPTION="The default template header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_LABEL="Power Header
+(custom.admin.view)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_DESCRIPTION="The power header for custom admin view. Only use this option if you have a getItem as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Target Custom Admin View
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Class Header
+(custom.admin.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="The class header for custom admin view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_CONTROLLER_LABEL="Power Header
+(custom.admin.view.controller)
+getItem" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEW_CONTROLLER_DESCRIPTION="The power header for custom admin view controller. Only use this option if you have a getItem as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Target Custom Admin Views
Model Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Class Header
+(custom.admin.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="The class header for custom admin views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_MODEL_LABEL="Power Header
+(custom.admin.views.model)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_MODEL_DESCRIPTION="The power header for custom admin views model. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Target Custom Admin Views
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Class Header
+(custom.admin.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="The class header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_HTML_LABEL="Power Header
+(custom.admin.views.html)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_HTML_DESCRIPTION="The power header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_LABEL="Target Custom Admin Views
Default Template Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_LABEL="Default Template Header
+(custom.admin.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_DESCRIPTION="The default template header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_LABEL="Power Header
+(custom.admin.views)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_DESCRIPTION="The power header for custom admin views. Only use this option if you have a getListQuery as your Main Get." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Target Custom Admin Views
Controller Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Class Header
+(custom.admin.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The class header for custom admin views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_LABEL="Power Header
+(custom.admin.views.controller)
+getListQuery" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_CUSTOM_ADMIN_VIEWS_CONTROLLER_DESCRIPTION="The power header for custom admin views controller. Only use this option if you have a getListQuery as your Main Get, and have custom code in the PHP (controller methods) under the Custom Buttons tab." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_ADD_AJAX_MODEL_LABEL="Target Ajax Model
Class Header" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_AJAX_MODEL_LABEL="Class Header
+(ajax.model)" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_AJAX_MODEL_DESCRIPTION="The class header for Ajax model." +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_AJAX_MODEL_LABEL="Power Header
+(ajax.model)" +PLG_CONTENT_COMPONENTBUILDERDYNAMICGETHEADERSTABS_POWER_AJAX_MODEL_DESCRIPTION="The power header for Ajax model." \ No newline at end of file diff --git a/language/en-GB/index.html b/language/en-GB/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/language/en-GB/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/language/index.html b/language/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/language/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rules/code.php b/rules/code.php new file mode 100644 index 0000000..8101f79 --- /dev/null +++ b/rules/code.php @@ -0,0 +1,53 @@ + + * @git 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('JPATH_PLATFORM') or die; + +use Joomla\CMS\Form\Form; +use Joomla\CMS\Form\FormRule; +use Joomla\Registry\Registry; + +/** + * Form Rule (Code) class for the Joomla Platform. + */ +class JFormRuleCode extends FormRule +{ + /** + * Method to test the value. + * + * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. + * @param Form $form The form object for which the field is being tested. + * + * @return boolean True if the value is valid, false otherwise. + */ + public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) + { + // This removes all validation (is dangerous) but needed to submit code via JCB + return true; + + /** + * My idea is to add some kind of validation to improve JCB code (per/language) + * + * So at this time this code validation is used for JavaScript,CSS,HTML and PHP. + * We can see what language is being worked on with the syntax property in the $element. (in JCB) + * What complicates things is the placeholders, of both custom code, component, and view names. + * Ideally we could strip them and then validate the code to being syntactically correct. + * But since some of the placeholders form part of the class/function names and the more, it seems like we are pressed for a much more advance solution. + * If you have any ideas to how we can go about to do this, then please open an issue on github and lets begin. (this is a nice to have, so don't break a leg...) + */ + } +} diff --git a/rules/index.html b/rules/index.html new file mode 100644 index 0000000..fa6d84e --- /dev/null +++ b/rules/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/script.php b/script.php new file mode 100644 index 0000000..43107bd --- /dev/null +++ b/script.php @@ -0,0 +1,85 @@ + + * @git 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'); + +/** + * Content - Componentbuilder Dynamic Get Headers Tabs script file. + * + * @package PlgContentComponentbuilderDynamicGetHeadersTabs + */ +class plgContentComponentbuilderDynamicGetHeadersTabsInstallerScript +{ + + /** + * Called before any type of action + * + * @param string $route Which action is happening (install|uninstall|discover_install|update) + * @param JAdapterInstance $adapter The object responsible for running this script + * + * @return boolean True on success + */ + public function preflight($route, JAdapterInstance $adapter) + { + // get application + $app = JFactory::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('JCB must first be installed from Joomla Component Builder.', '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.6 or higher installed + if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 && + ( + ($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 6) || + ($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-Pro v3.0.6 or higher before installing this plugin.', 'error'); + return false; + } + } + + return true; + } +}