From 2a6be5431762c5d208d378f0bd0f555d716ed38b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 19 Aug 2018 22:15:43 +0200 Subject: [PATCH] Adapted the custom buttons and layout in the components, admins and libraries views. Fixed a bug in the JCB package import that missed custom code imports when code is changed inside the custom code. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/c_Fields.php | 33 +- admin/helpers/componentbuilder.php | 14 +- .../en-GB/en-GB.com_componentbuilder.ini | 22 +- .../server/linked_components_fullwidth.php | 147 +++++- admin/models/admin_view.php | 66 +-- admin/models/admin_views.php | 163 ++++++- admin/models/fields/component.php | 5 +- admin/models/fields/dynamicget.php | 5 +- admin/models/fields/fieldtypes.php | 5 +- admin/models/fields/libraries.php | 5 +- admin/models/fields/librariesx.php | 5 +- admin/models/fields/library.php | 5 +- admin/models/fields/maingets.php | 5 +- admin/models/fields/servers.php | 5 +- admin/models/fields/snippets.php | 5 +- admin/models/forms/admin_view.xml | 354 +++++++------- admin/models/forms/joomla_component.xml | 438 +++++++++--------- admin/models/import_joomla_components.php | 18 +- admin/models/joomla_component.php | 120 ++--- admin/models/joomla_components.php | 31 +- admin/sql/install.mysql.utf8.sql | 22 +- admin/views/admin_views/tmpl/default_body.php | 92 ++-- admin/views/admin_views/tmpl/default_foot.php | 2 +- admin/views/admin_views/tmpl/default_head.php | 7 +- admin/views/admin_views/view.html.php | 293 +++++++++++- admin/views/componentbuilder/tmpl/default.php | 28 +- admin/views/joomla_component/view.html.php | 2 +- .../joomla_components/tmpl/default_body.php | 168 +++++-- .../joomla_components/tmpl/default_foot.php | 2 +- .../joomla_components/tmpl/default_head.php | 12 +- admin/views/joomla_components/view.html.php | 2 - admin/views/libraries/tmpl/default_body.php | 57 ++- componentbuilder.xml | 2 +- script.php | 16 +- site/helpers/componentbuilder.php | 14 +- 37 files changed, 1414 insertions(+), 764 deletions(-) diff --git a/README.md b/README.md index cfdad0d8d..3613b9f6e 100644 --- a/README.md +++ b/README.md @@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 18th August, 2018 ++ *Last Build*: 19th August, 2018 + *Version*: 2.8.6 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **187148** ++ *Line count*: **187854** + *Field count*: **1061** + *File count*: **1240** + *Folder count*: **197** diff --git a/admin/README.txt b/admin/README.txt index cfdad0d8d..3613b9f6e 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 18th August, 2018 ++ *Last Build*: 19th August, 2018 + *Version*: 2.8.6 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **187148** ++ *Line count*: **187854** + *Field count*: **1061** + *File count*: **1240** + *Folder count*: **197** diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 2df21cb01..914f5f071 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2861,10 +2861,12 @@ class Fields extends Structure isset($fieldData['view']) && isset($fieldData['views']) && ComponentbuilderHelper::checkString($fieldData['view']) && ComponentbuilderHelper::checkString($fieldData['views'])) { + // set local component + $local_component = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; // check that the component value is set if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component'])) { - $fieldData['component'] = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $fieldData['component'] = $local_component; } // check that the componet has the com_ value in it if (strpos($fieldData['component'], 'com_') === false || strpos($fieldData['component'], '=') !== false) @@ -2876,6 +2878,14 @@ class Fields extends Structure { $fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders); } + // fall back on the field component + $component = $fieldData['component']; + // check if we should add ref tags (since it only works well on local views) + if ($local_component !== $component) + { + // do not add ref tags + $refLoad = false; + } // get core permissions $coreLoad = false; // add ref tags @@ -2886,19 +2896,6 @@ class Fields extends Structure $core = $this->permissionCore[$fieldData['view']]; // set switch to activate easy update $coreLoad = true; - // since the view is local to the component use this component name - $component = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; - } - else - { - // fall back on the field component - $component = $fieldData['component']; - } - // check if we should add ref tags - if ($fieldData['component'] !== $component) - { - // do not add ref tags - $refLoad = false; } // start building the add buttons/s $addButton = array(); @@ -2927,8 +2924,7 @@ class Fields extends Structure $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the view name & id"; $addButton[] = $this->_t(3) . "\$values = \$jinput->getArray(array("; $addButton[] = $this->_t(4) . "'id' => 'int',"; - $addButton[] = $this->_t(4) . "'view' => 'word',"; - $addButton[] = $this->_t(4) . "'return' => 'base64'"; + $addButton[] = $this->_t(4) . "'view' => 'word'"; $addButton[] = $this->_t(3) . "));"; $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " check if new item"; $addButton[] = $this->_t(3) . "\$ref = '';"; @@ -2937,7 +2933,7 @@ class Fields extends Structure { $addButton[] = $this->_t(3) . "if (!is_null(\$values['id']) && strlen(\$values['view']))"; $addButton[] = $this->_t(3) . "{"; - $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " only load referal if not new item."; + $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " only load referral if not new item."; $addButton[] = $this->_t(4) . "\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; $addButton[] = $this->_t(4) . "\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " get the return value."; @@ -2952,6 +2948,9 @@ class Fields extends Structure { $addButton[] = $this->_t(3) . "if (!is_null(\$values['id']) && strlen(\$values['view']))"; $addButton[] = $this->_t(3) . "{"; + $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " only load field details if not new item."; + $addButton[] = $this->_t(4) . "\$ref = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];"; + $addButton[] = $this->_t(4) . "\$refJ = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];"; $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " get the return value."; $addButton[] = $this->_t(4) . "\$_uri = (string) JUri::getInstance();"; $addButton[] = $this->_t(4) . "\$_return = urlencode(base64_encode(\$_uri));"; diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 7ba04c18c..71a14bdad 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -3549,10 +3549,10 @@ abstract class ComponentbuilderHelper /** * Get the edit button * - * @param int $item The item to edit - * @param string $view The type of item to edit - * @param string $views The list view controller name - * @param string $ref The return path + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $ref The return path * @param string $headsup The message to show on click of button * * @return string On success the full html edit button @@ -3612,9 +3612,9 @@ abstract class ComponentbuilderHelper /** * Get the edit URL * - * @param int $item The item to edit - * @param string $view The type of item to edit - * @param string $ref The return path + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $ref The return path * * @return string On success the edit url * diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 908c1f282..2db3b55db 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1,3 +1,5 @@ +ADMIN_VIEWS_DETAILS="Details" +ADMIN_VIEWS_NAMES="Names" COM_COMPONENTBUILDER="Component Builder" COM_COMPONENTBUILDER_ABOVE_TABS="Above Tabs" COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS="Accepts an email address satisfies a basic syntax check in the pattern of "x@y.zz", with no invalid characters." @@ -973,6 +975,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_OUT="Zoom Out" COM_COMPONENTBUILDER_AHEAD="Ahead" COM_COMPONENTBUILDER_AHEAD_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BNEWER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Ahead means your local snippet (with the same name, library and type) has a newer modified date then the community snippet (with the same name, library and type)." +COM_COMPONENTBUILDER_AJAX="Ajax" COM_COMPONENTBUILDER_ALIAS="Alias" COM_COMPONENTBUILDER_ALIGNMENT="Alignment" COM_COMPONENTBUILDER_ALL="All" @@ -3111,6 +3114,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES="Yes" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YOUTUBE="Youtube" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_CUSTOM_BUTTON="Custom Button" COM_COMPONENTBUILDER_CUSTOM_CODE="Custom Code" COM_COMPONENTBUILDER_CUSTOM_CODES="Custom Codes" COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS="Custom Codes Access" @@ -3342,6 +3346,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_DESCRIPTION="How To Add the Code to the fi COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL="Add Type" COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_DESC="A count of the number of times this Custom Code has been revised." COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_CUSTOM_IMPORT="Custom Import" COM_COMPONENTBUILDER_CUSTOM_SCRIPT="Custom Script" COM_COMPONENTBUILDER_DASH="Dashboard" COM_COMPONENTBUILDER_DASHBOARD="Component Builder Dashboard" @@ -3708,13 +3713,11 @@ COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date" COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date." COM_COMPONENTBUILDER_EDIT_S="Edit %s" COM_COMPONENTBUILDER_EDIT_S_FOR_THIS_S="Edit %s for this %s" -COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS="Edit the admin fields" -COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_CONDITIONS="Edit the admin fields conditions" -COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_RELATIONS="Edit the admin fields relations" COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." +COM_COMPONENTBUILDER_EDIT_VIEW="Edit View" COM_COMPONENTBUILDER_EMAIL="Email" -COM_COMPONENTBUILDER_EMAIL_S="Email: %s" +COM_COMPONENTBUILDER_EMAIL_S="Email %s" COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="Copyright: %s" @@ -3739,6 +3742,7 @@ COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed" COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES="Export JCB Packages" 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_FADE_IN="Fade In" COM_COMPONENTBUILDER_FIELD="Field" COM_COMPONENTBUILDER_FIELDS="Fields" COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access" @@ -5475,6 +5479,7 @@ COM_COMPONENTBUILDER_LINK="Link" COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)" COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor" COM_COMPONENTBUILDER_LIST_FIELD="List Field" +COM_COMPONENTBUILDER_LIST_VIEW="List View" COM_COMPONENTBUILDER_LOADING="loading" COM_COMPONENTBUILDER_LOCAL="Local" COM_COMPONENTBUILDER_LOCAL_GET="Local (get)" @@ -6564,6 +6569,9 @@ COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE 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_BGET_PACKAGEB_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_ADMIN_FIELDS="The admin fields" +COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions" +COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations" 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" @@ -6734,6 +6742,7 @@ COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAENINEKQFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE9kQFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_WEBSITE="Website" +COM_COMPONENTBUILDER_WEBSITE_OF_S="Website of %s" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" @@ -6761,4 +6770,7 @@ COM_COMPONENTBUILDER__HAS_BEEN_CHECKED_OUT_BY_S="% has been checked out by %s" 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!" \ No newline at end of file +COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!" +JOOMLA_COMPONENTS_CODE_NAME="Code Name" +JOOMLA_COMPONENTS_COMPANY_DETAILS="Company Details" +JOOMLA_COMPONENTS_DESCRIPTION="Description" \ No newline at end of file diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index a11146cd5..a5990230b 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -39,19 +39,13 @@ $ref = ($id) ? "&ref=server&refid=" . $id . "&return=" . urlencode(base64_encode - + - + - - - - - - - + @@ -70,6 +64,7 @@ $ref = ($id) ? "&ref=server&refid=" . $id . "&return=" . urlencode(base64_encode ?> +
get('joomla_component.edit')): ?> escape($item->system_name); ?> checked_out): ?> @@ -77,22 +72,126 @@ $ref = ($id) ? "&ref=server&refid=" . $id . "&return=" . urlencode(base64_encode escape($item->system_name); ?> + + - escape($item->component_version); ?> +
+ 'component_admin_views', + 'views' => 'components_admin_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS'), + 'icon' => 'stack'), + array( + 'view' => 'component_custom_admin_views', + 'views' => 'components_custom_admin_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_VIEWS'), + 'icon' => 'screen'), + array( + 'view' => 'component_site_views', + 'views' => 'components_site_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS'), + 'icon' => 'palette'), + array( + 'view' => 'component_config', + 'views' => 'components_config', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG'), + 'icon' => 'options') + ); + $_buttons[1] = array( + array( + 'view' => 'component_updates', + 'views' => 'components_updates', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES'), + 'icon' => 'database'), + array( + 'view' => 'component_mysql_tweaks', + 'views' => 'components_mysql_tweaks', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS'), + 'icon' => 'screwdriver'), + array( + 'view' => 'component_files_folders', + 'views' => 'components_files_folders', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS'), + 'icon' => 'briefcase') + ); + $_buttons[2] = array( + array( + 'view' => 'component_custom_admin_menus', + 'views' => 'components_custom_admin_menus', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS'), + 'icon' => 'plus'), + array( + 'view' => 'component_dashboard', + 'views' => 'components_dashboard', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD'), + 'icon' => 'dashboard') + ); + } + ?> +
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + + +
+ + +
+ escape($item->name_code); ?> +
+
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + + +
+ + +
+ escape($item->short_description); ?> +
+
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + + +
+ + +
escape($item->companyname); ?>
+ author)) : ?> + escape($item->author); ?>
+ + email) && ComponentbuilderHelper::checkString($item->author)) : ?> + + escape($item->email); ?> + +
+ + website) && ComponentbuilderHelper::checkString($item->author)) : ?> + + escape($item->website); ?> + - - - escape($item->name_code); ?> - - - escape($item->component_version); ?> - - - escape($item->short_description); ?> - - - escape($item->companyname); ?> - - - escape($item->author); ?> +
published == 1):?> diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 5bb1dccb0..543edce6e 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -86,18 +86,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_import_save)) - { - // base64 Decode php_import_save. - $item->php_import_save = base64_decode($item->php_import_save); - } - if (!empty($item->html_import_view)) { // base64 Decode html_import_view. $item->html_import_view = base64_decode($item->html_import_view); } + if (!empty($item->php_import_save)) + { + // base64 Decode php_import_save. + $item->php_import_save = base64_decode($item->php_import_save); + } + if (!empty($item->php_import_headers)) { // base64 Decode php_import_headers. @@ -326,14 +326,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } - if (!empty($item->alias_builder)) - { - // Convert the alias_builder field to an array. - $alias_builder = new Registry; - $alias_builder->loadString($item->alias_builder); - $item->alias_builder = $alias_builder->toArray(); - } - if (!empty($item->addtables)) { // Convert the addtables field to an array. @@ -342,6 +334,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addtables = $addtables->toArray(); } + if (!empty($item->alias_builder)) + { + // Convert the alias_builder field to an array. + $alias_builder = new Registry; + $alias_builder->loadString($item->alias_builder); + $item->alias_builder = $alias_builder->toArray(); + } + if (!empty($item->custom_button)) { // Convert the custom_button field to an array. @@ -1256,19 +1256,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } - // Set the alias_builder items to data. - if (isset($data['alias_builder']) && is_array($data['alias_builder'])) - { - $alias_builder = new JRegistry; - $alias_builder->loadArray($data['alias_builder']); - $data['alias_builder'] = (string) $alias_builder; - } - elseif (!isset($data['alias_builder'])) - { - // Set the empty alias_builder to data - $data['alias_builder'] = ''; - } - // Set the addtables items to data. if (isset($data['addtables']) && is_array($data['addtables'])) { @@ -1282,6 +1269,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addtables'] = ''; } + // Set the alias_builder items to data. + if (isset($data['alias_builder']) && is_array($data['alias_builder'])) + { + $alias_builder = new JRegistry; + $alias_builder->loadArray($data['alias_builder']); + $data['alias_builder'] = (string) $alias_builder; + } + elseif (!isset($data['alias_builder'])) + { + // Set the empty alias_builder to data + $data['alias_builder'] = ''; + } + // Set the custom_button items to data. if (isset($data['custom_button']) && is_array($data['custom_button'])) { @@ -1308,18 +1308,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_import_save string to base64 string. - if (isset($data['php_import_save'])) - { - $data['php_import_save'] = base64_encode($data['php_import_save']); - } - // Set the html_import_view string to base64 string. if (isset($data['html_import_view'])) { $data['html_import_view'] = base64_encode($data['html_import_view']); } + // Set the php_import_save string to base64 string. + if (isset($data['php_import_save'])) + { + $data['php_import_save'] = base64_encode($data['php_import_save']); + } + // Set the php_import_headers string to base64 string. if (isset($data['php_import_headers'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 57ef44c0b..675d3fd77 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -29,8 +29,12 @@ class ComponentbuilderModelAdmin_views extends JModelList 'a.modified_by','modified_by', 'a.system_name','system_name', 'a.name_single','name_single', - 'a.name_list','name_list', - 'a.short_description','short_description' + 'a.short_description','short_description', + 'a.add_fadein','add_fadein', + 'a.type','type', + 'a.add_custom_import','add_custom_import', + 'a.add_custom_button','add_custom_button', + 'a.add_php_ajax','add_php_ajax' ); } @@ -57,11 +61,23 @@ class ComponentbuilderModelAdmin_views extends JModelList $name_single = $this->getUserStateFromRequest($this->context . '.filter.name_single', 'filter_name_single'); $this->setState('filter.name_single', $name_single); - $name_list = $this->getUserStateFromRequest($this->context . '.filter.name_list', 'filter_name_list'); - $this->setState('filter.name_list', $name_list); - $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); - $this->setState('filter.short_description', $short_description); + $this->setState('filter.short_description', $short_description); + + $add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein'); + $this->setState('filter.add_fadein', $add_fadein); + + $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); + $this->setState('filter.type', $type); + + $add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import'); + $this->setState('filter.add_custom_import', $add_custom_import); + + $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); + $this->setState('filter.add_custom_button', $add_custom_button); + + $add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax'); + $this->setState('filter.add_php_ajax', $add_php_ajax); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $this->setState('filter.sorting', $sorting); @@ -111,10 +127,104 @@ class ComponentbuilderModelAdmin_views extends JModelList } } - } + } + + // set selection value to a translatable value + if (ComponentbuilderHelper::checkArray($items)) + { + foreach ($items as $nr => &$item) + { + // convert add_fadein + $item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein'); + // convert type + $item->type = $this->selectionTranslation($item->type, 'type'); + // convert add_custom_import + $item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import'); + // convert add_custom_button + $item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button'); + // convert add_php_ajax + $item->add_php_ajax = $this->selectionTranslation($item->add_php_ajax, 'add_php_ajax'); + } + } + // return items return $items; + } + + /** + * Method to convert selection values to translatable string. + * + * @return translatable string + */ + public function selectionTranslation($value,$name) + { + // Array of add_fadein language strings + if ($name === 'add_fadein') + { + $add_fadeinArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_ADD', + 0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE' + ); + // Now check if value is found in this array + if (isset($add_fadeinArray[$value]) && ComponentbuilderHelper::checkString($add_fadeinArray[$value])) + { + return $add_fadeinArray[$value]; + } + } + // Array of type language strings + if ($name === 'type') + { + $typeArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE', + 2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY' + ); + // Now check if value is found in this array + if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) + { + return $typeArray[$value]; + } + } + // Array of add_custom_import language strings + if ($name === 'add_custom_import') + { + $add_custom_importArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES', + 0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO' + ); + // Now check if value is found in this array + if (isset($add_custom_importArray[$value]) && ComponentbuilderHelper::checkString($add_custom_importArray[$value])) + { + return $add_custom_importArray[$value]; + } + } + // Array of add_custom_button language strings + if ($name === 'add_custom_button') + { + $add_custom_buttonArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES', + 0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO' + ); + // Now check if value is found in this array + if (isset($add_custom_buttonArray[$value]) && ComponentbuilderHelper::checkString($add_custom_buttonArray[$value])) + { + return $add_custom_buttonArray[$value]; + } + } + // Array of add_php_ajax language strings + if ($name === 'add_php_ajax') + { + $add_php_ajaxArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES', + 0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO' + ); + // Now check if value is found in this array + if (isset($add_php_ajaxArray[$value]) && ComponentbuilderHelper::checkString($add_php_ajaxArray[$value])) + { + return $add_php_ajaxArray[$value]; + } + } + return $value; } /** @@ -172,10 +282,35 @@ class ComponentbuilderModelAdmin_views extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.description LIKE '.$search.')'); + $query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')'); } } + // Filter by Add_fadein. + if ($add_fadein = $this->getState('filter.add_fadein')) + { + $query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein))); + } + // Filter by Type. + if ($type = $this->getState('filter.type')) + { + $query->where('a.type = ' . $db->quote($db->escape($type))); + } + // Filter by Add_custom_import. + if ($add_custom_import = $this->getState('filter.add_custom_import')) + { + $query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import))); + } + // Filter by Add_custom_button. + if ($add_custom_button = $this->getState('filter.add_custom_button')) + { + $query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button))); + } + // Filter by Add_php_ajax. + if ($add_php_ajax = $this->getState('filter.add_php_ajax')) + { + $query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax))); + } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering', 'a.id'); @@ -241,10 +376,10 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_import_save - $item->php_import_save = base64_decode($item->php_import_save); // decode html_import_view $item->html_import_view = base64_decode($item->html_import_view); + // decode php_import_save + $item->php_import_save = base64_decode($item->php_import_save); // decode php_import_headers $item->php_import_headers = base64_decode($item->php_import_headers); // decode php_getitems @@ -375,8 +510,12 @@ class ComponentbuilderModelAdmin_views extends JModelList $id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.system_name'); $id .= ':' . $this->getState('filter.name_single'); - $id .= ':' . $this->getState('filter.name_list'); - $id .= ':' . $this->getState('filter.short_description'); + $id .= ':' . $this->getState('filter.short_description'); + $id .= ':' . $this->getState('filter.add_fadein'); + $id .= ':' . $this->getState('filter.type'); + $id .= ':' . $this->getState('filter.add_custom_import'); + $id .= ':' . $this->getState('filter.add_custom_button'); + $id .= ':' . $this->getState('filter.add_php_ajax'); return parent::getStoreId($id); } diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 12edbebd3..7a4125cf9 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -53,15 +53,14 @@ class JFormFieldComponent extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index 8342c72dd..c2d0cbd3e 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -53,15 +53,14 @@ class JFormFieldDynamicget extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index 08e0f2f28..efa9412a0 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -53,15 +53,14 @@ class JFormFieldFieldtypes extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/libraries.php b/admin/models/fields/libraries.php index 5463e5ef7..86ffebd6c 100644 --- a/admin/models/fields/libraries.php +++ b/admin/models/fields/libraries.php @@ -53,15 +53,14 @@ class JFormFieldLibraries extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/librariesx.php b/admin/models/fields/librariesx.php index 44fa742ce..671b3fcdf 100644 --- a/admin/models/fields/librariesx.php +++ b/admin/models/fields/librariesx.php @@ -53,15 +53,14 @@ class JFormFieldLibrariesx extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/library.php b/admin/models/fields/library.php index b7b5da851..6791cc0a2 100644 --- a/admin/models/fields/library.php +++ b/admin/models/fields/library.php @@ -53,15 +53,14 @@ class JFormFieldLibrary extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index 8c09bffc4..e291a6867 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -53,15 +53,14 @@ class JFormFieldMaingets extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/servers.php b/admin/models/fields/servers.php index ee1b62586..1ead2fe3e 100644 --- a/admin/models/fields/servers.php +++ b/admin/models/fields/servers.php @@ -53,15 +53,14 @@ class JFormFieldServers extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 7e3043f78..fb19721c7 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -53,15 +53,14 @@ class JFormFieldSnippets extends JFormFieldList // get the view name & id $values = $jinput->getArray(array( 'id' => 'int', - 'view' => 'word', - 'return' => 'base64' + 'view' => 'word' )); // check if new item $ref = ''; $refJ = ''; if (!is_null($values['id']) && strlen($values['view'])) { - // only load referal if not new item. + // only load referral if not new item. $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 9412af4c2..df0cfb913 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -114,22 +114,6 @@ message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_HINT" /> - - + + + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - - - - - + @@ -229,20 +212,27 @@ - + + type="media" + name="icon" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_LABEL" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION" + directory="" + /> + + - + COM_COMPONENTBUILDER_ADMIN_VIEW_YES + @@ -280,25 +270,13 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_CATEGORY_DESCRIPTION" directory="" /> - + - - - - - - COM_COMPONENTBUILDER_ADMIN_VIEW_NO - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -403,29 +444,36 @@ - + + type="radio" + name="add_php_getform" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_save" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + @@ -470,11 +518,11 @@ - + @@ -573,11 +621,11 @@ - + @@ -589,11 +637,11 @@ - + @@ -617,38 +665,6 @@ - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_ADMIN_VIEW_NO - - + + - - + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + - - - - + type="aliasbuilder" + name="alias_builder" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_LABEL" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_DESCRIPTION" + class="list_class fieldFull" + multiple="true" + showon="alias_builder_type:2" + /> - + + + - - - - + type="text" + name="name_list" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL" + size="40" + maxlength="150" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION" + class="inputbox" + readonly="false" + disabled="false" + required="true" + filter="STRING" + message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT" + /> - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + type="list" + name="adduikit" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_DESCRIPTION" + class="btn-group btn-group-yesno" + default="0"> + + + + + + - - - - + + + + path) && ComponentbuilderHelper::checkString($item->path)) { $getter[] = 'path'; } - elseif (isset($item->function_name) && ComponentbuilderHelper::checkString($item->function_name)) + // add function name search + if (isset($item->function_name) && ComponentbuilderHelper::checkString($item->function_name)) { $getter[] = 'function_name'; + // remove path + if (($key = array_search('path', $getter)) !== false) { + unset($getter[$key]); + } } - elseif (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget)) + // add hash target search + if (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget)) { $getter[] = 'hashtarget'; + // remove function name + if (($key = array_search('function_name', $getter)) !== false) { + unset($getter[$key]); + } } break; case 'dynamic_get': diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 1f8073c19..aa834ce25 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -86,34 +86,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_preflight_install)) + if (!empty($item->php_site_event)) { - // base64 Decode php_preflight_install. - $item->php_preflight_install = base64_decode($item->php_preflight_install); - } - - if (!empty($item->php_postflight_install)) - { - // base64 Decode php_postflight_install. - $item->php_postflight_install = base64_decode($item->php_postflight_install); - } - - if (!empty($item->css_admin)) - { - // base64 Decode css_admin. - $item->css_admin = base64_decode($item->css_admin); - } - - if (!empty($item->php_method_uninstall)) - { - // base64 Decode php_method_uninstall. - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); - } - - if (!empty($item->sql_uninstall)) - { - // base64 Decode sql_uninstall. - $item->sql_uninstall = base64_decode($item->sql_uninstall); + // base64 Decode php_site_event. + $item->php_site_event = base64_decode($item->php_site_event); } if (!empty($item->php_admin_event)) @@ -122,10 +98,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->php_admin_event = base64_decode($item->php_admin_event); } - if (!empty($item->php_site_event)) + if (!empty($item->php_method_uninstall)) { - // base64 Decode php_site_event. - $item->php_site_event = base64_decode($item->php_site_event); + // base64 Decode php_method_uninstall. + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + } + + if (!empty($item->php_preflight_install)) + { + // base64 Decode php_preflight_install. + $item->php_preflight_install = base64_decode($item->php_preflight_install); + } + + if (!empty($item->css_admin)) + { + // base64 Decode css_admin. + $item->css_admin = base64_decode($item->css_admin); + } + + if (!empty($item->php_postflight_install)) + { + // base64 Decode php_postflight_install. + $item->php_postflight_install = base64_decode($item->php_postflight_install); + } + + if (!empty($item->sql_uninstall)) + { + // base64 Decode sql_uninstall. + $item->sql_uninstall = base64_decode($item->sql_uninstall); } if (!empty($item->php_helper_both)) @@ -1080,34 +1080,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['addcontributors'] = ''; } - // Set the php_preflight_install string to base64 string. - if (isset($data['php_preflight_install'])) + // Set the php_site_event string to base64 string. + if (isset($data['php_site_event'])) { - $data['php_preflight_install'] = base64_encode($data['php_preflight_install']); - } - - // Set the php_postflight_install string to base64 string. - if (isset($data['php_postflight_install'])) - { - $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); - } - - // Set the css_admin string to base64 string. - if (isset($data['css_admin'])) - { - $data['css_admin'] = base64_encode($data['css_admin']); - } - - // Set the php_method_uninstall string to base64 string. - if (isset($data['php_method_uninstall'])) - { - $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); - } - - // Set the sql_uninstall string to base64 string. - if (isset($data['sql_uninstall'])) - { - $data['sql_uninstall'] = base64_encode($data['sql_uninstall']); + $data['php_site_event'] = base64_encode($data['php_site_event']); } // Set the php_admin_event string to base64 string. @@ -1116,10 +1092,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['php_admin_event'] = base64_encode($data['php_admin_event']); } - // Set the php_site_event string to base64 string. - if (isset($data['php_site_event'])) + // Set the php_method_uninstall string to base64 string. + if (isset($data['php_method_uninstall'])) { - $data['php_site_event'] = base64_encode($data['php_site_event']); + $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); + } + + // Set the php_preflight_install string to base64 string. + if (isset($data['php_preflight_install'])) + { + $data['php_preflight_install'] = base64_encode($data['php_preflight_install']); + } + + // Set the css_admin string to base64 string. + if (isset($data['css_admin'])) + { + $data['css_admin'] = base64_encode($data['css_admin']); + } + + // Set the php_postflight_install string to base64 string. + if (isset($data['php_postflight_install'])) + { + $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); + } + + // Set the sql_uninstall string to base64 string. + if (isset($data['sql_uninstall'])) + { + $data['sql_uninstall'] = base64_encode($data['sql_uninstall']); } // Set the php_helper_both string to base64 string. diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 22e83b9fd..d8669650a 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -29,7 +29,6 @@ class ComponentbuilderModelJoomla_components extends JModelList 'a.modified_by','modified_by', 'a.system_name','system_name', 'a.name_code','name_code', - 'a.component_version','component_version', 'a.short_description','short_description', 'a.companyname','companyname', 'a.author','author' @@ -1710,9 +1709,6 @@ class ComponentbuilderModelJoomla_components extends JModelList $name_code = $this->getUserStateFromRequest($this->context . '.filter.name_code', 'filter_name_code'); $this->setState('filter.name_code', $name_code); - $component_version = $this->getUserStateFromRequest($this->context . '.filter.component_version', 'filter_component_version'); - $this->setState('filter.component_version', $component_version); - $short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description'); $this->setState('filter.short_description', $short_description); @@ -1831,7 +1827,7 @@ class ComponentbuilderModelJoomla_components extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.system_name LIKE '.$search.' OR a.name_code LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.companyname LIKE '.$search.' OR a.author LIKE '.$search.' OR a.name LIKE '.$search.')'); + $query->where('(a.system_name LIKE '.$search.' OR a.name_code LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.companyname LIKE '.$search.' OR a.author LIKE '.$search.' OR a.email LIKE '.$search.' OR a.website LIKE '.$search.' OR a.name LIKE '.$search.')'); } } @@ -1915,20 +1911,20 @@ class ComponentbuilderModelJoomla_components extends JModelList continue; } - // decode php_preflight_install - $item->php_preflight_install = base64_decode($item->php_preflight_install); - // decode php_postflight_install - $item->php_postflight_install = base64_decode($item->php_postflight_install); - // decode css_admin - $item->css_admin = base64_decode($item->css_admin); - // decode php_method_uninstall - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); - // decode sql_uninstall - $item->sql_uninstall = base64_decode($item->sql_uninstall); - // decode php_admin_event - $item->php_admin_event = base64_decode($item->php_admin_event); // decode php_site_event $item->php_site_event = base64_decode($item->php_site_event); + // decode php_admin_event + $item->php_admin_event = base64_decode($item->php_admin_event); + // decode php_method_uninstall + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + // decode php_preflight_install + $item->php_preflight_install = base64_decode($item->php_preflight_install); + // decode css_admin + $item->css_admin = base64_decode($item->css_admin); + // decode php_postflight_install + $item->php_postflight_install = base64_decode($item->php_postflight_install); + // decode sql_uninstall + $item->sql_uninstall = base64_decode($item->sql_uninstall); // decode php_helper_both $item->php_helper_both = base64_decode($item->php_helper_both); // decode php_helper_admin @@ -2021,7 +2017,6 @@ class ComponentbuilderModelJoomla_components extends JModelList $id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.system_name'); $id .= ':' . $this->getState('filter.name_code'); - $id .= ':' . $this->getState('filter.component_version'); $id .= ':' . $this->getState('filter.short_description'); $id .= ':' . $this->getState('filter.companyname'); $id .= ':' . $this->getState('filter.author'); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 275462c8f..af38e50bd 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -100,11 +100,11 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_state` (`published`), KEY `idx_system_name` (`system_name`), KEY `idx_name_code` (`name_code`), - KEY `idx_adduikit` (`adduikit`), - KEY `idx_add_update_server` (`add_update_server`), - KEY `idx_add_placeholders` (`add_placeholders`), - KEY `idx_mvc_versiondate` (`mvc_versiondate`), KEY `idx_debug_linenr` (`debug_linenr`), + KEY `idx_add_update_server` (`add_update_server`), + KEY `idx_mvc_versiondate` (`mvc_versiondate`), + KEY `idx_add_placeholders` (`add_placeholders`), + KEY `idx_adduikit` (`adduikit`), KEY `idx_add_email_helper` (`add_email_helper`), KEY `idx_add_license` (`add_license`), KEY `idx_license_type` (`license_type`), @@ -235,17 +235,18 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), KEY `idx_name_single` (`name_single`), - KEY `idx_name_list` (`name_list`), + KEY `idx_add_php_batchmove` (`add_php_batchmove`), KEY `idx_add_php_allowedit` (`add_php_allowedit`), KEY `idx_add_php_postsavehook` (`add_php_postsavehook`), KEY `idx_add_php_before_save` (`add_php_before_save`), KEY `idx_add_php_getlistquery` (`add_php_getlistquery`), + KEY `idx_add_php_getitems` (`add_php_getitems`), + KEY `idx_add_sql` (`add_sql`), + KEY `idx_add_fadein` (`add_fadein`), + KEY `idx_add_php_after_publish` (`add_php_after_publish`), KEY `idx_add_php_after_delete` (`add_php_after_delete`), KEY `idx_type` (`type`), - KEY `idx_add_fadein` (`add_fadein`), - KEY `idx_add_php_batchmove` (`add_php_batchmove`), - KEY `idx_add_php_after_publish` (`add_php_after_publish`), - KEY `idx_add_sql` (`add_sql`), + KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), KEY `idx_add_php_getform` (`add_php_getform`), KEY `idx_add_php_save` (`add_php_save`), KEY `idx_add_php_allowadd` (`add_php_allowadd`), @@ -254,8 +255,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_add_php_before_delete` (`add_php_before_delete`), KEY `idx_add_php_document` (`add_php_document`), KEY `idx_add_custom_import` (`add_custom_import`), - KEY `idx_add_php_getitems` (`add_php_getitems`), - KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), + KEY `idx_name_list` (`name_list`), KEY `idx_add_css_view` (`add_css_view`), KEY `idx_add_css_views` (`add_css_views`), KEY `idx_add_javascript_view_file` (`add_javascript_view_file`), diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php index fb821e443..4c9371479 100644 --- a/admin/views/admin_views/tmpl/default_body.php +++ b/admin/views/admin_views/tmpl/default_body.php @@ -61,38 +61,76 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view. -
- get('admin_view.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'admin_views.', $canCheckin); ?> - - - escape($item->system_name); ?> +
+ get('admin_view.edit')): ?> + escape($item->system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'admin_views.', $canCheckin); ?> + + escape($item->system_name); ?> + + - + type); ?> +
+ 'admin_fields', + 'views' => 'admins_fields', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_FIELDS'), + 'icon' => 'list'), + array( + 'view' => 'admin_fields_relations', + 'views' => 'admins_fields_relations', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS'), + 'icon' => 'tree-2'), + array( + 'view' => 'admin_fields_conditions', + 'views' => 'admins_fields_conditions', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS'), + 'icon' => 'shuffle') + ); + } + ?> +
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'admin_view', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
- -
- get('admin_view.edit') && $admin_field_id = ComponentbuilderHelper::getVar('admin_fields', $item->id, 'admin_view', 'id')): ?> - - - get('admin_view.edit') && $admin_relation_id = ComponentbuilderHelper::getVar('admin_fields_relations', $item->id, 'admin_view', 'id')): ?> - - - get('admin_view.edit') && $admin_condition_id = ComponentbuilderHelper::getVar('admin_fields_conditions', $item->id, 'admin_view', 'id')): ?> - - + + +
: + escape($item->name_single); ?>
+ : + escape($item->name_list); ?>
- - escape($item->name_single); ?> - - - escape($item->name_list); ?> - - - escape($item->short_description); ?> +
+ escape($item->short_description); ?> +
    +
  • : + add_custom_button); ?>
  • +
  • : + add_custom_import); ?>
  • +
  • : + add_fadein); ?>
  • +
  • : + add_php_ajax); ?>
  • +
+
get('admin_view.edit.state')) : ?> diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php index 28d09172a..ab9d66423 100644 --- a/admin/views/admin_views/tmpl/default_foot.php +++ b/admin/views/admin_views/tmpl/default_foot.php @@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access'); ?> - pagination->getListFooter(); ?> + pagination->getListFooter(); ?> \ No newline at end of file diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 3d5e7d8cf..17394480b 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -33,13 +33,10 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> - - - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index 94f86e694..90f95edc0 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -182,7 +182,117 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy 'batch[access]', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') ); - } + } + + // Set Add Fadein Selection + $this->add_fadeinOptions = $this->getTheAdd_fadeinSelections(); + if ($this->add_fadeinOptions) + { + // Add Fadein Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', + 'filter_add_fadein', + JHtml::_('select.options', $this->add_fadeinOptions, 'value', 'text', $this->state->get('filter.add_fadein')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Add Fadein Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_FADEIN_LABEL').' -', + 'batch[add_fadein]', + JHtml::_('select.options', $this->add_fadeinOptions, 'value', 'text') + ); + } + } + + // Set Type Selection + $this->typeOptions = $this->getTheTypeSelections(); + if ($this->typeOptions) + { + // Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', + 'filter_type', + JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') + ); + } + } + + // Set Add Custom Import Selection + $this->add_custom_importOptions = $this->getTheAdd_custom_importSelections(); + if ($this->add_custom_importOptions) + { + // Add Custom Import Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', + 'filter_add_custom_import', + JHtml::_('select.options', $this->add_custom_importOptions, 'value', 'text', $this->state->get('filter.add_custom_import')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Add Custom Import Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL').' -', + 'batch[add_custom_import]', + JHtml::_('select.options', $this->add_custom_importOptions, 'value', 'text') + ); + } + } + + // Set Add Custom Button Selection + $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); + if ($this->add_custom_buttonOptions) + { + // Add Custom Button Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', + 'filter_add_custom_button', + JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Add Custom Button Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -', + 'batch[add_custom_button]', + JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text') + ); + } + } + + // Set Add Php Ajax Selection + $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); + if ($this->add_php_ajaxOptions) + { + // Add Php Ajax Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', + 'filter_add_php_ajax', + JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Add Php Ajax Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -', + 'batch[add_php_ajax]', + JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text') + ); + } + } } /** @@ -230,9 +340,188 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SYSTEM_NAME_LABEL'), 'a.name_single' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_LABEL'), - 'a.name_list' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); + } + + protected function getTheAdd_fadeinSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_fadein')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_fadein') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $add_fadein) + { + // Translate the add_fadein selection + $text = $model->selectionTranslation($add_fadein,'add_fadein'); + // Now add the add_fadein and its text to the options array + $_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheTypeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheAdd_custom_importSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_import')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_custom_import') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $add_custom_import) + { + // Translate the add_custom_import selection + $text = $model->selectionTranslation($add_custom_import,'add_custom_import'); + // Now add the add_custom_import and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheAdd_custom_buttonSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_custom_button')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_custom_button') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $add_custom_button) + { + // Translate the add_custom_button selection + $text = $model->selectionTranslation($add_custom_button,'add_custom_button'); + // Now add the add_custom_button and its text to the options array + $_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text)); + } + return $_filter; + } + return false; + } + + protected function getTheAdd_php_ajaxSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('add_php_ajax')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('add_php_ajax') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $add_php_ajax) + { + // Translate the add_php_ajax selection + $text = $model->selectionTranslation($add_php_ajax,'add_php_ajax'); + // Now add the add_php_ajax and its text to the options array + $_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text)); + } + return $_filter; + } + return false; } } diff --git a/admin/views/componentbuilder/tmpl/default.php b/admin/views/componentbuilder/tmpl/default.php index a7ed1f119..9a357b22a 100644 --- a/admin/views/componentbuilder/tmpl/default.php +++ b/admin/views/componentbuilder/tmpl/default.php @@ -77,20 +77,20 @@ JHtml::_('behavior.tooltip');
- -
-
- 'notice_board_one')); ?> - - loadTemplate('notice_board_vast_development_method');?> - - -
-
- Joomla! Volunteers Portal -
-
- + +
+
+ 'notice_board_one')); ?> + + loadTemplate('notice_board_vast_development_method');?> + + +
+
+ Joomla! Volunteers Portal +
+
+
diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index da8f7668f..2bc35dcf8 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -200,7 +200,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy $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); // add var key - $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); + $this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';"); JText::script('view not acceptable. Error'); } } diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index be3bb4e9f..95607e7a7 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -61,66 +61,134 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml -
- get('joomla_component.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?> - - - escape($item->system_name); ?> - -
- -
- get('component_admin_views.edit') && $component_admin_views_id = ComponentbuilderHelper::getVar('component_admin_views', $item->id, 'joomla_component', 'id')): ?> - - - get('component_custom_admin_views.edit') && $component_custom_admin_views_id = ComponentbuilderHelper::getVar('component_custom_admin_views', $item->id, 'joomla_component', 'id')): ?> - - - get('component_site_views.edit') && $component_site_views_id = ComponentbuilderHelper::getVar('component_site_views', $item->id, 'joomla_component', 'id')): ?> - - - get('component_config.edit') && $component_config_id = ComponentbuilderHelper::getVar('component_config', $item->id, 'joomla_component', 'id')): ?> - +
+ get('joomla_component.edit')): ?> + escape($item->system_name); ?> + checked_out): ?> + name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?> + + escape($item->system_name); ?> + + - escape($item->component_version); ?> +
+ 'component_admin_views', + 'views' => 'components_admin_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS'), + 'icon' => 'stack'), + array( + 'view' => 'component_custom_admin_views', + 'views' => 'components_custom_admin_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_VIEWS'), + 'icon' => 'screen'), + array( + 'view' => 'component_site_views', + 'views' => 'components_site_views', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS'), + 'icon' => 'palette'), + array( + 'view' => 'component_config', + 'views' => 'components_config', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG'), + 'icon' => 'options') + ); + $_buttons[1] = array( + array( + 'view' => 'component_updates', + 'views' => 'components_updates', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES'), + 'icon' => 'database'), + array( + 'view' => 'component_mysql_tweaks', + 'views' => 'components_mysql_tweaks', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS'), + 'icon' => 'screwdriver'), + array( + 'view' => 'component_files_folders', + 'views' => 'components_files_folders', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS'), + 'icon' => 'briefcase') + ); + $_buttons[2] = array( + array( + 'view' => 'component_custom_admin_menus', + 'views' => 'components_custom_admin_menus', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS'), + 'icon' => 'plus'), + array( + 'view' => 'component_dashboard', + 'views' => 'components_dashboard', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD'), + 'icon' => 'dashboard') + ); + } + ?> +
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
-
escape($item->name_code); ?>
-
- get('component_updates.edit') && $component_updates_id = ComponentbuilderHelper::getVar('component_updates', $item->id, 'joomla_component', 'id')): ?> - - - get('component_mysql_tweaks.edit') && $component_mysql_tweaks_id = ComponentbuilderHelper::getVar('component_mysql_tweaks', $item->id, 'joomla_component', 'id')): ?> - - - get('component_files_folders.edit') && $component_files_folders_id = ComponentbuilderHelper::getVar('component_files_folders', $item->id, 'joomla_component', 'id')): ?> - - +
+ escape($item->name_code); ?> +
+
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
- escape($item->component_version); ?> - - -
escape($item->short_description); ?>
-
- get('component_custom_admin_menus.edit') && $component_custom_admin_menus_id = ComponentbuilderHelper::getVar('component_custom_admin_menus', $item->id, 'joomla_component', 'id')): ?> - - - get('component_dashboard.edit') && $component_dashboard_id = ComponentbuilderHelper::getVar('component_dashboard', $item->id, 'joomla_component', 'id')): ?> - - +
+ escape($item->short_description); ?> +
+
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'joomla_component', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
- - escape($item->companyname); ?> - - - escape($item->author); ?> +
escape($item->companyname); ?>
+ author)) : ?> + escape($item->author); ?>
+ + email) && ComponentbuilderHelper::checkString($item->author)) : ?> + + escape($item->email); ?> + +
+ + website) && ComponentbuilderHelper::checkString($item->author)) : ?> + + escape($item->website); ?> + + +
get('joomla_component.edit.state')) : ?> diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index d62662067..28d09172a 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access'); ?> - pagination->getListFooter(); ?> + pagination->getListFooter(); ?> \ No newline at end of file diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index daff17e8e..2ff00973f 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -33,19 +33,13 @@ defined('_JEXEC') or die('Restricted access'); listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> - listDirn, $this->listOrder); ?> - - - listDirn, $this->listOrder); ?> - - - listDirn, $this->listOrder); ?> + listDirn, $this->listOrder); ?> canState): ?> diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 20647048f..44ab14cf3 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -294,10 +294,8 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy 'a.published' => JText::_('JSTATUS'), 'a.system_name' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL'), 'a.name_code' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL'), - 'a.component_version' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL'), 'a.short_description' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_LABEL'), 'a.companyname' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL'), - 'a.author' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } diff --git a/admin/views/libraries/tmpl/default_body.php b/admin/views/libraries/tmpl/default_body.php index 718c67fca..813a4af5f 100644 --- a/admin/views/libraries/tmpl/default_body.php +++ b/admin/views/libraries/tmpl/default_body.php @@ -61,26 +61,47 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit" -
- get('library.edit')): ?> - escape($item->name); ?> - checked_out): ?> - name, $item->checked_out_time, 'libraries.', $canCheckin); ?> - - - escape($item->name); ?> +
+ get('library.edit')): ?> + escape($item->name); ?> + checked_out): ?> + name, $item->checked_out_time, 'libraries.', $canCheckin); ?> + + escape($item->name); ?> + +
+ 'library_config', + 'views' => 'libraries_config', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS'), + 'icon' => 'options'), + array( + 'view' => 'library_files_folders_urls', + 'views' => 'libraries_files_folders_urls', + 'title' => JText::_('COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS'), + 'icon' => 'briefcase') + ); + } + ?> +
+ + get($_button['view'].'.edit') && ($id = ComponentbuilderHelper::getVar($_button['view'], $item->id, 'library', 'id')) !== false): ?> + + get($_button['view'].'.create')): ?> + + +
- -
- get('library_config.edit') && $library_config_id = ComponentbuilderHelper::getVar('library_config', $item->id, 'library', 'id')): ?> - - - get('library_files_folders_urls.edit') && $library_files_folders_urls_id = ComponentbuilderHelper::getVar('library_files_folders_urls', $item->id, 'library', 'id')): ?> - - -
- escape($item->description); ?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 3f5145d18..d44887d68 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 18th August, 2018 + 19th August, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index 37c1968e5..b2bee5299 100644 --- a/script.php +++ b/script.php @@ -3366,9 +3366,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_preflight_install","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","php_preflight_install":"php_preflight_install","php_postflight_install":"php_postflight_install","css_admin":"css_admin","sales_server":"sales_server","adduikit":"adduikit","add_update_server":"add_update_server","copyright":"copyright","add_placeholders":"add_placeholders","description":"description","mvc_versiondate":"mvc_versiondate","php_method_uninstall":"php_method_uninstall","debug_linenr":"debug_linenr","sql_uninstall":"sql_uninstall","php_admin_event":"php_admin_event","php_site_event":"php_site_event","php_helper_both":"php_helper_both","add_email_helper":"add_email_helper","email":"email","php_helper_admin":"php_helper_admin","website":"website","php_helper_site":"php_helper_site","add_license":"add_license","javascript":"javascript","license_type":"license_type","css_site":"css_site","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","whmcs_buy_link":"whmcs_buy_link","sql":"sql","license":"license","readme":"readme","bom":"bom","update_server_target":"update_server_target","image":"image","update_server":"update_server","not_required":"not_required","buildcomp":"buildcomp","creatuserhelper":"creatuserhelper","addfootable":"addfootable","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_css_admin":"add_css_admin","add_css_site":"add_css_site","toignore":"toignore","dashboard_type":"dashboard_type","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","export_key":"export_key","add_php_preflight_update":"add_php_preflight_update","joomla_source_link":"joomla_source_link","add_php_postflight_install":"add_php_postflight_install","export_buy_link":"export_buy_link","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server_url":"update_server_url","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql","name":"name"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_site_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_site_event":"php_site_event","php_admin_event":"php_admin_event","debug_linenr":"debug_linenr","sales_server":"sales_server","add_update_server":"add_update_server","php_method_uninstall":"php_method_uninstall","php_preflight_install":"php_preflight_install","mvc_versiondate":"mvc_versiondate","add_placeholders":"add_placeholders","css_admin":"css_admin","description":"description","php_postflight_install":"php_postflight_install","copyright":"copyright","sql_uninstall":"sql_uninstall","adduikit":"adduikit","php_helper_both":"php_helper_both","author":"author","component_version":"component_version","add_email_helper":"add_email_helper","email":"email","php_helper_admin":"php_helper_admin","website":"website","php_helper_site":"php_helper_site","add_license":"add_license","javascript":"javascript","license_type":"license_type","css_site":"css_site","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","whmcs_buy_link":"whmcs_buy_link","sql":"sql","license":"license","readme":"readme","bom":"bom","update_server_target":"update_server_target","image":"image","update_server":"update_server","not_required":"not_required","buildcomp":"buildcomp","creatuserhelper":"creatuserhelper","addfootable":"addfootable","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_css_admin":"add_css_admin","add_css_site":"add_css_site","toignore":"toignore","dashboard_type":"dashboard_type","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","export_key":"export_key","add_php_preflight_update":"add_php_preflight_update","joomla_source_link":"joomla_source_link","add_php_postflight_install":"add_php_postflight_install","export_buy_link":"export_buy_link","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server_url":"update_server_url","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql","name":"name"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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","sales_server","adduikit","add_update_server","add_placeholders","mvc_versiondate","debug_linenr","add_email_helper","add_license","license_type","update_server_target","update_server","not_required","buildcomp","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","emptycontributors","addreadme","number","add_sales_server"],"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": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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","debug_linenr","sales_server","add_update_server","mvc_versiondate","add_placeholders","adduikit","add_email_helper","add_license","license_type","update_server_target","update_server","not_required","buildcomp","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","emptycontributors","addreadme","number","add_sales_server"],"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": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"}]}'; // Set the object into the content types table. $joomla_component_Inserted = $db->insertObject('#__content_types', $joomla_component); @@ -3378,9 +3378,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $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": "php_getitems","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_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","php_import_save":"php_import_save","add_php_after_delete":"add_php_after_delete","type":"type","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","add_php_batchmove":"add_php_batchmove","not_required":"not_required","add_php_after_publish":"add_php_after_publish","add_sql":"add_sql","html_import_view":"html_import_view","icon_add":"icon_add","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","alias_builder_type":"alias_builder_type","add_php_before_publish":"add_php_before_publish","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_getitems":"add_php_getitems","php_import_headers":"php_import_headers","add_php_getitems_after_all":"add_php_getitems_after_all","icon":"icon","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_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; + $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": "php_getitems","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","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","add_php_getitems":"add_php_getitems","icon":"icon","add_sql":"add_sql","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_after_publish":"add_php_after_publish","html_import_view":"html_import_view","add_php_after_delete":"add_php_after_delete","type":"type","not_required":"not_required","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","alias_builder_type":"alias_builder_type","add_php_document":"add_php_document","add_custom_import":"add_custom_import","alias_builder":"alias_builder","php_import_headers":"php_import_headers","name_list":"name_list","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_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; $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_allowedit","add_php_postsavehook","add_php_before_save","add_php_getlistquery","add_php_after_delete","type","add_fadein","add_php_batchmove","add_php_after_publish","add_sql","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitems","add_php_getitems_after_all","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","add_php_getitem"],"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_postsavehook","add_php_before_save","add_php_getlistquery","add_php_getitems","add_sql","add_fadein","add_php_after_publish","add_php_after_delete","type","add_php_getitems_after_all","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","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","add_php_getitem"],"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); @@ -3800,9 +3800,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_preflight_install","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","php_preflight_install":"php_preflight_install","php_postflight_install":"php_postflight_install","css_admin":"css_admin","sales_server":"sales_server","adduikit":"adduikit","add_update_server":"add_update_server","copyright":"copyright","add_placeholders":"add_placeholders","description":"description","mvc_versiondate":"mvc_versiondate","php_method_uninstall":"php_method_uninstall","debug_linenr":"debug_linenr","sql_uninstall":"sql_uninstall","php_admin_event":"php_admin_event","php_site_event":"php_site_event","php_helper_both":"php_helper_both","add_email_helper":"add_email_helper","email":"email","php_helper_admin":"php_helper_admin","website":"website","php_helper_site":"php_helper_site","add_license":"add_license","javascript":"javascript","license_type":"license_type","css_site":"css_site","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","whmcs_buy_link":"whmcs_buy_link","sql":"sql","license":"license","readme":"readme","bom":"bom","update_server_target":"update_server_target","image":"image","update_server":"update_server","not_required":"not_required","buildcomp":"buildcomp","creatuserhelper":"creatuserhelper","addfootable":"addfootable","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_css_admin":"add_css_admin","add_css_site":"add_css_site","toignore":"toignore","dashboard_type":"dashboard_type","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","export_key":"export_key","add_php_preflight_update":"add_php_preflight_update","joomla_source_link":"joomla_source_link","add_php_postflight_install":"add_php_postflight_install","export_buy_link":"export_buy_link","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server_url":"update_server_url","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql","name":"name"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_site_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_site_event":"php_site_event","php_admin_event":"php_admin_event","debug_linenr":"debug_linenr","sales_server":"sales_server","add_update_server":"add_update_server","php_method_uninstall":"php_method_uninstall","php_preflight_install":"php_preflight_install","mvc_versiondate":"mvc_versiondate","add_placeholders":"add_placeholders","css_admin":"css_admin","description":"description","php_postflight_install":"php_postflight_install","copyright":"copyright","sql_uninstall":"sql_uninstall","adduikit":"adduikit","php_helper_both":"php_helper_both","author":"author","component_version":"component_version","add_email_helper":"add_email_helper","email":"email","php_helper_admin":"php_helper_admin","website":"website","php_helper_site":"php_helper_site","add_license":"add_license","javascript":"javascript","license_type":"license_type","css_site":"css_site","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","whmcs_buy_link":"whmcs_buy_link","sql":"sql","license":"license","readme":"readme","bom":"bom","update_server_target":"update_server_target","image":"image","update_server":"update_server","not_required":"not_required","buildcomp":"buildcomp","creatuserhelper":"creatuserhelper","addfootable":"addfootable","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_css_admin":"add_css_admin","add_css_site":"add_css_site","toignore":"toignore","dashboard_type":"dashboard_type","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","export_key":"export_key","add_php_preflight_update":"add_php_preflight_update","joomla_source_link":"joomla_source_link","add_php_postflight_install":"add_php_postflight_install","export_buy_link":"export_buy_link","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server_url":"update_server_url","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql","name":"name"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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","sales_server","adduikit","add_update_server","add_placeholders","mvc_versiondate","debug_linenr","add_email_helper","add_license","license_type","update_server_target","update_server","not_required","buildcomp","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","emptycontributors","addreadme","number","add_sales_server"],"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": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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","debug_linenr","sales_server","add_update_server","mvc_versiondate","add_placeholders","adduikit","add_email_helper","add_license","license_type","update_server_target","update_server","not_required","buildcomp","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","emptycontributors","addreadme","number","add_sales_server"],"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": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"}]}'; // Check if joomla_component type is already in content_type DB. $joomla_component_id = null; @@ -3829,9 +3829,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $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": "php_getitems","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_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","php_import_save":"php_import_save","add_php_after_delete":"add_php_after_delete","type":"type","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","add_php_batchmove":"add_php_batchmove","not_required":"not_required","add_php_after_publish":"add_php_after_publish","add_sql":"add_sql","html_import_view":"html_import_view","icon_add":"icon_add","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","alias_builder_type":"alias_builder_type","add_php_before_publish":"add_php_before_publish","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_getitems":"add_php_getitems","php_import_headers":"php_import_headers","add_php_getitems_after_all":"add_php_getitems_after_all","icon":"icon","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_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; + $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": "php_getitems","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","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","add_php_getitems":"add_php_getitems","icon":"icon","add_sql":"add_sql","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_after_publish":"add_php_after_publish","html_import_view":"html_import_view","add_php_after_delete":"add_php_after_delete","type":"type","not_required":"not_required","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","alias_builder_type":"alias_builder_type","add_php_document":"add_php_document","add_custom_import":"add_custom_import","alias_builder":"alias_builder","php_import_headers":"php_import_headers","name_list":"name_list","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_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; $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_allowedit","add_php_postsavehook","add_php_before_save","add_php_getlistquery","add_php_after_delete","type","add_fadein","add_php_batchmove","add_php_after_publish","add_sql","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_php_getitems","add_php_getitems_after_all","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","add_php_getitem"],"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_postsavehook","add_php_before_save","add_php_getlistquery","add_php_getitems","add_sql","add_fadein","add_php_after_publish","add_php_after_delete","type","add_php_getitems_after_all","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","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","add_php_getitem"],"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; diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index fbe668e19..6600e0e4e 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -3549,10 +3549,10 @@ abstract class ComponentbuilderHelper /** * Get the edit button * - * @param int $item The item to edit - * @param string $view The type of item to edit - * @param string $views The list view controller name - * @param string $ref The return path + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $ref The return path * @param string $headsup The message to show on click of button * * @return string On success the full html edit button @@ -3612,9 +3612,9 @@ abstract class ComponentbuilderHelper /** * Get the edit URL * - * @param int $item The item to edit - * @param string $view The type of item to edit - * @param string $ref The return path + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $ref The return path * * @return string On success the edit url *