Release of v5.0.0-alpha8

Add power path override option on component level. Fix the sql build feature. #1032.
This commit is contained in:
2024-04-06 23:41:34 +02:00
parent 2f64eec95b
commit 2b7b8f90e1
762 changed files with 1900 additions and 1246 deletions

View File

@ -11,6 +11,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`add_email_helper` TINYINT(1) NOT NULL DEFAULT 0,
`add_git_folder_path` TINYINT(1) NOT NULL DEFAULT 0,
`add_javascript` TINYINT(1) NOT NULL DEFAULT 0,
`add_jcb_powers_path` TINYINT(1) NOT NULL DEFAULT 0,
`add_license` TINYINT(1) NOT NULL DEFAULT 0,
`add_menu_prefix` CHAR(1) NOT NULL DEFAULT '',
`add_namespace_prefix` CHAR(1) NOT NULL DEFAULT '',
@ -62,6 +63,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`guid` VARCHAR(36) NOT NULL DEFAULT '',
`image` CHAR(64) NOT NULL DEFAULT '',
`javascript` TEXT NOT NULL,
`jcb_powers_path` VARCHAR(255) NOT NULL DEFAULT '',
`joomla_source_link` VARCHAR(255) NOT NULL DEFAULT '',
`license` VARCHAR(255) NOT NULL DEFAULT '',
`license_type` TINYINT(1) NOT NULL DEFAULT 0,
@ -115,7 +117,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
PRIMARY KEY (`id`),
KEY `idx_system_name` (`system_name`),
KEY `idx_name_code` (`name_code`),
KEY `idx_translation_tool` (`translation_tool`),
KEY `idx_add_jcb_powers_path` (`add_jcb_powers_path`),
KEY `idx_add_sales_server` (`add_sales_server`),
KEY `idx_mvc_versiondate` (`mvc_versiondate`),
KEY `idx_remove_line_breaks` (`remove_line_breaks`),
@ -126,7 +128,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
KEY `idx_addreadme` (`addreadme`),
KEY `idx_add_powers` (`add_powers`),
KEY `idx_add_backup_folder_path` (`add_backup_folder_path`),
KEY `idx_add_php_helper_both` (`add_php_helper_both`),
KEY `idx_translation_tool` (`translation_tool`),
KEY `idx_add_php_helper_admin` (`add_php_helper_admin`),
KEY `idx_add_admin_event` (`add_admin_event`),
KEY `idx_add_php_helper_site` (`add_php_helper_site`),
@ -153,8 +155,9 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
KEY `idx_creatuserhelper` (`creatuserhelper`),
KEY `idx_adduikit` (`adduikit`),
KEY `idx_addfootable` (`addfootable`),
KEY `idx_guid` (`guid`),
KEY `idx_add_email_helper` (`add_email_helper`),
KEY `idx_guid` (`guid`),
KEY `idx_add_php_helper_both` (`add_php_helper_both`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
@ -3718,7 +3721,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`,
(1533, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', '', '', '', 'Credit System', 'NOT NULL', '', 17, '\"<field \\r\\n\\ttype=\\\"radio\\\" \\r\\n\\tname=\\\"credit_system\\\" \\r\\n\\tlabel=\\\"Credit System\\\" \\r\\n\\tdescription=\\\"Select the credit system to use.\\\" \\r\\n\\tclass=\\\"btn-group btn-group-yesno\\\" \\r\\n\\toption=\\\"1|Assessments,2|Modules\\\" \\r\\n\\tdefault=\\\"2\\\" \\r\\n\\trequired=\\\"true\\\" \\r\\n\\/>\"', 1, '2016-12-08 11:52:14', '2016-12-08 12:20:29', 2, '', 749, '7fe3ad6f-d527-4509-813e-1ffef4456130', '', '', '', '', ''),
(1534, '', '', '', '', '', '', '', '', 11, '', 'INT', 2, '', '', 'Point Available (answer point)', 'NOT NULL', '', 10, '\"<field \\r\\n\\ttype=\\\"integer\\\" \\r\\n\\tname=\\\"available_point\\\" \\r\\n\\tlabel=\\\"Total Available Point\\\" \\r\\n\\tdefault=\\\"\\\" \\r\\n\\tdescription=\\\"The total point available for this answer.\\\" \\r\\n\\tclass=\\\"text_area\\\" \\r\\n\\trequired=\\\"true\\\" \\r\\n\\tfirst=\\\"0\\\" \\r\\n\\tlast=\\\"100\\\" \\r\\n\\tstep=\\\"1\\\" \\r\\n\\tfilter=\\\"INT\\\" \\r\\n\\/>\"', 1, '2016-12-08 18:09:57', '2016-12-08 18:14:14', 2, '', 114, '7602a690-8269-4374-b330-d1fd372db8fa', '', '', '', '', ''),
(1535, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', '', '', '', 'Build Component Dynamically', 'NOT NULL', '', 17, '\"<field \\r\\n\\ttype=\\\"radio\\\" \\r\\n\\tname=\\\"buildcomp\\\" \\r\\n\\tlabel=\\\"Build Backend-views Dynamically\\\" \\r\\n\\tdescription=\\\"To build the component fields and back-end views dynamically using a mySQL table file.\\\" \\r\\n\\tclass=\\\"btn-group btn-group-yesno\\\" \\r\\n\\toption=\\\"1|Yes,0|No\\\" \\r\\n\\tdefault=\\\"0\\\" \\r\\n\\trequired=\\\"true\\\" \\r\\n\\/>\"', 1, '2016-12-25 17:35:05', '2016-12-25 18:06:42', 3, '', 750, '288e00d8-7ea3-4bfc-829c-3ab247ca9718', '', '', '', '', ''),
(1536, '', '', '', '', '', '', '', '', '', '', 'CHAR', '', '', '', 'Dynamic Builder Option (mySql) - Note', 'NOT NULL', '', 14, '\"<field \\r\\n\\ttype=\\\"note\\\" \\r\\n\\tname=\\\"note_buildcomp_dynamic_mysql\\\" \\r\\n\\tlabel=\\\"Dynamic Builder (mySql) Option\\\" \\r\\n\\tdescription=\\\"You can dynamically build the components back-end views and fields by adding a mySql table dump, that has all the tables, or some more tables with its columns and data types. A very basic and generic set of fields and tables will be created, and added to the existing fields and tables of this component.\\\" \\r\\n\\theading=\\\"h4\\\" \\r\\n\\tclass=\\\"alert alert-info\\\"\\r\\n\\/>\"', 1, '2016-12-25 17:41:24', '2017-10-05 16:47:03', 5, '', 751, 'bdc7b3e1-b9cd-493c-8752-3fd60a8c0e24', '', '', '', '', ''),
(1536, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Dynamic Builder Option (mySql) - Note', 'NOT NULL', '', 14, '\"<field\\n\\ttype=\\\"note\\\"\\n\\tname=\\\"note_buildcomp_dynamic_mysql\\\"\\n\\tlabel=\\\"Dynamic Builder (MySql) Option\\\"\\n\\tdescription=\\\"<p>You can dynamically build the components back-end views and fields by adding a MySQL table dump that includes all or additional tables with their respective columns and data types. A basic and generic set of fields and tables will be created and integrated with the existing fields and tables of this component.<\\/p>\\r\\n\\r\\n<p>It is critical that the SQL provided be valid; otherwise, the process will fail. Additionally, you have the option to specify the field type and other properties directly in the MySQL column <b>COMMENT<\\/b>. This is done using JSON formatting in the comments section of each column\\/field.<\\/p>\\r\\n\\r\\n<p>For example, to define a field as a list with predefined options, use the following comment format:\\r\\n<br>\\r\\n<code>COMMENT \'{&quot;type&quot;:&quot;List&quot;, &quot;label&quot;:&quot;Name&quot;}\'<\\/code>\\r\\n<\\/p>\\r\\n<p>This JSON format allows you to specify various field properties, such as &quot;type&quot;, &quot;label&quot;, and &quot;option&quot;, which will be used to generate corresponding fields in the JCB Field configuration area.<\\/p>\\\"\\n\\theading=\\\"h4\\\"\\n\\tclass=\\\"alert alert-info\\\"\\n\\/>\"', 1, '2016-12-25 17:41:24', '2024-04-06 17:43:24', 8, '', 751, 'bdc7b3e1-b9cd-493c-8752-3fd60a8c0e24', '', '', '', '', ''),
(1537, '', '', '', '', '', '', '', '', '', '', 'MEDIUMTEXT', '', '', '', 'MySQL (dump - to build)', 'NOT NULL', 2, 25, '\"<field \\r\\n\\ttype=\\\"textarea\\\" \\r\\n\\tname=\\\"buildcomp-sql\\\" \\r\\n\\tlabel=\\\"MySQL\\\" \\r\\n\\trows=\\\"30\\\" \\r\\n\\tcols=\\\"15\\\"\\r\\n\\tdescription=\\\"Add your MySQL here!\\\" \\r\\n\\tclass=\\\"text_area span12\\\" \\r\\n\\tfilter=\\\"raw\\\" \\r\\n\\thint=\\\"\\/\\/ Add MySQL Table Dump Here\\\" \\r\\n\\trequired=\\\"true\\\" \\r\\n\\/>\"', 1, '2016-12-25 18:10:09', '2015-08-25 21:15:22', 1, '', 5, '98ad53ca-0da2-4aab-9a3c-1c7e1ee0a24e', '', '', '', '', ''),
(1538, '', '', '', '', '', '', '', '', 11, '', 'INT', 2, '', '', 'Min Amount Per/Group', 'NOT NULL', '', 24, '\"<field \\r\\n\\ttype=\\\"text\\\" \\r\\n\\tname=\\\"min\\\" \\r\\n\\tlabel=\\\"Minimum Amount\\\" \\r\\n\\tsize=\\\"10\\\" \\r\\n\\tmaxlength=\\\"50\\\"\\r\\n\\tdescription=\\\"\\\" \\r\\n\\tclass=\\\"text_area\\\" \\r\\n\\trequired=\\\"true\\\"\\r\\n\\tfilter=\\\"INT\\\" \\r\\n\\tmessage=\\\"Error! Please add minimum number of registrations allowed here.\\\" \\r\\n\\thint=\\\"Only Numbers\\\"\\r\\n\\tonchange=\\\"if(!jQuery(this).val().match(\\/^\\\\d+$\\/)){jQuery(this).val(\'\')};\\\" \\r\\n\\/>\"', 1, '2017-01-09 12:19:34', '2017-01-09 12:51:24', 3, '', 7, 'ca072f17-f6cd-4967-a9c0-31c0ae1f32ba', '', '', '', '', ''),
(1539, '', '', '', '', '', '', '', '', 11, '', 'INT', 2, '', '', 'Max Amount Per/Group', 'NOT NULL', '', 24, '\"<field \\r\\n\\ttype=\\\"text\\\" \\r\\n\\tname=\\\"max\\\" \\r\\n\\tlabel=\\\"Maximum Amount\\\" \\r\\n\\tsize=\\\"10\\\" \\r\\n\\tmaxlength=\\\"50\\\"\\r\\n\\tdescription=\\\"\\\" \\r\\n\\tclass=\\\"text_area\\\" \\r\\n\\trequired=\\\"true\\\"\\r\\n\\tfilter=\\\"INT\\\" \\r\\n\\tmessage=\\\"Error! Please add maximum number of registrations allowed here.\\\" \\r\\n\\thint=\\\"Only Numbers\\\"\\r\\n\\tonchange=\\\"if(!jQuery(this).val().match(\\/^\\\\d+$\\/)){jQuery(this).val(\'\')};\\\" \\r\\n\\/>\"', 1, '2017-01-09 12:22:58', '2017-01-09 12:51:01', 2, '', 7, 'd1d4a7d0-1a82-4dc8-9efe-e3944debad79', '', '', '', '', ''),
@ -5554,7 +5557,10 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`,
(3369, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Note - Router Settings (advance)', 'NOT NULL', '', 14, '\"<field\\n\\ttype=\\\"note\\\"\\n\\tname=\\\"note_router_settings_advance\\\"\\n\\tlabel=\\\"Understanding the Site RouterView Class.\\\"\\n\\tdescription=\\\"<p>The <code>RouterView<\\/code> class in Joomla is designed to manage the routing process, translating human-readable URLs into query variables and vice versa. This functionality is crucial for creating search engine friendly (SEF) URLs and ensuring that requests within the Joomla application are directed to the appropriate components and views.<\\/p>\\r\\n\\r\\n<h2>Key Responsibilities<\\/h2>\\r\\n<ul>\\r\\n <li><strong>URL Building:<\\/strong> Converts query information into SEF URLs. This process involves taking the query parameters associated with a particular route and constructing a URL that is both user-friendly and optimized for search engines.<\\/li>\\r\\n <li><strong>URL Parsing:<\\/strong> Interprets SEF URLs back into query parameters. When a request is made to Joomla with an SEF URL, the RouterView class parses this URL to determine the component, view, and other request variables required to fulfill the request.<\\/li>\\r\\n<\\/ul>\\r\\n\\r\\n<h2>How to Use RouterView in a 3rd Party Extension<\\/h2>\\r\\n<p>To leverage the <code>RouterView<\\/code> class in a 3rd party Joomla extension, follow these steps:<\\/p>\\r\\n<ol>\\r\\n <li><strong>Extend RouterView:<\\/strong> Create a new router class in your component that extends <code>RouterView<\\/code>. This class will define the routing rules specific to your component.<\\/li>\\r\\n <li><strong>Define Routes:<\\/strong> Within your router class, define routes by mapping URL patterns to query parameters. This involves specifying how URL segments correspond to the component\\u2019s views and tasks.<\\/li>\\r\\n <li><strong>Register the Router:<\\/strong> Ensure that Joomla is aware of your custom router by registering it with the application. This is typically done within the component\\u2019s entry point file.<\\/li>\\r\\n<\\/ol>\\r\\n\\r\\n<h2>Benefits of Using RouterView<\\/h2>\\r\\n<ul>\\r\\n <li><strong>SEO Optimization:<\\/strong> By enabling the creation of human-readable URLs, RouterView helps improve the SEO of your Joomla site.<\\/li>\\r\\n <li><strong>Improved User Experience:<\\/strong> SEF URLs are easier for users to understand and remember, enhancing the overall user experience.<\\/li>\\r\\n <li><strong>Flexibility:<\\/strong> Custom routers allow for granular control over URL structure, making it possible to tailor URLs to match the needs of your extension and its audience.<\\/li>\\r\\n<\\/ul>\\r\\n\\r\\n<p>The basic structure of a custom router class for a Joomla 3rd party extension highlights the need to implement the <code>build<\\/code> and <code>parse<\\/code> methods, which handle the conversion between query parameters and SEF URLs.<\\/p>\\\"\\n\\theading=\\\"h1\\\"\\n\\tclass=\\\"alert alert-info\\\"\\n\\tshowon=\\\"router_settings_details_switch:3\\\"\\n\\/>\"', 1, '2024-01-27 20:26:52', '2024-01-27 21:22:30', 3, '', 25, '00f9d3c7-9399-41dc-98de-df6e49f73b1b', '', '', '', '', ''),
(3370, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', '', '', '', 'Router Settings Details Switch', 'NOT NULL', '', 17, '\"<field\\n\\ttype=\\\"radio\\\"\\n\\tname=\\\"router_settings_details_switch\\\"\\n\\tlabel=\\\"Documentation\\\"\\n\\tclass=\\\"btn-group btn-group-yesno\\\"\\n\\toption=\\\"1|None,2|Basic,3|Details\\\"\\n\\tdefault=\\\"1\\\"\\n\\/>\"', 1, '2024-01-27 20:28:46', '2024-01-27 20:29:12', 2, '', 1056, '68ee2a4b-15ee-4ba7-8fbe-9408779f66f3', '', '', '', '', ''),
(3371, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Note - Router Mode (Manual)', 'NOT NULL', '', 14, '\"<field\\n\\ttype=\\\"note\\\"\\n\\tname=\\\"note_mode_constructor_before_parent_manual\\\"\\n\\tlabel=\\\"Manual Mode\\\"\\n\\tdescription=\\\"This feature is not yet ready (SOON)\\\"\\n\\theading=\\\"h4\\\"\\n\\tclass=\\\"alert alert-error\\\"\\n\\tshowon=\\\"mode_constructor_before_parent:2\\\"\\n\\/>\"', 1, '2024-02-01 05:27:01', '2024-01-27 21:20:33', 1, '', 25, 'e3ae9a2d-2e9f-4910-9fda-632732ac0737', '', '', '', '', ''),
(3372, '', '', '', '', '', '', 'Other', 3, 11, '', 'INT', '', '', '', 'Preferred Joomla Version', 'NOT NULL', '', 15, '\"<field\\n\\ttype=\\\"number\\\"\\n\\tname=\\\"preferred_joomla_version\\\"\\n\\tlabel=\\\"Preferred Joomla Version\\\"\\n\\tdefault=\\\"3\\\"\\n\\tclass=\\\"text_area\\\"\\n\\tmin=\\\"3\\\"\\n\\tmax=\\\"5\\\"\\n\\tstep=\\\"1\\\"\\n\\/>\"', 1, '2024-03-07 13:11:01', '2024-03-07 13:12:26', 2, '', 1055, 'e30ca545-0ccd-4925-b34d-96bc27d6a27c', '', '', '', '', '');
(3372, '', '', '', '', '', '', 'Other', 3, 11, '', 'INT', '', '', '', 'Preferred Joomla Version', 'NOT NULL', '', 15, '\"<field\\n\\ttype=\\\"number\\\"\\n\\tname=\\\"preferred_joomla_version\\\"\\n\\tlabel=\\\"Preferred Joomla Version\\\"\\n\\tdefault=\\\"3\\\"\\n\\tclass=\\\"text_area\\\"\\n\\tmin=\\\"3\\\"\\n\\tmax=\\\"5\\\"\\n\\tstep=\\\"1\\\"\\n\\/>\"', 1, '2024-03-07 13:11:01', '2024-03-07 13:12:26', 2, '', 1055, 'e30ca545-0ccd-4925-b34d-96bc27d6a27c', '', '', '', '', ''),
(3373, '', '', '', '', '', '', 'Other', 3, 11, '', 'INT', '', '', '', 'Joomla Version', 'NOT NULL', '', 11, '\"<field\\n\\ttype=\\\"list\\\"\\n\\tname=\\\"joomla_version\\\"\\n\\tlabel=\\\"Joomla Version\\\"\\n\\tdescription=\\\"Joomla Target\\\"\\n\\tclass=\\\"list_class\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\tmultiple=\\\"false\\\"\\n\\trequired=\\\"true\\\"\\n\\toption=\\\"0|All,3|Joomla 3,4|Joomla 4,5|Joomla 5\\\"\\n\\tdefault=\\\"0\\\"\\n\\/>\"', 1, '2024-03-27 12:06:23', '2024-03-27 12:07:26', 2, '', 1055, 'e2d5b5aa-5d88-4224-b93f-ad517b59f75b', '', '', '', '', ''),
(3374, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add JCB Powers Path', 'NOT NULL', '', 17, '\"<field\\n\\ttype=\\\"radio\\\"\\n\\tname=\\\"add_jcb_powers_path\\\"\\n\\tlabel=\\\"JCB Powers Path\\\"\\n\\tdescription=\\\"Would you like to override the global jcb powers path for this component?\\\"\\n\\tclass=\\\"btn-group btn-group-yesno\\\"\\n\\toption=\\\"|Global,1|Override\\\"\\n\\tdefault=\\\"\\\"\\n\\/>\"', 1, '2024-04-03 10:50:50', '2023-10-23 10:36:09', 1, '', 192, 'a6c65a43-e305-42c1-bd9d-5db5e4920185', '', '', '', '', ''),
(3375, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'JCB Powers Path (component)', 'NOT NULL', '', 24, '\"<field\\n\\ttype=\\\"text\\\"\\n\\tname=\\\"jcb_powers_path\\\"\\n\\tlabel=\\\"JCB Powers Path<br \\/><small>example: <code>libraries\\/jcb_powers<\\/code><\\/small>\\\"\\n\\tsize=\\\"70\\\"\\n\\tmaxlength=\\\"150\\\"\\n\\tdescription=\\\"Here you can set the path to the powers folder. Recommended that you always place it inside the <b>libraries<\\/b>. You don\'t need to add a full path here, so <b>libraries\\/jcb_powers<\\/b> will mean <i>\\/home\\/username\\/public_html\\/libraries\\/jcb_powers<\\/i> when installed. You should always use two folders here, libraries + one more for example: <br \\/><code>libraries\\/jcb_powers<\\/code>\\\"\\n\\tclass=\\\"text_area\\\"\\n\\tfilter=\\\"PATH\\\"\\n\\tmessage=\\\"Error! Please add folder path here.\\\"\\n\\thint=\\\"libraries\\/jcb_powers\\\"\\n\\tshowon=\\\"add_jcb_powers_path:1\\\"\\n\\tautocomplete=\\\"on\\\"\\n\\/>\"', 1, '2024-04-03 10:51:37', '2021-12-01 00:51:37', 1, '', 641, '763e5bdf-d4d3-449b-bb36-de2623d81540', '', '', '', '', '');
--
-- Dumping data for table `#__componentbuilder_fieldtype`