From 694612aff99b7936d9576022b947e653f1d721da Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 13 Apr 2018 17:24:06 +0200 Subject: [PATCH] Urgent fix to the fields area to address the extra field options, and fields with 0 being removed. Added the option to add a field and not add it to the database, so it will show in the edit view but will not be stored to the database. This is to use javascript/php to use that field value, and then drop it. --- README.md | 10 +- admin/README.txt | 10 +- admin/assets/css/admin.css | 3 +- admin/controllers/ajax.json.php | 6 +- admin/helpers/compiler/c_Fields.php | 31 +-- admin/helpers/compiler/f_Infusion.php | 15 +- admin/helpers/componentbuilder.php | 25 ++- .../en-GB/en-GB.com_componentbuilder.ini | 30 ++- .../en-GB/en-GB.com_componentbuilder.sys.ini | 2 +- admin/layouts/fieldtype/fields_fullwidth.php | 10 +- admin/models/ajax.php | 150 ++++++++++---- admin/models/field.php | 19 +- admin/models/fields.php | 18 +- admin/models/fields/lang.php | 19 +- admin/models/forms/admin_fields.xml | 27 ++- admin/models/forms/field.js | 22 ++- admin/models/forms/field.xml | 184 +++++++++--------- admin/models/forms/language_translation.xml | 1 - admin/sql/install.mysql.utf8.sql | 8 +- admin/sql/updates/mysql/2.7.1.sql | 1 - admin/views/admin_fields/tmpl/edit.php | 124 +++++++++++- admin/views/admin_fields/view.html.php | 16 +- admin/views/fields/tmpl/default_body.php | 6 +- admin/views/fields/tmpl/default_head.php | 6 +- admin/views/fields/view.html.php | 2 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 21 +- script.php | 14 +- site/helpers/componentbuilder.php | 25 ++- .../en-GB/en-GB.com_componentbuilder.ini | 2 +- .../en-GB/en-GB.com_componentbuilder.sys.ini | 2 +- 31 files changed, 515 insertions(+), 300 deletions(-) delete mode 100644 admin/sql/updates/mysql/2.7.1.sql diff --git a/README.md b/README.md index 88d0891d3..030898ec3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th April, 2018 -+ *Version*: 2.7.2 ++ *Last Build*: 13th April, 2018 ++ *Version*: 2.7.3 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **189536** ++ *Line count*: **182289** + *Field count*: **1012** -+ *File count*: **1200** ++ *File count*: **1199** + *Folder count*: **193** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 88d0891d3..030898ec3 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -126,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 11th April, 2018 -+ *Version*: 2.7.2 ++ *Last Build*: 13th April, 2018 ++ *Version*: 2.7.3 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **189536** ++ *Line count*: **182289** + *Field count*: **1012** -+ *File count*: **1200** ++ *File count*: **1199** + *Folder count*: **193** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index bf5da1422..4c3bc0f4e 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -26,7 +26,8 @@ .no-click { pointer-events: none; } -.fieldMedium { width: 130px; } +.fieldMedium { width: 120px; } +.fieldMid { width: 80px; } .fieldFull { width: 100%; } .fieldSmall { width: 60px; } code { display: inline-block; margin: 3px;} diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 7fcabd6e3..67743dac7 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -972,11 +972,11 @@ class ComponentbuilderControllerAjax extends JControllerLegacy try { $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $fieldtypeValue = $jinput->get('fieldtype', NULL, 'INT'); $propertyValue = $jinput->get('property', NULL, 'WORD'); - if($fieldtypeValue && $propertyValue && $user->id != 0) + $fieldtypeValue = $jinput->get('fieldtype', NULL, 'ALNUM'); + if($propertyValue && $fieldtypeValue && $user->id != 0) { - $result = $this->getModel('ajax')->getFieldPropertyDesc($fieldtypeValue, $propertyValue); + $result = $this->getModel('ajax')->getFieldPropertyDesc($propertyValue, $fieldtypeValue); } else { diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index a05338a62..3e944137f 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2343,7 +2343,14 @@ class Fields extends Structure */ public function setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false) { - if ($typeName === 'tag') + // dbSwitch + $dbSwitch = true; + if (isset($field['list']) && $field['list'] == 2) + { + // do not add this field to the database + $dbSwitch = false; + } + elseif ($typeName === 'tag') { // set tags for this view but don't load to DB $this->tagsBuilder[$view_name_single] = $view_name_single; @@ -2402,12 +2409,12 @@ class Fields extends Structure $this->historyBuilder[$view_name_single] = $view_name_single; } // set Alias (only one title per view) - if (isset($field['alias']) && $field['alias'] && !isset($this->aliasBuilder[$view_name_single])) + if ($dbSwitch && isset($field['alias']) && $field['alias'] && !isset($this->aliasBuilder[$view_name_single])) { $this->aliasBuilder[$view_name_single] = $name; } // set Titles (only one title per view) - if (isset($field['title']) && $field['title'] && !isset($this->titleBuilder[$view_name_single])) + if ($dbSwitch && isset($field['title']) && $field['title'] && !isset($this->titleBuilder[$view_name_single])) { $this->titleBuilder[$view_name_single] = $name; } @@ -2467,7 +2474,7 @@ class Fields extends Structure $this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"'; } // set all int fields of this view - if ($field['settings']->datatype === 'INT' || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT') + if ($dbSwitch && ($field['settings']->datatype === 'INT' || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT')) { if (!isset($this->intFieldsBuilder[$view_name_single])) { @@ -2493,7 +2500,7 @@ class Fields extends Structure } // TODO we may need to add a switch instead (since now it uses the first editor field) // set the main(biggest) text field of this view - if ($typeName === 'editor') + if ($dbSwitch && $typeName === 'editor') { if (!isset($this->maintextBuilder[$view_name_single]) || !ComponentbuilderHelper::checkString($this->maintextBuilder[$view_name_single])) { @@ -2525,7 +2532,7 @@ class Fields extends Structure $this->setScriptMediaSwitch[$typeName] = $typeName; } // setup gategory for this view - if ($typeName === 'category') + if ($dbSwitch && $typeName === 'category') { if (isset($this->catOtherName[$view_name_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$view_name_list])) { @@ -2542,12 +2549,12 @@ class Fields extends Structure $this->catCodeBuilder[$view_name_single] = array('code' => $name, 'views' => $otherViews, 'view' => $otherView); } // setup checkbox for this view - if ($typeName === 'checkbox' || (ComponentbuilderHelper::checkArray($custom) && isset($custom['extends']) && $custom['extends'] === 'checkboxes')) + if ($dbSwitch && ($typeName === 'checkbox' || (ComponentbuilderHelper::checkArray($custom) && isset($custom['extends']) && $custom['extends'] === 'checkboxes'))) { $this->checkboxBuilder[$view_name_single][] = $name; } // setup checkboxes and other json items for this view - if (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag') + if ($dbSwitch && (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag')) { switch ($field['settings']->store) { @@ -2614,7 +2621,7 @@ class Fields extends Structure } } // build the data for the export & import methods $typeName === 'repeatable' || - if (($typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options)) + if ($dbSwitch && (($typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options))) { $this->getItemsMethodEximportStringFixBuilder[$view_name_single][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store); } @@ -2626,18 +2633,18 @@ class Fields extends Structure $this->selectionTranslationFixBuilder[$view_name_list][$name] = $options; } // build the sort values - if ((isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) + if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) { $this->sortBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options); } // build the search values - if (isset($field['search']) && $field['search'] == 1) + if ($dbSwitch && isset($field['search']) && $field['search'] == 1) { $_list = (isset($field['list'])) ? $field['list'] : 0; $this->searchBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list); } // build the filter values - if ((isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) + if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform')) { $this->filterBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $view_name_single, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options); } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 372e0b23c..47b9ae014 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1162,8 +1162,7 @@ class Infusion extends Interpretation } /** - * Build the lang values and insert to fiel - * + * Build the language values and insert into file * * @return boolean on success * @@ -1211,6 +1210,8 @@ class Infusion extends Interpretation $langXML = array(); foreach ($this->languages as $tag => $areas) { + // trim the tag + $tag = trim($tag); foreach ($areas as $area => $languageStrings) { // only log messages for none en-GB translations @@ -1264,13 +1265,11 @@ class Infusion extends Interpretation // count the file created $this->fileCount++; // add content to it - $lang = ''; - foreach ($languageStrings as $place => $string) - { - $lang .= $place . '="' . $string . '"' . PHP_EOL; - } + $lang = array_map(function ($langstring, $placeholder) { + return $placeholder . '="' . $langstring . '"'; + }, $languageStrings, array_keys($languageStrings)); // add to language file - $this->writeFile($path . '/' . $fileName, $lang); + $this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang)); // set the line counter $this->lineCount = $this->lineCount + substr_count($lang, PHP_EOL); // build xml strings diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 6d9a87487..3fa015523 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1606,6 +1606,8 @@ abstract class ComponentbuilderHelper 'description' => $result->description); // number pointer $nr = 0; + // value to check since there are false and null values even 0 in the values returned + $confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB'; // set the headers $field['values_description'] .= ''.JText::_('COM_COMPONENTBUILDER_PROPERTY').''.JText::_('COM_COMPONENTBUILDER_EXAMPLE').''.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').''; foreach ($properties as $property) @@ -1613,7 +1615,7 @@ abstract class ComponentbuilderHelper $example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : ''; $field['values_description'] .= ''.$property['name'].''.$example.''.$property['description'].''; // check if we should load the value - $value = self::getValueFromXMLstring($xml, $property['name']); + $value = self::getValueFromXMLstring($xml, $property['name'], $confirmation); if(self::checkArray($settings) && isset($settings[$property['name']])) { // add the xml values @@ -1623,12 +1625,12 @@ abstract class ComponentbuilderHelper // add the name List Options as set $field['nameListOptionsSet'][$property['name']] = $property['name']; } - elseif (!$xml || $value) + elseif (!$xml || $confirmation !== $value) { // add the xml values - $field['values'] .= "\n\t" . $property['name'] . '="'. ($value) ? $value : $property['example'] .'" '; + $field['values'] .= "\n\t" . $property['name'] . '="'. ($confirmation !== $value) ? $value : $property['example'] .'" '; // add the json values - $field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($value) ? $value : $property['example'], 'desc' => $property['description']); + $field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($confirmation !== $value) ? $value : $property['example'], 'desc' => $property['description']); } // add the name List Options $field['nameListOptions'][$property['name']] = $property['name']; @@ -1643,17 +1645,13 @@ abstract class ComponentbuilderHelper return false; } - public static function getValueFromXMLstring($xml, $get) + public static function getValueFromXMLstring($xml, $get, $confirmation) { if (self::checkString($xml)) { - $value = self::getBetween($xml, $get.'="', '"'); - if (self::checkString($value)) - { - return $value; - } + return self::getBetween($xml, $get.'="', '"', $confirmation); } - return false; + return $confirmation; } @@ -1833,11 +1831,12 @@ abstract class ComponentbuilderHelper * @param string $content The content to search * @param string $start The starting value * @param string $end The ending value + * @param string $default The default value if none found * * @return string On success / empty string on failure * */ - public static function getBetween($content, $start, $end) + public static function getBetween($content, $start, $end, $default = '') { $r = explode($start, $content); if (isset($r[1])) @@ -1845,7 +1844,7 @@ abstract class ComponentbuilderHelper $r = explode($end, $r[1]); return $r[0]; } - return ''; + return $default; } /** diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 502a72463..1afa0e238 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -93,6 +93,7 @@ COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED="%s Admins Fields unfeatur COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED_1="%s Admin Fields unfeatured." COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED="%s Admins Fields unpublished." COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields unpublished." +COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR="Admin Behaviour" COM_COMPONENTBUILDER_ADMIN_FIELDS="Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS_ABOVE_TABS="Above Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS="Addfields" @@ -168,6 +169,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_DESC="The user that created this Ad COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_DESC="The date this Admin Fields was created." COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_ADMIN_FIELDS_DEFAULT="Default" COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT="Editing the Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS_EDITING="Editing" COM_COMPONENTBUILDER_ADMIN_FIELDS_ERROR_UNIQUE_ALIAS="Another Admin Fields has the same alias." @@ -183,14 +185,15 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_IN_TAB="Left in Tab" COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_OF_TABS="Left of Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_DESCRIPTION="Select if the field is to be used as a link to a single record, if shown." COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_LABEL="Link" -COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_DESCRIPTION="Select if this field should show in the list view." -COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_LABEL="Admin List" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_DESCRIPTION="behaviour" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_LABEL="Admin" COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_DESC="The last user that modified this Admin Fields." COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_LABEL="Modified By" COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields was modified." COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE="None" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB="None DB" COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)
For more help please watch this tutorial." COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views." COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering" @@ -207,6 +210,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_OF_TABS="Right of Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields to customise the alias." COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_DESCRIPTION="Select if the field is to be searchable in list view, if shown." COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_LABEL="Searchable" +COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_LIST_VIEW="Show in list view" COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_DESCRIPTION="Select if the field should be sortable in list view, if shown." COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable" COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status" @@ -218,7 +222,6 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_LABEL="Title" COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised." COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Revision" -COM_COMPONENTBUILDER_ADMIN_LIST="Admin List" COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View" COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access" @@ -3224,10 +3227,12 @@ COM_COMPONENTBUILDER_DASHBOARD_TEMPLATE_ADD="Add Template

" COM_COMPONENTBUILDER_DASHBOARD_VALIDATION_RULES="Validation Rules

" COM_COMPONENTBUILDER_DATE="Date" COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)" +COM_COMPONENTBUILDER_DEFAULT="Default" COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)" COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View" COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DETAILS="Details" +COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS="Display switch for dynamic placement in relation to the use of the field in menu and global configuration options." COM_COMPONENTBUILDER_DIVERGED="Diverged" COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local snippet (with the same name, library and type) has a diverged from the community snippet (with the same name, library and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install." @@ -3582,6 +3587,7 @@ COM_COMPONENTBUILDER_EXPORT_DATA="Export Data" COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data." COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed" COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" +COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL="Extra properties like (listclass, escape, display, validate)
Here you can set the extra properties for this field" COM_COMPONENTBUILDER_FIELD="Field" COM_COMPONENTBUILDER_FIELDS="Fields" COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access" @@ -5306,7 +5312,7 @@ COM_COMPONENTBUILDER_LOCAL="Local" COM_COMPONENTBUILDER_LOCAL_GET="Local (get)" COM_COMPONENTBUILDER_LOCAL_SNIPPET="Local snippet" COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" -COM_COMPONENTBUILDER_MATCH_BEHAVIOR="Match Behavior" +COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour" COM_COMPONENTBUILDER_MATCH_FIELD="Match Field" COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options" COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" @@ -5321,6 +5327,7 @@ COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_SNIPPET_AS_NEW="New means that we could not find a local snippet with the same name, library and type, and so have marked this snippet as new." COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" +COM_COMPONENTBUILDER_NONE_DB="None DB" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COMPONENTBUILDER_NOT_SET="not set" @@ -5341,6 +5348,7 @@ COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_ COM_COMPONENTBUILDER_NO_TYPE="No Type" COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found." COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages" +COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the None DB option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database." COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" @@ -5371,7 +5379,7 @@ COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="P COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later" COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder" COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading" -COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties
Here you can set the properties for this field" +COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties
Here you can set the properties for this field." COM_COMPONENTBUILDER_PROPERTY="Property" COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another." COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name" @@ -5550,13 +5558,16 @@ COM_COMPONENTBUILDER_SERVER_USERNAME_LABEL="Username
(encrypted fiel COM_COMPONENTBUILDER_SERVER_USERNAME_MESSAGE="Error! Please add the username here." COM_COMPONENTBUILDER_SERVER_VERSION_DESC="A count of the number of times this Server has been revised." COM_COMPONENTBUILDER_SERVER_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD="Set a class value for the list view of this field." COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?" COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set." +COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW="Should this field be escaped in the list view." COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import." COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported." COM_COMPONENTBUILDER_SHOW="Show" +COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW="Show in list view" COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SITE_VIEW="Site View" @@ -6246,7 +6257,7 @@ COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported" COM_COMPONENTBUILDER_S_NOT_LINKED="%s Not Linked" COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please wait! The component is being compiled" COM_COMPONENTBUILDER_TAB="Tab" -COM_COMPONENTBUILDER_TARGET_BEHAVIOR="Target Behavior" +COM_COMPONENTBUILDER_TARGET_BEHAVIOUR="Target Behaviour" COM_COMPONENTBUILDER_TARGET_FIELDS="Target Field/s" COM_COMPONENTBUILDER_TARGET_PATH="Target Path" COM_COMPONENTBUILDER_TARGET_RELATION="Target Relation" @@ -6376,12 +6387,16 @@ COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOU COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info." COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, no view or id found in session or view not allowed to access area, we could not load any linked to values. Please inform your system administrator!" COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.
Some of these packages would require a key, since they are not free. Get a key today!." +COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if None DB option is selected." +COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if Show in list view option is selected." COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:" +COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The None DB option will remove this field from being saved in the database." COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The phpseclib\NET\SFTP library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info" COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The %s file could not be moved to %s path on %s server." COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The %s file could not be moved to %s server." COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The %s library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info!" COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The %s library can not be deleted, or things will break." +COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW="The Show in list view option will Add this field to the admin list view." COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views" COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config" COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus" @@ -6416,6 +6431,7 @@ COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TITLE="Title" COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE="To add simply copy and past the snippet into your code." +COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED="To add validation to a field if validation is not part of field type properties loaded above. So if you have validation set as a field property this extra property will not be needed." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TO_SHARE_THESE_SNIPPETS_WITH_THE_REST_OF_THE_JCB_COMMUNITY="To share these snippets with the rest of the JCB community," @@ -6564,4 +6580,4 @@ COM_COMPONENTBUILDER_ZIPPED_FILE_LOCATION="Zipped File Location" COM_COMPONENTBUILDER__SELECT_COMPONENT_="- Select Component -" COM_COMPONENTBUILDER__SELECT_PACKAGE_="- Select Package -" COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S=", since you don't have permission to create %s!" -COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!" +COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!" \ No newline at end of file diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 1a9103480..137fd7205 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -790,4 +790,4 @@ COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this grou COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import" COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules" COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu" -COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule" +COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule" \ No newline at end of file diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 1f0b6321e..756a78bda 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -61,10 +61,10 @@ $can = ComponentbuilderHelper::getActions('field'); - + - + @@ -104,6 +104,9 @@ $can = ComponentbuilderHelper::getActions('field'); null_switch); ?> + + store); ?> + authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> escape($item->category_title); ?> @@ -111,9 +114,6 @@ $can = ComponentbuilderHelper::getActions('field'); escape($item->category_title); ?> - - store); ?> - published == 1):?> diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 236a31211..6422e2aea 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -387,7 +387,7 @@ class ComponentbuilderModelAjax extends JModelList 'type' => 'setURLType', // Admin View 'field' => 'setItemNames', - 'list' => 'setYesNo', + 'list' => 'setAdminBehaviour', 'title' => 'setYesNo', 'alias' => 'setYesNo', 'sort' => 'setYesNo', @@ -433,7 +433,7 @@ class ComponentbuilderModelAjax extends JModelList 'update' => JText::_('COM_COMPONENTBUILDER_UPDATE'), // Admin View (fields) 'field' => JText::_('COM_COMPONENTBUILDER_FIELD'), - 'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_LIST'), + 'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR'), 'order_list' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS'), 'title' => JText::_('COM_COMPONENTBUILDER_TITLE'), 'alias' => JText::_('COM_COMPONENTBUILDER_ALIAS'), @@ -447,10 +447,10 @@ class ComponentbuilderModelAjax extends JModelList 'order_edit' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_EDIT'), // Admin View (conditions) 'target_field' => JText::_('COM_COMPONENTBUILDER_TARGET_FIELDS'), - 'target_behavior' => JText::_('COM_COMPONENTBUILDER_TARGET_BEHAVIOR'), + 'target_behavior' => JText::_('COM_COMPONENTBUILDER_TARGET_BEHAVIOUR'), 'target_relation' => JText::_('COM_COMPONENTBUILDER_TARGET_RELATION'), 'match_field' => JText::_('COM_COMPONENTBUILDER_MATCH_FIELD'), - 'match_behavior' => JText::_('COM_COMPONENTBUILDER_MATCH_BEHAVIOR'), + 'match_behavior' => JText::_('COM_COMPONENTBUILDER_MATCH_BEHAVIOUR'), 'match_options' => JText::_('COM_COMPONENTBUILDER_MATCH_OPTIONS'), // Joomla Component 'menu' => JText::_('COM_COMPONENTBUILDER_ADD_MENU'), @@ -889,6 +889,22 @@ class ComponentbuilderModelAjax extends JModelList return $this->user->authorise($view.'.edit', 'com_componentbuilder.'.$view.'.' . (int) $id); } + protected function setAdminBehaviour($header, $value) + { + switch ($value) + { + case 1: + return JText::_('COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW'); + break; + case 2: + return JText::_('COM_COMPONENTBUILDER_NONE_DB'); + break; + default: + return JText::_('COM_COMPONENTBUILDER_DEFAULT'); + break; + } + } + protected $tabNames = array(); protected function setTabName($header, $value) @@ -2200,6 +2216,13 @@ class ComponentbuilderModelAjax extends JModelList } // Used in field + // the current extras available + protected $extraFieldProperties = array( + 'listclass' => 'COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD', + 'escape' => 'COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW', + 'display' => 'COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS', + 'validate' => 'COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED'); + public function getFieldOptions($fieldtype) { // get the xml @@ -2207,17 +2230,54 @@ class ComponentbuilderModelAjax extends JModelList // now get the field options if ($field = ComponentbuilderHelper::getFieldOptions($fieldtype, 'id', null, $xml)) { + // get subform field properties object + $properties = $this->buildFieldOptionsSubform($field['subform'], $field['nameListOptions']); + // load the extra options + $extraValues = $this->getFieldExtraValues($xml, $field['nameListOptions']); + // set the nameListOption + $extraNameListOption = $this->extraFieldProperties; + array_walk($extraNameListOption, function (&$value, $key) { + $value = $key; + }); // get subform field object - $subform = $this->buildFieldOptionsSubform($field['subform'], $field['nameListOptions']); + $extras = $this->buildFieldOptionsSubform($extraValues, $extraNameListOption, 'extraproperties', 'COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL'); // load the html - $field['subform'] = '
'. $subform->label . '
' . $subform->input . '
'; + $field['subform'] = '
'. $properties->label . '
' . $properties->input . '
'; + $field['extra'] = '
'. $extras->label . '
' . $extras->input . '
'; // return found field options return $field; } return false; } - protected function buildFieldOptionsSubform($values, $nameListOptions = null) + protected function getFieldExtraValues($xml, $options) + { + // get the value + $values = array(); + // value to check since there are false and null values even 0 in the values returned + $confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB'; + $nr = 0; + foreach ($this->extraFieldProperties as $extra => $desc) + { + if (!in_array($extra, $options)) + { + $value = ComponentbuilderHelper::getValueFromXMLstring($xml, $extra, $confirmation); + if ($confirmation !== $value) + { + $values['extraproperties' . $nr] = array('name' => $extra, 'value' => $value, 'desc' => JText::_($desc)); + $nr++; + } + } + } + // return only if extras founb + if (ComponentbuilderHelper::checkArray($values)) + { + return $values; + } + return null; + } + + protected function buildFieldOptionsSubform($values, $nameListOptions = null, $name = 'properties', $label = 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL') { // get the subform $subform = JFormHelper::loadFieldType('subform', true); @@ -2226,12 +2286,12 @@ class ComponentbuilderModelAjax extends JModelList // subform attributes $subformAttribute = array( 'type' => 'subform', - 'name' => 'properties', - 'label' => 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL', + 'name' => $name, + 'label' => $label, 'layout' => 'joomla.form.field.subform.repeatable-table', 'multiple' => 'true', 'icon' => 'list', - 'max' => (int) count($nameListOptions)); + 'max' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? (int) count($nameListOptions) : 4); // load the subform attributes ComponentbuilderHelper::xmlAddAttributes($subformXML, $subformAttribute); // now add the subform child form @@ -2260,7 +2320,7 @@ class ComponentbuilderModelAjax extends JModelList { $nameAttribute['description'] = 'COM_COMPONENTBUILDER_SELECTION'; $nameAttribute['multiple'] = 'false'; - $nameAttribute['onchange'] = "getFieldPropertyDesc(this)"; + $nameAttribute['onchange'] = "getFieldPropertyDesc(this, '".$name."')"; } else { @@ -2318,46 +2378,56 @@ class ComponentbuilderModelAjax extends JModelList return $subform; } - public function getFieldPropertyDesc($fieldtype, $_property) + public function getFieldPropertyDesc($_property, $fieldtype) { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array('properties', 'short_description', 'description'))); - $query->from($db->quoteName('#__componentbuilder_fieldtype')); - $query->where($db->quoteName('id') . ' = '. $fieldtype); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) + if (is_numeric($fieldtype)) { - // get the result - $result = $db->loadObject(); - // get the xml - $xml = $this->getFieldXML($fieldtype); - // open the properties - $properties = json_decode($result->properties,true); - // make sure we have an array - if (ComponentbuilderHelper::checkArray($properties)) + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('properties', 'short_description', 'description'))); + $query->from($db->quoteName('#__componentbuilder_fieldtype')); + $query->where($db->quoteName('id') . ' = '. (int) $fieldtype); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) { - foreach ($properties as $property) + // get the result + $result = $db->loadObject(); + // get the xml + $xml = $this->getFieldXML($fieldtype); + // open the properties + $properties = json_decode($result->properties,true); + // value to check since there are false and null values even 0 in the values returned + $confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB'; + // make sure we have an array + if (ComponentbuilderHelper::checkArray($properties)) { - if(isset($property['name']) && $_property === $property['name']) + foreach ($properties as $property) { - // check if we should load the value - if (!$value = ComponentbuilderHelper::getValueFromXMLstring($xml, $property['name'])) + if(isset($property['name']) && $_property === $property['name']) { - $value = (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) ? $property['example'] : ''; + // check if we should load the value + $value = ComponentbuilderHelper::getValueFromXMLstring($xml, $property['name'], $confirmation); + if ($confirmation === $value) + { + $value = (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) ? $property['example'] : ''; + } + // return the found values + return array('value' => $value, 'desc' => $property['description']); } - // return the found values - return array('value' => $value, 'desc' => $property['description']); } } } } + elseif (isset($this->extraFieldProperties[$_property])) + { + return array('value' => '', 'desc' => JText::_($this->extraFieldProperties[$_property])); + } return false; } diff --git a/admin/models/field.php b/admin/models/field.php index 6a4521eb0..ba4f2e50e 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -891,6 +891,8 @@ class ComponentbuilderModelField extends JModelAdmin // get the properties $properties = $input->get('properties', null, 'ARRAY'); + // get the extra properties + $extraproperties = $input->get('extraproperties', null, 'ARRAY'); // make sure we have an array if (ComponentbuilderHelper::checkArray($properties)) { @@ -899,9 +901,7 @@ class ComponentbuilderModelField extends JModelAdmin foreach($properties as $property) { // make sure we have the correct values - if (ComponentbuilderHelper::checkArray($property) && - isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) && - isset($property['value']) && ComponentbuilderHelper::checkString($property['value'])) + if (ComponentbuilderHelper::checkArray($property) && isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) && isset($property['value'])) { // fix the name $property['name'] = ComponentbuilderHelper::safeString($property['name']); @@ -918,6 +918,19 @@ class ComponentbuilderModelField extends JModelAdmin $bucket[] = "\t".$property['name'].'="'. str_replace('"', """, $property['value']).'"'; } } + // make sure we have an array + if (ComponentbuilderHelper::checkArray($extraproperties)) + { + foreach($extraproperties as $xproperty) + { + // make sure we have the correct values + if (ComponentbuilderHelper::checkArray($xproperty) && isset($xproperty['name']) && ComponentbuilderHelper::checkString($xproperty['name']) && isset($xproperty['value'])) + { + // load the extra property + $bucket[] = "\t".ComponentbuilderHelper::safeString($xproperty['name']).'="'. str_replace('"', """, $xproperty['value']).'"'; + } + } + } // if the bucket has been loaded if (ComponentbuilderHelper::checkArray($bucket)) { diff --git a/admin/models/fields.php b/admin/models/fields.php index bf0e4ca0d..e255685e7 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -49,10 +49,10 @@ class ComponentbuilderModelFields extends JModelList 'a.datatype','datatype', 'a.indexes','indexes', 'a.null_switch','null_switch', + 'a.store','store', 'c.title','category_title', 'c.id', 'category_id', - 'a.catid', 'catid', - 'a.store','store' + 'a.catid', 'catid' ); } @@ -88,6 +88,9 @@ class ComponentbuilderModelFields extends JModelList $null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch'); $this->setState('filter.null_switch', $null_switch); + $store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store'); + $this->setState('filter.store', $store); + $category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category'); $this->setState('filter.category', $category); @@ -95,10 +98,7 @@ class ComponentbuilderModelFields extends JModelList $this->setState('filter.category_id', $categoryId); $catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); - $this->setState('filter.catid', $catid); - - $store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store'); - $this->setState('filter.store', $store); + $this->setState('filter.catid', $catid); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); @@ -313,7 +313,7 @@ class ComponentbuilderModelFields extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.' OR a.xml LIKE '.$search.')'); + $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.store LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.')'); } } @@ -504,10 +504,10 @@ class ComponentbuilderModelFields extends JModelList $id .= ':' . $this->getState('filter.datatype'); $id .= ':' . $this->getState('filter.indexes'); $id .= ':' . $this->getState('filter.null_switch'); + $id .= ':' . $this->getState('filter.store'); $id .= ':' . $this->getState('filter.category'); $id .= ':' . $this->getState('filter.category_id'); - $id .= ':' . $this->getState('filter.catid'); - $id .= ':' . $this->getState('filter.store'); + $id .= ':' . $this->getState('filter.catid'); return parent::getStoreId($id); } diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index 139a445bd..acf4d578c 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -49,23 +49,6 @@ class JFormFieldLang extends JFormFieldList */ public function getOptions() { - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name'))); - $query->from($db->quoteName('#__componentbuilder_language', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.langtag ASC'); - $db->setQuery((string)$query); - $items = $db->loadObjectList(); - $options = array(); - if ($items) - { - $options[] = JHtml::_('select.option', '', 'Select an option'); - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->langtag, $item->language_name . ' (' .$item->langtag.')'); - } - } - return $options; + return null; } } diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index 82d172814..131580f77 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -118,28 +118,36 @@ required="false" button="false" /> - + + class="fieldMedium count-the-items1235" + multiple="false" + required="false" + onchange="checkAdminBehaviour(this)"> + + + + + + required="false"> diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index fb7190970..f46323ec2 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -598,7 +598,9 @@ function getFieldOptions(fieldtype){ jQuery('.prop_removal').remove(); // hide notice jQuery('.note_select_field_type').closest('.control-group').remove(); - // append to the closed to xml (hidden field) + // append to note_filter_information class + jQuery('.note_filter_information').closest('.control-group').prepend(result.extra); + // append to note_filter_information class jQuery('.note_filter_information').closest('.control-group').prepend(result.subform); // add the watcher rowWatcher(); @@ -613,7 +615,7 @@ function getFieldOptions(fieldtype){ }) } -function getFieldPropertyDesc(field){ +function getFieldPropertyDesc(field, targetForm){ // get the ID var id = jQuery(field).attr('id'); // build the target array @@ -621,7 +623,7 @@ function getFieldPropertyDesc(field){ // get property value var property = jQuery(field).val(); // first check that there isn't any of this property type already set - if (propertyIsSet(property, id)) { + if (propertyIsSet(property, id, targetForm)) { // reset the selection jQuery('#'+id).val(''); jQuery('#'+id).trigger("liszt:updated"); @@ -634,9 +636,13 @@ function getFieldPropertyDesc(field){ // do a dynamic update propertyDynamicSet(); // get type value - var fieldtype = jQuery("#jform_fieldtype option:selected").val(); + if (targetForm === 'properties') { + var fieldtype = jQuery("#jform_fieldtype option:selected").val(); + } else { + var fieldtype = 'extra'; + } getFieldPropertyDesc_server(fieldtype, property).done(function(result) { - if(result.desc && result.value){ + if(result.desc || result.value){ // update the values jQuery('#'+target[0]+'__desc').val(result.desc); jQuery('#'+target[0]+'__value').val(result.value); @@ -704,11 +710,11 @@ function rowWatcher() { }); } -function propertyIsSet(prop, id) { +function propertyIsSet(prop, id, targetForm) { var i; for (i = 0; i < 70; i++) { // for now this is the number of field we should check // build ID - var id_check = rowIdKey+'_'+rowIdKey+i+'__name'; + var id_check = targetForm+'_'+targetForm+i+'__name'; // first check if Id is on page as that not the same as the one currently calling if (jQuery("#"+id_check).length && id_check != id) { // get the property value @@ -724,7 +730,7 @@ function propertyIsSet(prop, id) { function getFieldPropertyDesc_server(fieldtype, property){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&vdm="+vastDevMod; - if(token.length > 0 && fieldtype > 0 && property.length > 0){ + if(token.length > 0 && (fieldtype > 0 || fieldtype.length > 0)&& property.length > 0){ var request = 'token='+token+'&fieldtype='+fieldtype+'&property='+property; } return jQuery.ajax({ diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index 1723954be..82c5d5996 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -183,98 +183,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 1c391c35a..203f0d949 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -177,7 +177,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `javascript_views_footer` TEXT NOT NULL, `name_list` CHAR(64) NOT NULL DEFAULT '', `name_single` CHAR(64) NOT NULL DEFAULT '', - `not_required` INT(1) NOT NULL DEFAULT 0, `php_after_delete` MEDIUMTEXT NOT NULL, `php_after_publish` MEDIUMTEXT NOT NULL, `php_ajaxmethod` MEDIUMTEXT NOT NULL, @@ -704,7 +703,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( `javascript_view_footer` TEXT NOT NULL, `javascript_views_footer` TEXT NOT NULL, `name` VARCHAR(255) NOT NULL DEFAULT '', - `not_required` INT(1) NOT NULL DEFAULT 0, `null_switch` CHAR(64) NOT NULL DEFAULT '', `store` INT(11) NOT NULL DEFAULT 0, `xml` TEXT NOT NULL, @@ -731,9 +729,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( KEY `idx_datatype` (`datatype`), KEY `idx_indexes` (`indexes`), KEY `idx_null_switch` (`null_switch`), + KEY `idx_catid` (`catid`), KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`), KEY `idx_add_css_views` (`add_css_views`), - KEY `idx_catid` (`catid`), KEY `idx_add_css_view` (`add_css_view`), KEY `idx_datadefault_other` (`datadefault_other`), KEY `idx_datadefault` (`datadefault`), @@ -1495,14 +1493,14 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name`, `properties`, `short_description`, `params`, `published`, `version`, `hits`, `ordering`) VALUES (1, '', 'The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwis', 'Calendar', '{\"properties0\":{\"name\":\"type\",\"example\":\"calendar\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be calendar.\"},\"properties1\":{\"name\":\"name\",\"example\":\"date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"NOW\",\"adjustable\":\"1\",\"description\":\"(optional) is the default date. This must be given in the same format as specified by the format argument. You can put \\\"NOW\\\" to have current time.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the text box.\"},\"properties5\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is read-only (true or false). If the text box is read-only, the date cannot be changed, but can be selected and copied. No calendar icon will be shown.\"},\"properties6\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is disabled (true or false). If the text box is disabled, the date cannot be changed, selected or copied.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"format\",\"example\":\"%d-%m-%Y\",\"adjustable\":\"1\",\"description\":\"(optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, \'%Y-%m-%d\' is assumed (giving dates like \'2008-04-16\').\"},\"properties9\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is time zone to be used. There are two values; server_utc and user_utc. The first one is server time zone and the later is user time zone as configured in global configuration and user information respectively.\"},\"properties10\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional)\"},\"properties11\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties22\":{\"name\":\"translateformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true, the calendar will use a language string to determine the format. The `format` attribute is ignored. If false, the `format` attribute is used (same behaviour as today). (starting with 3.7.0)\"},\"properties13\":{\"name\":\"showtime\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true and translateformat is true, the language key DATE_FORMAT_CALENDAR_DATETIME is used, otherwise DATE_FORMAT_CALENDAR_DATE. (starting with 3.7.0)\"},\"properties14\":{\"name\":\"timeformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): can be set to 12 (and specify AM or PM) or 24 (starting with 3.7.0)\"},\"properties15\":{\"name\":\"singleheader\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to false, the year and the month selection will be set on two separates lines, with independant selection (starting with 3.7.0)\"},\"properties16\":{\"name\":\"todaybutton\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a button is added at the bottom of the datePicker to select the date of the current day (starting with 3.7.0)\"},\"properties17\":{\"name\":\"weeknumbers\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a column is added at the left of the datePicker to display the number of the week in the current year (starting with 3.7.0)\"},\"properties18\":{\"name\":\"filltable\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, dates of the previous and next month is added at the top and the bottom of the current month to fill the grid (starting with 3.7.0)\"},\"properties19\":{\"name\":\"minyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative lower limit for the year selection. The user could not select a year before your limit (starting with 3.7.0)\"},\"properties20\":{\"name\":\"maxyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative upper limit for the year selection. The user could not select a year after your limit (starting with 3.7.0)\"}}', 'provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.', '', 1, 5, '', ''), (2, '', 'The category form field type provides a drop down list of all published categories for a certain extension. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected. If the show_root', 'Category', '{\"properties0\":{\"name\":\"type\",\"example\":\"category\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be category.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mycategory\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a category\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"extension\",\"example\":\"com_content\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the name of the extension for which the categories will be retrieved. For example, to list content categories, use the value \'com_content\'. You can add also target one view, use the value \'com_component.view\'.\"},\"properties4\":{\"name\":\"scope\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is an alias for extension.\"},\"properties5\":{\"name\":\"required\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"show_root\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether a choice representing the root category will be shown.\"},\"properties7\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default category ID number.\"},\"properties8\":{\"name\":\"description\",\"example\":\"select one of the following categories\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties10\":{\"name\":\"published\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) (1\\/0\\/2\\/-2) is whether the drop down will show only published (1), unpublished (0), archived (2) or trashed (-2) categories. It is possible to combine different publishing status by entering the list of the corresponding numbers separated by comma (e.g. \\\"0,2,-2\\\" will display only unpublished, archived and trashed categories in the drop-down).\"},\"properties11\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of categories for an extension.', '', 1, 6, '', ''), -(3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 2, '', ''), +(3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 4, '', ''), (4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 2, '', ''), (5, '', 'Provides a color picker. Enter the color as #ff00ff or pick it from the palet.', 'Color', '{\"properties0\":{\"name\":\"type\",\"example\":\"color\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be color.\"},\"properties1\":{\"name\":\"name\",\"example\":\"backgroundcolor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"default\",\"example\":\"#FFFFFF\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) provides a color when not set.\"},\"properties3\":{\"name\":\"label\",\"example\":\"Background\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Select the background color here.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) tooltip for the form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a color picker when clicking the input box.', '', 1, 2, '', ''), (6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. \"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties23\":{\"name\":\"type_php_1\",\"example\":\"$db = JFactory::getDBO();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties24\":{\"name\":\"type_php_2\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties25\":{\"name\":\"type_php_3\",\"example\":\"$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties26\":{\"name\":\"type_php_4\",\"example\":\"$query->from($db->quoteName(\'###TABLE###\', \'a\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties27\":{\"name\":\"type_php_5\",\"example\":\"$query->where($db->quoteName(\'a.published\') . \' = 1\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties28\":{\"name\":\"type_php_6\",\"example\":\"$query->order(\'a.###TEXT### ASC\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties29\":{\"name\":\"type_php_7\",\"example\":\"$db->setQuery((string)$query);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties30\":{\"name\":\"type_php_8\",\"example\":\"$items = $db->loadObjectList();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties31\":{\"name\":\"type_php_9\",\"example\":\"$options = array();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties32\":{\"name\":\"type_php_10\",\"example\":\"if ($items)\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties33\":{\"name\":\"type_php_11\",\"example\":\"{\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties34\":{\"name\":\"type_php_12\",\"example\":\"\\\\t$options[] = JHtml::_(\'select.option\', \'\', \'Select an option\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties35\":{\"name\":\"type_php_13\",\"example\":\"\\\\tforeach($items as $item)\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties36\":{\"name\":\"type_php_14\",\"example\":\"\\\\t{\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties37\":{\"name\":\"type_php_15\",\"example\":\"\\\\t\\\\t$options[] = JHtml::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties38\":{\"name\":\"type_php_16\",\"example\":\"\\\\t}\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties39\":{\"name\":\"type_php_17\",\"example\":\"}\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties40\":{\"name\":\"type_php_18\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties41\":{\"name\":\"type_php_19\",\"example\":\"return $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'provides a drop down list of items entries.', '', 1, 8, '', ''), (7, '', 'The a list of users that can be targeting one or more groups and excluded users that already belongs to an item in a view.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ set the groups array\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_php_2\",\"example\":\"$groups = JComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties21\":{\"name\":\"type_php_3\",\"example\":\"return $groups;\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties22\":{\"name\":\"type_phpx_1\",\"example\":\"\\/\\/ To ensure that there is only one record per user\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties23\":{\"name\":\"type_phpx_2\",\"example\":\"\\/\\/ Get a db connection.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties24\":{\"name\":\"type_phpx_3\",\"example\":\"$db = JFactory::getDbo();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties25\":{\"name\":\"type_phpx_4\",\"example\":\"\\/\\/ Create a new query object.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties26\":{\"name\":\"type_phpx_5\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties27\":{\"name\":\"type_phpx_6\",\"example\":\"\\/\\/ Select all records from the #__###component###_###view### table from ###CODE### column\\\".\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties28\":{\"name\":\"type_phpx_7\",\"example\":\"$query->select($db->quoteName(\'###CODE###\'));\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties29\":{\"name\":\"type_phpx_8\",\"example\":\"$query->from($db->quoteName(\'#__###component###_###view###\'));\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties30\":{\"name\":\"type_phpx_9\",\"example\":\"$db->setQuery($query);\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties31\":{\"name\":\"type_phpx_10\",\"example\":\"$db->execute();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties32\":{\"name\":\"type_phpx_11\",\"example\":\"$found = $db->getNumRows();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties33\":{\"name\":\"type_phpx_12\",\"example\":\"if ($found)\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties34\":{\"name\":\"type_phpx_13\",\"example\":\"{\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties35\":{\"name\":\"type_phpx_14\",\"example\":\"\\\\t\\/\\/ return all users already used\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties36\":{\"name\":\"type_phpx_15\",\"example\":\"\\\\treturn array_unique($db->loadColumn());\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties37\":{\"name\":\"type_phpx_16\",\"example\":\"}\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties38\":{\"name\":\"type_phpx_17\",\"example\":\"return null;\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"}}', 'Provides list of users.', '', 1, 2, '', ''), (8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties16\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties4\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties5\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties6\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties7\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties8\":{\"name\":\"buttons\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties9\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties10\":{\"name\":\"editor\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties11\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties15\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides an editor area field.', '', 1, 5, '', ''), (9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', ''), -(10, '', 'The integer form field type provides a select box with a range of integer values. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Integer', '{\"properties0\":{\"name\":\"type\",\"example\":\"integer\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be integer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties12\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties13\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties7\":{\"name\":\"first\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"last\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a drop down list of integers between a minimum and maximum.', '', 1, 3, '', ''), +(10, '', 'The integer form field type provides a select box with a range of integer values. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Integer', '{\"properties0\":{\"name\":\"type\",\"example\":\"integer\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be integer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties8\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"first\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties10\":{\"name\":\"last\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties11\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of integers between a minimum and maximum.', '', 1, 4, '', ''), (11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties13\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties4\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties14\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties8\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties9\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties10\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties11\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 5, '', ''), (12, '', 'The media form field type provides modal access to the media manager for the choice of an image. Users with appropriate permissions will be able to upload files.', 'Media', '{\"properties0\":{\"name\":\"type\",\"example\":\"media\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be media.\"},\"properties1\":{\"name\":\"name\",\"example\":\"media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"directory\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the directory from which the user will be able to choose a file. This attribute should be relative to the top level \\/images\\/ folder.\"},\"properties5\":{\"name\":\"preview\",\"example\":\"false\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) shows or hides the preview of the currently chosen image. (\\\"true\\\": Show always, \\\"tooltip\\\": Show as tooltip, \\\"false\\\": Show never) (since Joomla! 2.5.5)\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides modal access to the media manager for insertion of images with upload for users with appropriate permissions.', '', 1, 2, '', ''), (13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a meter to show value in a range.', '', 1, 2, '', ''), diff --git a/admin/sql/updates/mysql/2.7.1.sql b/admin/sql/updates/mysql/2.7.1.sql deleted file mode 100644 index d3f5a12fa..000000000 --- a/admin/sql/updates/mysql/2.7.1.sql +++ /dev/null @@ -1 +0,0 @@ - diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index e6837ad9b..7aed1cc32 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -114,4 +114,126 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); - + + + diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index 65a139404..f5aa10335 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -196,7 +196,21 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_fields.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + JText::script('COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE'); + JText::script('COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE'); + JText::script('COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW'); + JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED'); + JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED'); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/fields/tmpl/default_body.php b/admin/views/fields/tmpl/default_body.php index b5d7ec0e9..03e04eb0e 100644 --- a/admin/views/fields/tmpl/default_body.php +++ b/admin/views/fields/tmpl/default_body.php @@ -104,6 +104,9 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; null_switch); ?> + + store); ?> + user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> escape($item->category_title); ?> @@ -111,9 +114,6 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; escape($item->category_title); ?> - - store); ?> - get('field.edit.state')) : ?> checked_out) : ?> diff --git a/admin/views/fields/tmpl/default_head.php b/admin/views/fields/tmpl/default_head.php index f6f19daa6..b45a9b76e 100644 --- a/admin/views/fields/tmpl/default_head.php +++ b/admin/views/fields/tmpl/default_head.php @@ -58,12 +58,12 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - - listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + + listDirn, $this->listOrder); ?> + canState): ?> listDirn, $this->listOrder); ?> diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 71fcbd988..7b6fc7d3b 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -377,8 +377,8 @@ class ComponentbuilderViewFields extends JViewLegacy 'a.datatype' => JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL'), 'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'), 'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'), - 'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'), 'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'), + 'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } diff --git a/componentbuilder.xml b/componentbuilder.xml index f5d9f7eaf..8ab6f9ccd 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 11th April, 2018 + 13th April, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.7.2 + 2.7.3 Component Builder (v.2.7.2) +

Component Builder (v.2.7.3)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index aa22366f6..e8dfbd819 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -327,27 +327,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.7.1 + 2.7.3 http://joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.1/JCB_v2.7.1.zip - - - stable - - Llewellyn van der Merwe - http://joomlacomponentbuilder.com - - - - Component Builder - Builds Complex Joomla Components - com_componentbuilder - component - 2.7.2 - http://joomlacomponentbuilder.com - - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.2/JCB_v2.7.2.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.3/JCB_v2.7.3.zip stable diff --git a/script.php b/script.php index 424a3058a..dac8ad19e 100644 --- a/script.php +++ b/script.php @@ -3310,7 +3310,7 @@ class com_componentbuilderInstallerScript $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_save":"add_php_save","add_php_getlistquery":"add_php_getlistquery","icon_add":"icon_add","html_import_view":"html_import_view","add_sql":"add_sql","type":"type","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","add_php_after_publish":"add_php_after_publish","not_required":"not_required","add_php_after_delete":"add_php_after_delete","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_before_save":"add_php_before_save","add_php_postsavehook":"add_php_postsavehook","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","alias_builder_type":"alias_builder_type","add_php_before_delete":"add_php_before_delete","add_php_document":"add_php_document","alias_builder":"alias_builder","add_custom_import":"add_custom_import","add_php_getitem":"add_php_getitem","php_import_headers":"php_import_headers","add_php_getitems":"add_php_getitems","icon":"icon","php_getitem":"php_getitem","php_getitems":"php_getitems","add_css_view":"add_css_view","php_getitems_after_all":"php_getitems_after_all","css_view":"css_view","php_getlistquery":"php_getlistquery","add_css_views":"add_css_views","php_before_save":"php_before_save","css_views":"css_views","php_save":"php_save","add_javascript_view_file":"add_javascript_view_file","php_postsavehook":"php_postsavehook","javascript_view_file":"javascript_view_file","php_allowedit":"php_allowedit","add_javascript_view_footer":"add_javascript_view_footer","php_batchcopy":"php_batchcopy","javascript_view_footer":"javascript_view_footer","php_batchmove":"php_batchmove","add_javascript_views_file":"add_javascript_views_file","php_before_publish":"php_before_publish","javascript_views_file":"javascript_views_file","php_after_publish":"php_after_publish","add_javascript_views_footer":"add_javascript_views_footer","php_before_delete":"php_before_delete","javascript_views_footer":"javascript_views_footer","php_after_delete":"php_after_delete","add_custom_button":"add_custom_button","php_document":"php_document","source":"source","php_controller":"php_controller","sql":"sql","php_model":"php_model","php_controller_list":"php_controller_list","php_import_display":"php_import_display","php_model_list":"php_model_list","php_import":"php_import","add_php_ajax":"add_php_ajax","php_import_setdata":"php_import_setdata","php_ajaxmethod":"php_ajaxmethod","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_save","add_php_getlistquery","add_sql","type","add_fadein","add_php_after_publish","not_required","add_php_after_delete","add_php_getitems_after_all","add_php_before_save","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitem","add_php_getitems","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_save","add_php_getlistquery","add_sql","type","add_fadein","add_php_after_publish","add_php_after_delete","add_php_getitems_after_all","add_php_before_save","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitem","add_php_getitems","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $admin_view_Inserted = $db->insertObject('#__content_types', $admin_view); @@ -3428,9 +3428,9 @@ class com_componentbuilderInstallerScript $field->type_title = 'Componentbuilder Field'; $field->type_alias = 'com_componentbuilder.field'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","javascript_view_footer":"javascript_view_footer","css_views":"css_views","add_javascript_view_footer":"add_javascript_view_footer","css_view":"css_view","add_css_views":"add_css_views","add_css_view":"add_css_view","store":"store","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; + $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","javascript_view_footer":"javascript_view_footer","add_javascript_view_footer":"add_javascript_view_footer","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; - $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_view_footer","add_css_views","catid","add_css_view","store","add_javascript_views_footer","not_required"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; + $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_javascript_view_footer","add_css_views","add_css_view","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $field_Inserted = $db->insertObject('#__content_types', $field); @@ -3749,7 +3749,7 @@ class com_componentbuilderInstallerScript $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_save":"add_php_save","add_php_getlistquery":"add_php_getlistquery","icon_add":"icon_add","html_import_view":"html_import_view","add_sql":"add_sql","type":"type","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","add_php_after_publish":"add_php_after_publish","not_required":"not_required","add_php_after_delete":"add_php_after_delete","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_before_save":"add_php_before_save","add_php_postsavehook":"add_php_postsavehook","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","alias_builder_type":"alias_builder_type","add_php_before_delete":"add_php_before_delete","add_php_document":"add_php_document","alias_builder":"alias_builder","add_custom_import":"add_custom_import","add_php_getitem":"add_php_getitem","php_import_headers":"php_import_headers","add_php_getitems":"add_php_getitems","icon":"icon","php_getitem":"php_getitem","php_getitems":"php_getitems","add_css_view":"add_css_view","php_getitems_after_all":"php_getitems_after_all","css_view":"css_view","php_getlistquery":"php_getlistquery","add_css_views":"add_css_views","php_before_save":"php_before_save","css_views":"css_views","php_save":"php_save","add_javascript_view_file":"add_javascript_view_file","php_postsavehook":"php_postsavehook","javascript_view_file":"javascript_view_file","php_allowedit":"php_allowedit","add_javascript_view_footer":"add_javascript_view_footer","php_batchcopy":"php_batchcopy","javascript_view_footer":"javascript_view_footer","php_batchmove":"php_batchmove","add_javascript_views_file":"add_javascript_views_file","php_before_publish":"php_before_publish","javascript_views_file":"javascript_views_file","php_after_publish":"php_after_publish","add_javascript_views_footer":"add_javascript_views_footer","php_before_delete":"php_before_delete","javascript_views_footer":"javascript_views_footer","php_after_delete":"php_after_delete","add_custom_button":"add_custom_button","php_document":"php_document","source":"source","php_controller":"php_controller","sql":"sql","php_model":"php_model","php_controller_list":"php_controller_list","php_import_display":"php_import_display","php_model_list":"php_model_list","php_import":"php_import","add_php_ajax":"add_php_ajax","php_import_setdata":"php_import_setdata","php_ajaxmethod":"php_ajaxmethod","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_save","add_php_getlistquery","add_sql","type","add_fadein","add_php_after_publish","not_required","add_php_after_delete","add_php_getitems_after_all","add_php_before_save","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitem","add_php_getitems","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_save","add_php_getlistquery","add_sql","type","add_fadein","add_php_after_publish","add_php_after_delete","add_php_getitems_after_all","add_php_before_save","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitem","add_php_getitems","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; // Check if admin_view type is already in content_type DB. $admin_view_id = null; @@ -4037,9 +4037,9 @@ class com_componentbuilderInstallerScript $field->type_title = 'Componentbuilder Field'; $field->type_alias = 'com_componentbuilder.field'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","javascript_view_footer":"javascript_view_footer","css_views":"css_views","add_javascript_view_footer":"add_javascript_view_footer","css_view":"css_view","add_css_views":"add_css_views","add_css_view":"add_css_view","store":"store","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; + $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","javascript_view_footer":"javascript_view_footer","add_javascript_view_footer":"add_javascript_view_footer","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; - $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_view_footer","add_css_views","catid","add_css_view","store","add_javascript_views_footer","not_required"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; + $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_javascript_view_footer","add_css_views","add_css_view","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; // Check if field type is already in content_type DB. $field_id = null; @@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.7.2 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.7.3 Was Successful! Let us know if anything is not working as expected.

'; } } diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 21dc4dc69..41f782d35 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -618,6 +618,8 @@ abstract class ComponentbuilderHelper 'description' => $result->description); // number pointer $nr = 0; + // value to check since there are false and null values even 0 in the values returned + $confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB'; // set the headers $field['values_description'] .= ''.JText::_('COM_COMPONENTBUILDER_PROPERTY').''.JText::_('COM_COMPONENTBUILDER_EXAMPLE').''.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').''; foreach ($properties as $property) @@ -625,7 +627,7 @@ abstract class ComponentbuilderHelper $example = (isset($property['example']) && self::checkString($property['example'])) ? self::shorten($property['example'], 30) : ''; $field['values_description'] .= ''.$property['name'].''.$example.''.$property['description'].''; // check if we should load the value - $value = self::getValueFromXMLstring($xml, $property['name']); + $value = self::getValueFromXMLstring($xml, $property['name'], $confirmation); if(self::checkArray($settings) && isset($settings[$property['name']])) { // add the xml values @@ -635,12 +637,12 @@ abstract class ComponentbuilderHelper // add the name List Options as set $field['nameListOptionsSet'][$property['name']] = $property['name']; } - elseif (!$xml || $value) + elseif (!$xml || $confirmation !== $value) { // add the xml values - $field['values'] .= "\n\t" . $property['name'] . '="'. ($value) ? $value : $property['example'] .'" '; + $field['values'] .= "\n\t" . $property['name'] . '="'. ($confirmation !== $value) ? $value : $property['example'] .'" '; // add the json values - $field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($value) ? $value : $property['example'], 'desc' => $property['description']); + $field['subform']['properties' . $nr] = array('name' => $property['name'], 'value' => ($confirmation !== $value) ? $value : $property['example'], 'desc' => $property['description']); } // add the name List Options $field['nameListOptions'][$property['name']] = $property['name']; @@ -655,17 +657,13 @@ abstract class ComponentbuilderHelper return false; } - public static function getValueFromXMLstring($xml, $get) + public static function getValueFromXMLstring($xml, $get, $confirmation) { if (self::checkString($xml)) { - $value = self::getBetween($xml, $get.'="', '"'); - if (self::checkString($value)) - { - return $value; - } + return self::getBetween($xml, $get.'="', '"', $confirmation); } - return false; + return $confirmation; } @@ -845,11 +843,12 @@ abstract class ComponentbuilderHelper * @param string $content The content to search * @param string $start The starting value * @param string $end The ending value + * @param string $default The default value if none found * * @return string On success / empty string on failure * */ - public static function getBetween($content, $start, $end) + public static function getBetween($content, $start, $end, $default = '') { $r = explode($start, $content); if (isset($r[1])) @@ -857,7 +856,7 @@ abstract class ComponentbuilderHelper $r = explode($end, $r[1]); return $r[0]; } - return ''; + return $default; } /** diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index 66cf370f0..d13047e84 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -74,4 +74,4 @@ JTOOLBAR_CLOSE="Close" JTOOLBAR_HELP="Help" JTOOLBAR_SAVE="Save & Close" JTOOLBAR_SAVE_AND_NEW="Save & New" -JTOOLBAR_SAVE_AS_COPY="Save as Copy" +JTOOLBAR_SAVE_AS_COPY="Save as Copy" \ No newline at end of file diff --git a/site/language/en-GB/en-GB.com_componentbuilder.sys.ini b/site/language/en-GB/en-GB.com_componentbuilder.sys.ini index a6e92b1e1..d442612e9 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -1,3 +1,3 @@ COM_COMPONENTBUILDER="Component Builder" COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" -COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" +COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" \ No newline at end of file