diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b1a3db24..3fc4cc173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v4.0.0-alpha5 + +- Add Factory class to the J5 Event class. #1093 +- Fix customfilelist field to conform to the new namespacing conventions. #1094 +- Add menus for languages, servers, get snippets to J4 #1095 + # v4.0.0-alpha4 - Fix plugin field selection @@ -19,9 +25,6 @@ - First alpha release of Component Builder towards Joomla 4 (very unstable...) -# v3.2.0-beta7 +# v3.2.0-beta8 -- Fix plugin field selection -- Fix plugin params tab layout -- Add issue templates -- Force autoloader to always load \ No newline at end of file +- Add Factory class to the J5 Event class. #1093 \ No newline at end of file diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index 1248617ae..494fb5af5 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -497,6 +497,9 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface // Remove Joomla_plugin_files_folders_urls from action logs config table. $this->removeActionLogConfig('com_componentbuilder.joomla_plugin_files_folders_urls'); + // Remove Field from action logs config table. + $this->removeActionLogConfig('com_componentbuilder.field'); + // Remove Joomla_component from action logs config table. $this->removeActionLogConfig('com_componentbuilder.joomla_component'); // little notice as after service, in case of bad experience with component. @@ -1454,7 +1457,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface // Fix the assets table rules column size. - $this->setDatabaseAssetsRulesFix(99360, "MEDIUMTEXT"); + $this->setDatabaseAssetsRulesFix(99520, "MEDIUMTEXT"); // Install the global extension params. $this->setExtensionsParams( '{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","approved_paths":"default","add_custom_gitea_url":"1","custom_gitea_url":"https://git.vdm.dev","super_powers_core_organisation":"joomla","super_powers_core":"joomla/super-powers","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"ยป","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}' @@ -2252,6 +2255,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface 'COM_COMPONENTBUILDER' ); + // Add Field to the action logs config table. + $this->setActionLogConfig( + // typeTitle + 'FIELD', + // typeAlias + 'com_componentbuilder.field', + // idHolder + 'id', + // titleHolder + 'name', + // tableName + '#__componentbuilder_field', + // textPrefix + 'COM_COMPONENTBUILDER' + ); + // Add Joomla_component to the action logs config table. $this->setActionLogConfig( // typeTitle @@ -3146,7 +3165,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

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

'; +

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

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); @@ -3935,6 +3954,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface 'COM_COMPONENTBUILDER' ); + // Add/Update Field in the action logs config table. + $this->setActionLogConfig( + // typeTitle + 'FIELD', + // typeAlias + 'com_componentbuilder.field', + // idHolder + 'id', + // titleHolder + 'name', + // tableName + '#__componentbuilder_field', + // textPrefix + 'COM_COMPONENTBUILDER' + ); + // Add/Update Joomla_component in the action logs config table. $this->setActionLogConfig( // typeTitle diff --git a/README.md b/README.md index 2aa07b3c1..cce2ac61d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.0-alpha4) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.0-alpha5) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 15th March, 2024 -+ *Version*: 4.0.0-alpha4 ++ *Last Build*: 20th March, 2024 ++ *Version*: 4.0.0-alpha5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **725351** ++ *Line count*: **725003** + *Field count*: **2078** -+ *File count*: **5118** ++ *File count*: **5119** + *Folder count*: **518** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 2aa07b3c1..cce2ac61d 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.0-alpha4) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.0-alpha5) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 15th March, 2024 -+ *Version*: 4.0.0-alpha4 ++ *Last Build*: 20th March, 2024 ++ *Version*: 4.0.0-alpha5 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **725351** ++ *Line count*: **725003** + *Field count*: **2078** -+ *File count*: **5118** ++ *File count*: **5119** + *Folder count*: **518** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/access.xml b/admin/access.xml index 86cf7d64b..d15f3cc2f 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -434,6 +434,7 @@ + diff --git a/admin/assets/images/icons/languages.png b/admin/assets/images/icons/languages.png new file mode 100644 index 000000000..94873206e Binary files /dev/null and b/admin/assets/images/icons/languages.png differ diff --git a/admin/forms/component_placeholders.xml b/admin/forms/component_placeholders.xml index 87484835e..7f634dcb6 100644 --- a/admin/forms/component_placeholders.xml +++ b/admin/forms/component_placeholders.xml @@ -148,19 +148,20 @@ hint="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_TARGET_HINT" autocomplete="off" /> - + diff --git a/admin/forms/placeholder.xml b/admin/forms/placeholder.xml index 84442d55c..92cea0d71 100644 --- a/admin/forms/placeholder.xml +++ b/admin/forms/placeholder.xml @@ -113,19 +113,20 @@ hint="COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_HINT" autocomplete="off" /> - + diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 99ba588e7..1253b5fdd 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4314,6 +4314,7 @@ COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages

vycfields; $user = Factory::getApplication()->getIdentity(); $id = $displayData->item->id; -// set the edit URL -$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; -// set a return value -$return = ($id) ? "index.php?option=com_componentbuilder&view=fieldtype&layout=edit&id=" . $id : ""; -// check for a return value -$jinput = Factory::getApplication()->input; -if ($_return = $jinput->get('return', null, 'base64')) -{ - $return .= "&return=" . $_return; -} -// check if return value was set -if (StringHelper::check($return)) -{ - // set the referral values - $ref = ($id) ? "&ref=fieldtype&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); -} -else -{ - $ref = ($id) ? "&ref=fieldtype&refid=" . $id : ""; -} -// set the create new URL -$new = "index.php?option=com_componentbuilder&view=fields&task=field.edit" . $ref; -// set the create new and close URL -$close_new = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; -// load the action object -$can = ComponentbuilderHelper::getActions('field'); + ?>
-get('field.create')): ?> -
- - -


- - - - - - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('field',$item,'fields'); - ?> - - - - - - - - - published == 1): ?> - - published == 0): ?> - - published == 2): ?> - - published == -2): ?> - - - - - - -
- - - - - - - - - - - - - - - - - -
- get('field.edit')): ?> - escape($item->name); ?> - checked_out): ?> - name, $item->checked_out_time, 'fields.', $canCheckin); ?> - - - escape($item->name); ?> - - - escape($item->fieldtype_name); ?> - - datatype); ?> - - indexes); ?> - - null_switch); ?> - - store); ?> - - authorise('core.edit', 'com_componentbuilder.field.category.' . (int)$item->catid)): ?> - escape($item->category_title); ?> - - escape($item->category_title); ?> - - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- +oops! error.....
diff --git a/admin/sql/updates/mysql/3.2.0-beta7.sql b/admin/sql/updates/mysql/3.2.0-beta8.sql similarity index 100% rename from admin/sql/updates/mysql/3.2.0-beta7.sql rename to admin/sql/updates/mysql/3.2.0-beta8.sql diff --git a/admin/sql/updates/mysql/4.0.0-alpha4.sql b/admin/sql/updates/mysql/4.0.0-alpha4.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/4.0.0-alpha4.sql @@ -0,0 +1 @@ + diff --git a/admin/src/Field/CustomfilelistField.php b/admin/src/Field/CustomfilelistField.php index 8d579e2eb..838e02e0d 100644 --- a/admin/src/Field/CustomfilelistField.php +++ b/admin/src/Field/CustomfilelistField.php @@ -43,19 +43,16 @@ class CustomfilelistField extends ListField protected function getOptions() { // get custom folder files - $localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); + $localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom'); // set the default $options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder)); - // inport all needed classes - jimport('joomla.filesystem.file'); - jimport('joomla.filesystem.folder'); // setup the folder if it does not exist - if (!JFolder::exists($localfolder)) + if (!\JFolder::exists($localfolder)) { - JFolder::create($localfolder); + \JFolder::create($localfolder); } // now check if there are files in the folder - if ($files = JFolder::files($localfolder)) + if ($files = \JFolder::files($localfolder)) { $options = array(); foreach ($files as $file) diff --git a/admin/src/Model/ComponentbuilderModel.php b/admin/src/Model/ComponentbuilderModel.php index a3c76ddbd..ff23f7fd1 100644 --- a/admin/src/Model/ComponentbuilderModel.php +++ b/admin/src/Model/ComponentbuilderModel.php @@ -46,7 +46,7 @@ class ComponentbuilderModel extends ListModel $icons = []; // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.languages', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = [ @@ -155,6 +155,7 @@ class ComponentbuilderModel extends ListModel 'languages.access' => 'language.access', 'language.access' => 'language.access', 'languages.submenu' => 'language.submenu', + 'languages.dashboard_list' => 'language.dashboard_list', 'server.create' => 'server.create', 'servers.access' => 'server.access', 'server.access' => 'server.access', diff --git a/admin/src/Model/FieldtypeModel.php b/admin/src/Model/FieldtypeModel.php index 233428309..0a4a10aa1 100644 --- a/admin/src/Model/FieldtypeModel.php +++ b/admin/src/Model/FieldtypeModel.php @@ -279,258 +279,10 @@ class FieldtypeModel extends AdminModel $this->db->updateObject('#__componentbuilder_fieldtype', $objectUpdate, 'id'); } } - $this->fieldtypevvvv = $item->id; return $item; } - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getVycfields() - { - // Get the user object. - $user = Factory::getApplication()->getIdentity(); - // Create a new query object. - $db = $this->getDatabase(); - $query = $db->getQuery(true); - - // Select some fields - $query->select('a.*'); - $query->select($db->quoteName('c.title','category_title')); - - // From the componentbuilder_field table - $query->from($db->quoteName('#__componentbuilder_field', 'a')); - $query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')'); - - // do not use these filters in the export method - if (!isset($_export) || !$_export) - { - // Filtering "extension" - $filter_extension = $this->state->get("filter.extension"); - $field_ids = array(); - $get_ids = true; - if ($get_ids && $filter_extension !== null && !empty($filter_extension)) - { - // column name, and id - $type_extension = explode('__', $filter_extension); - if (($ids = JCBFilterHelper::linked((int) $type_extension[1], (string) $type_extension[0])) !== null) - { - $field_ids = $ids; - } - else - { - // there is none - $query->where($db->quoteName('a.id') . ' = ' . 0); - $get_ids = false; - } - } - - // Filtering "admin_view" - $filter_admin_view = $this->state->get("filter.admin_view"); - if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view)) - { - if (($ids = JCBFilterHelper::linked((int) $filter_admin_view, 'admin_view')) !== null) - { - // view will return less fields, so we ignore the component - $field_ids = $ids; - } - else - { - // there is none - $query->where($db->quoteName('a.id') . ' = ' . 0); - $get_ids = false; - } - } - // now check if we have IDs - if ($get_ids && UtilitiesArrayHelper::check($field_ids)) - { - $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $field_ids) . ')'); - } - } - - // From the componentbuilder_fieldtype table. - $query->select($db->quoteName('g.name','fieldtype_name')); - $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.id') . ')'); - - // Filter by fieldtypevvvv global. - $fieldtypevvvv = $this->fieldtypevvvv; - if (is_numeric($fieldtypevvvv )) - { - $query->where('a.fieldtype = ' . (int) $fieldtypevvvv ); - } - elseif (is_string($fieldtypevvvv)) - { - $query->where('a.fieldtype = ' . $db->quote($fieldtypevvvv)); - } - else - { - $query->where('a.fieldtype = -5'); - } - - // Join over the asset groups. - $query->select('ag.title AS access_level'); - $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); - // Filter by access level. - $_access = $this->getState('filter.access'); - if ($_access && is_numeric($_access)) - { - $query->where('a.access = ' . (int) $_access); - } - elseif (UtilitiesArrayHelper::check($_access)) - { - // Secure the array for the query - $_access = ArrayHelper::toInteger($_access); - // Filter by the Access Array. - $query->where('a.access IN (' . implode(',', $_access) . ')'); - } - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // Set values to display correctly. - if (UtilitiesArrayHelper::check($items)) - { - // Get the user object if not set. - if (!isset($user) || !ObjectHelper::check($user)) - { - $user = $this->getCurrentUser(); - } - foreach ($items as $nr => &$item) - { - // Remove items the user can't access. - $access = ($user->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && $user->authorise('field.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // set selection value to a translatable value - if (UtilitiesArrayHelper::check($items)) - { - foreach ($items as $nr => &$item) - { - // convert datatype - $item->datatype = $this->selectionTranslationVycfields($item->datatype, 'datatype'); - // convert indexes - $item->indexes = $this->selectionTranslationVycfields($item->indexes, 'indexes'); - // convert null_switch - $item->null_switch = $this->selectionTranslationVycfields($item->null_switch, 'null_switch'); - // convert store - $item->store = $this->selectionTranslationVycfields($item->store, 'store'); - } - } - - return $items; - } - return false; - } - - /** - * Method to convert selection values to translatable string. - * - * @return string The translatable string. - */ - public function selectionTranslationVycfields($value,$name) - { - // Array of datatype language strings - if ($name === 'datatype') - { - $datatypeArray = array( - 0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION', - 'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR', - 'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR', - 'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT', - 'MEDIUMTEXT' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT', - 'LONGTEXT' => 'COM_COMPONENTBUILDER_FIELD_LONGTEXT', - 'BLOB' => 'COM_COMPONENTBUILDER_FIELD_BLOB', - 'TINYBLOB' => 'COM_COMPONENTBUILDER_FIELD_TINYBLOB', - 'MEDIUMBLOB' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMBLOB', - 'LONGBLOB' => 'COM_COMPONENTBUILDER_FIELD_LONGBLOB', - 'DATETIME' => 'COM_COMPONENTBUILDER_FIELD_DATETIME', - 'DATE' => 'COM_COMPONENTBUILDER_FIELD_DATE', - 'TIME' => 'COM_COMPONENTBUILDER_FIELD_TIME', - 'INT' => 'COM_COMPONENTBUILDER_FIELD_INT', - 'TINYINT' => 'COM_COMPONENTBUILDER_FIELD_TINYINT', - 'BIGINT' => 'COM_COMPONENTBUILDER_FIELD_BIGINT', - 'FLOAT' => 'COM_COMPONENTBUILDER_FIELD_FLOAT', - 'DECIMAL' => 'COM_COMPONENTBUILDER_FIELD_DECIMAL', - 'DOUBLE' => 'COM_COMPONENTBUILDER_FIELD_DOUBLE' - ); - // Now check if value is found in this array - if (isset($datatypeArray[$value]) && UtilitiesStringHelper::check($datatypeArray[$value])) - { - return $datatypeArray[$value]; - } - } - // Array of indexes language strings - if ($name === 'indexes') - { - $indexesArray = array( - 1 => 'COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY', - 2 => 'COM_COMPONENTBUILDER_FIELD_KEY', - 0 => 'COM_COMPONENTBUILDER_FIELD_NONE' - ); - // Now check if value is found in this array - if (isset($indexesArray[$value]) && UtilitiesStringHelper::check($indexesArray[$value])) - { - return $indexesArray[$value]; - } - } - // Array of null_switch language strings - if ($name === 'null_switch') - { - $null_switchArray = array( - 'NULL' => 'COM_COMPONENTBUILDER_FIELD_NULL', - 'NOT NULL' => 'COM_COMPONENTBUILDER_FIELD_NOT_NULL' - ); - // Now check if value is found in this array - if (isset($null_switchArray[$value]) && UtilitiesStringHelper::check($null_switchArray[$value])) - { - return $null_switchArray[$value]; - } - } - // Array of store language strings - if ($name === 'store') - { - $storeArray = array( - 0 => 'COM_COMPONENTBUILDER_FIELD_DEFAULT', - 1 => 'COM_COMPONENTBUILDER_FIELD_JSON', - 2 => 'COM_COMPONENTBUILDER_FIELD_BASE64', - 3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY', - 5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY', - 4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION', - 6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM' - ); - // Now check if value is found in this array - if (isset($storeArray[$value]) && UtilitiesStringHelper::check($storeArray[$value])) - { - return $storeArray[$value]; - } - } - return $value; - } - /** * Method to get the record form. * diff --git a/admin/src/Model/FieldtypesModel.php b/admin/src/Model/FieldtypesModel.php index b1648cbc3..e16c0f911 100644 --- a/admin/src/Model/FieldtypesModel.php +++ b/admin/src/Model/FieldtypesModel.php @@ -426,7 +426,7 @@ class FieldtypesModel extends ListModel // Get a db connection. $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__componentbuilder_fieldtype"); + $columns = $db->getTableColumns("#__componentbuilder_[[[view]]]"); if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. diff --git a/admin/src/Model/PlaceholderModel.php b/admin/src/Model/PlaceholderModel.php index 7935aa1da..0f07cae82 100644 --- a/admin/src/Model/PlaceholderModel.php +++ b/admin/src/Model/PlaceholderModel.php @@ -195,12 +195,6 @@ class PlaceholderModel extends AdminModel $item->metadata = $registry->toArray(); } - if (!empty($item->value)) - { - // base64 Decode value. - $item->value = base64_decode($item->value); - } - if (empty($item->id)) { @@ -952,12 +946,6 @@ class PlaceholderModel extends AdminModel // add the padding (needed) $data['target'] = '[[[' . trim($data['target']) . ']]]'; - // Set the value string to base64 string. - if (isset($data['value'])) - { - $data['value'] = base64_encode($data['value']); - } - // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { diff --git a/admin/src/Model/PlaceholdersModel.php b/admin/src/Model/PlaceholdersModel.php index 672bd971e..0027b30e8 100644 --- a/admin/src/Model/PlaceholdersModel.php +++ b/admin/src/Model/PlaceholdersModel.php @@ -192,8 +192,6 @@ class PlaceholdersModel extends ListModel continue; } - // decode value - $item->value = base64_decode($item->value); } } @@ -360,8 +358,6 @@ class PlaceholdersModel extends ListModel continue; } - // decode value - $item->value = base64_decode($item->value); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/src/View/Field/HtmlView.php b/admin/src/View/Field/HtmlView.php index 5c0a972a4..a13c8ae72 100644 --- a/admin/src/View/Field/HtmlView.php +++ b/admin/src/View/Field/HtmlView.php @@ -246,8 +246,10 @@ class HtmlView extends BaseHtmlView // add return_here $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';"); // add the libs for subform (since not adding it via xml but ajax) - Html::_('jquery.ui', array('core', 'sortable')); - Html::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); + Factory::getApplication() + ->getDocument() + ->getWebAssetManager() + ->useScript('webcomponent.field-subform'); // set some lang Text::script('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER'); Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS'); diff --git a/admin/src/View/Fieldtype/HtmlView.php b/admin/src/View/Fieldtype/HtmlView.php index 4b0b71e79..110646ca6 100644 --- a/admin/src/View/Fieldtype/HtmlView.php +++ b/admin/src/View/Fieldtype/HtmlView.php @@ -81,9 +81,6 @@ class HtmlView extends BaseHtmlView $this->referral .= '&return=' . (string) $return; } - // Get Linked view data - $this->vycfields = $this->get('Vycfields'); - // Set the toolbar $this->addToolBar(); @@ -227,16 +224,6 @@ class HtmlView extends BaseHtmlView } // Add Ajax Token $this->getDocument()->addScriptDeclaration("var token = '" . Session::getFormToken() . "';"); - - // Add the CSS for Footable - Html::_('stylesheet', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', ['version' => 'auto']); - Html::_('stylesheet', 'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']); - // Add the JavaScript for Footable (adding all functions) - Html::_('script', 'media/com_componentbuilder/footable-v3/js/footable.min.js', ['version' => 'auto']); - - $footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});"; - $this->getDocument()->addScriptDeclaration($footable); - // add scripts foreach ($this->scripts as $script) { diff --git a/componentbuilder.xml b/componentbuilder.xml index 06a5d2db2..33ca1a083 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 15th March, 2024 + 20th March, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 4.0.0-alpha4 + 4.0.0-alpha5 Component Builder (v.4.0.0-alpha4) +

Component Builder (v.4.0.0-alpha5)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. @@ -77,10 +77,13 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo

COM_COMPONENTBUILDER_MENU_PLACEHOLDERS COM_COMPONENTBUILDER_MENU_LIBRARIES COM_COMPONENTBUILDER_MENU_SNIPPETS + COM_COMPONENTBUILDER_MENU_GET_SNIPPETS COM_COMPONENTBUILDER_MENU_VALIDATION_RULES COM_COMPONENTBUILDER_MENU_FIELDS COM_COMPONENTBUILDER_MENU_FIELDTYPES COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS + COM_COMPONENTBUILDER_MENU_LANGUAGES + COM_COMPONENTBUILDER_MENU_SERVERS COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 2d21c7349..5e6873f38 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -5,10 +5,10 @@ pkg_component_builder package site - 3.2.0-beta7 + 3.2.0-beta8 https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta7.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta8.zip beta @@ -89,4 +89,22 @@ https://dev.vdm.io + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 4.0.0-alpha5 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-alpha5.zip + + + alpha + + Llewellyn van der Merwe + https://dev.vdm.io + + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php index 232fb6221..f38ac5e2d 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaFive; +use Joomla\CMS\Factory; use Joomla\Registry\Registry; use Joomla\CMS\Plugin\PluginHelper; use VDM\Joomla\Utilities\Component\Helper; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Table.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Table.php index 23626f62e..b235f51eb 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Table.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Table.php @@ -4056,10 +4056,10 @@ class Table extends BaseTable implements Tableinterface 'value' => [ 'name' => 'value', 'label' => 'COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL', - 'type' => 'text', + 'type' => 'textarea', 'title' => false, 'list' => 'placeholders', - 'store' => 'base64', + 'store' => NULL, 'tab_name' => 'Details', ], ],