Compare commits

...

84 Commits

Author SHA1 Message Date
Robot f99eae901a
Release of v3.2.1-beta3
Fix version_update column size. Improved the Schema Table update engine.
2024-04-24 21:10:42 +02:00
Robot ebbcf2bea5
Release of v3.2.1-beta2
Fix the media field size limitation. #1109. Add dynamic datatype update to schema field check.
2024-04-22 15:32:19 +02:00
Robot 5e980f5f95
Release of v3.2.1-beta1
Add fallback option to ensure that all JCB tables and fields exist. Move the powers autoloader to its own file.
2024-04-22 00:59:42 +02:00
Robot 3a48b5596c
Release of v3.2.1-alpha4
Add Joomla powers for namespace dynamic management.
2024-04-16 19:05:17 +02:00
Lemuel van der Merwe 0be0df5cec
Removes a unnecessary question box from a-bug.yml in the issue_template. 2024-04-09 15:44:14 +02:00
Robot a66e099a73
Release of v3.2.1-alpha3
Fix plugin code display when methods and properties are missing.
2024-04-09 13:44:08 +02:00
Robot 4c7b4f11a4
Release of v3.2.1-alpha2
Add view list and single name fix. Add component code name fix. Add reset list of powers. Fix missing Factory class in plugin. #1102.
2024-04-09 13:07:08 +02:00
Robot 94bc92357e
Release of v3.2.1-alpha1
Add power path override option on component level. Fix the sql build feature. #1032.
2024-04-06 19:48:58 +02:00
Robot ddb07c79d9
Release of v3.2.0
Fix #1053 so that the right and left tabs display correctly in Joomla 4&5. Move the old helper compiler files to powers. Move the old helper extrusion files to powers. Add Preferred Joomla Version to Components. Add custom file file mapping for Joomla 4 and 5. Fix the plug-in installer script builder bug #1068. Fix Event triggers for Joomla 4 and 5 builds. Fix plugin field selection. Fix plugin params tab layout. Add issue templates. Force autoloader to always load. Add Factory class to the J5 Event class. #1093. Fix [Set String Value] in placeholder table to store the value as a base64 string. Fix the search area layout. Fix the search area code line selection. Fix the input edit button for custom fields. Add the new layout to list fields (GUI UPDATE).
2024-03-27 15:04:19 +02:00
Robot ec714566f6
Release of v3.2.0-beta10
Fix the search area layout. Fix the search area code line selection. Fix the input edit button for custom fields. Add the new layout to list fields (GUI UPDATE).
2024-03-26 22:30:10 +02:00
Robot 02a5e42bb5
Release of v3.2.0-beta9
Fix [Set String Value] in placeholder table to store the value as a base64 string.
2024-03-20 15:34:18 +02:00
Robot 91df280520
Release of v3.2.0-beta8
Add Factory class to the J5 Event class. #1093.
2024-03-20 14:19:16 +02:00
Robot c90b1e0c8b
Release of v3.2.0-beta7
Fix plugin field selection. Fix plugin params tab layout. Add issue templates. Force autoloader to always load.
2024-03-15 12:00:50 +02:00
Lemuel van der Merwe 620c890639 Adds and updates the g-security.yml 2024-03-14 09:03:02 +00:00
Lemuel van der Merwe bdb8b3a07a Adds and updates the e-performance.yml 2024-03-14 09:03:02 +00:00
Lemuel van der Merwe 4e21e6cea4 Adds and updates the c-task.yml 2024-03-14 09:03:02 +00:00
Lemuel van der Merwe 96a1f25965 Adds and updates the a-bug.yml 2024-03-14 09:03:02 +00:00
Malachi van der Merwe 9a9364c81e
Adds an issue template for the improvement of documentation in JCB. 2024-03-14 09:20:26 +02:00
Malachi van der Merwe ab4054a7a3
Adds more detailed questions for f-refactor.yml. 2024-03-14 08:45:44 +02:00
Malachi van der Merwe 151a1942ac
Adds an issue template for reporting the refactoring of specific locations in JCB. 2024-03-13 17:47:05 +02:00
Malachi van der Merwe d52a30d91c
Adds a issue template for reporting enhancements to JCB. 2024-03-13 16:32:00 +02:00
Robot ebcfc5363e
Update on v3.2.0-beta6 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 16:01:04 +02:00
Robot 900a8ce90c
Update on v3.2.0-beta6 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 12:40:25 +02:00
Robot 7448403a46
Stable release of v3.2.0-beta6
Fix the plug-in installer script builder bug #1068. Fix Event triggers for Joomla 4 and 5 builds.
2024-03-11 18:14:39 +02:00
Robot f5f308dbf2
Update on v3.2.0-beta5 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-11 16:56:07 +02:00
Robot 39df50c555
Update on v3.2.0-beta5 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-10 13:40:49 +02:00
Robot 91e922b993
Stable release of v3.2.0-beta5
Add custom file file mapping for Joomla 4 and 5.
2024-03-09 21:41:29 +02:00
Robot 5675f186cd
Stable release of v3.2.0-beta4
Add Preferred Joomla Version to Components.
2024-03-07 21:23:32 +02:00
Robot 0b0568299c
Stable release of v3.2.0-beta3
Move the old helper compiler files to powers. Move the old helper extrusion files to powers.
2024-03-06 15:06:11 +02:00
Robot dce71f1d35
Update on v3.2.0-beta2 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-04 17:40:18 +02:00
Robot 2fd3747aa1
Release of v3.2.0-beta2 2024-03-04 08:54:03 +02:00
Robot d1e1a56671
Stable release of v3.2.0-beta1
Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
2024-03-02 22:10:30 +02:00
Llewellyn van der Merwe 3c91a5cdbb
Updates PHPSecLib. Fixed connection failure to remote server. Adds overriding of back-folder and git-folder on component level. 2023-10-24 09:46:36 +02:00
Llewellyn van der Merwe ae9451292f
Adds better remote repository management for the super power features. Fixes #1014 so that powers are added to components. 2023-10-20 20:29:19 +02:00
Llewellyn van der Merwe e99899f6f1
Fixed changelog direction so newest changes is listed at top of the file. Finished the init function of super powers. Adds rest function inside super power. Adds super powers to all templates. Updates many helper class methods to now use the utility classes. Adds the method to the component entry file (as-well). Moved most methods from the compiler fields class to powers. #955 Refactored many new builder classes from the registry class. Converted the Content class to two builder classes. Adds option to add additional templates to a module. Resolves #1002 by adding STRING instead of WORD. Ported the FOF encryption class into Powers. https://git.vdm.dev/joomla/fof Changed all CSS and JS to use instead of in compiler code. Adds option to turn jQuery off if UIKIT 3 is added. Adds option to auto write injection boilerplate code in Powers area. Adds option to auto write service provider boilerplate code in the Powers area. Improved the method and all banner locations to fetch from https://git.vdm.dev/joomla/jcb-external/ instead. Major stability improvements all over the new powers complier classes. New [base Registry class](https://git.vdm.dev/joomla/super-powers/src/branch/master/src/7e822c03-1b20-41d1-9427-f5b8d5836af7) has been created specially for JCB. Remember to update all plug-ins with this version update (use the package). 2023-10-18 09:26:30 +02:00
Tom van der Laan a77eac9adf Update Ftp.php
Fix problem with parse_str missing mandatory result parameter since php 8.0.0
2023-09-16 01:00:56 +02:00
Llewellyn van der Merwe 0d5597e37f
Fix repository indexing. 2023-05-22 15:06:43 +02:00
Llewellyn van der Merwe 407a8aa345
Fixed the default value for fields in database mysql install script. 2023-05-19 00:00:32 +02:00
Llewellyn van der Merwe a325339501
Fix the sorting of fields and views for PHP 8 2023-05-17 00:20:41 +02:00
Llewellyn van der Merwe df16b2e3ad
Fix the update server #978 issue. Fixed the change log to load all entries, not just the last one. Fixed #983 so that database updates are created when adding a new adminview. Moved a few builder arrays to the Compiler Registry. Adds super powers to JCB. Adds Gitea API library. Improves Power filters. Fix #991 to add the Utilities service class. Adds Superpower Key (SPK) replacement feature. Adds Superpower search (GREP) feature. Adds Power Insert/Update Classe. Fix #995 that all update sites are using the correct URL. 2023-05-02 02:10:55 +02:00
Llewellyn van der Merwe d6c73987f5
Updated the Support and Contribution info. 2023-02-27 14:33:19 +02:00
Robot 737bd03e46
Stable release of v3.1.19
We fixed #972 so that custom code (in the header) will be added after the power namespaces. We added a message to show when a server move failed. We fixed the BaseConfig to not use '_' as separator. We fixed the footable loading issue. We removed the need for passing placeholders by reference. We added the option to generate a CHANGELOG. We fixed the server class to load new client if server details changed. We fixed the readme placeholder issue #978. We fixed the empty server url issue #978. Fixed Package import to now use the phplibsec version 3.
2023-02-27 14:27:41 +02:00
Llewellyn van der Merwe 339aec221e
Moves all major structre function to container. Adds new Server replacment class for legacy calls. Refactored multiple classes. Add more advanced compiler options, with donation notice. 2023-02-12 21:15:41 +02:00
Llewellyn van der Merwe 7fa8964b44
Fixed alias builder #973 2023-02-06 13:28:45 +02:00
Llewellyn van der Merwe 7edbe20c33
Move the Power, Plugin and Module builders into the container. Many more PHP 8 improvments. 2023-01-29 22:12:42 +02:00
Llewellyn van der Merwe e6c02a29f6
Move the whole compiler GET of the component object to now use the container->component object/class. 2023-01-22 02:38:21 +02:00
Llewellyn van der Merwe f44f385159
Converts compiler to move component get methods to the powers area. 2023-01-15 10:42:19 +02:00
Llewellyn van der Merwe e8abe8e3cf
Moved minify to powers. Improved the mapper class. 2023-01-08 12:01:14 +02:00
Llewellyn van der Merwe e771e7d243
Adds some PHP 8 ready changes to compiler classes. Adds Server and Crypt classes. 2023-01-01 04:11:34 +02:00
Llewellyn van der Merwe e614f2ec23
Adds phpseclib version 3. 2022-12-29 08:12:03 +02:00
Llewellyn van der Merwe d28e4c74af
Adds power infusion class. 2022-12-18 10:16:43 +02:00
Llewellyn van der Merwe a2ec013566
Moved all placeholder behaviour to class function. Moved dynamic content to the content class. 2022-12-11 17:06:13 +02:00
Llewellyn van der Merwe 4217b22f67
Adds new Content class. Adds the intial Package Classes. Removed phpseclib. 2022-12-04 11:23:43 +02:00
Llewellyn van der Merwe 6c42b5af61
Rename some database classes, adds the core database classes. 2022-11-27 09:31:56 +02:00
Llewellyn van der Merwe 1c7515d0f5
Moved Core Table class to be used all over JCB. 2022-11-20 10:51:56 +02:00
Llewellyn van der Merwe 9f5c7deec8
Updates all JCB links. Next stable version 2022-11-13 19:25:52 +02:00
Llewellyn van der Merwe 7759738938
Adds form task, token to search form. Adds url updater to search area. 2022-11-12 22:42:08 +02:00
Llewellyn van der Merwe 461edf5c3f
Adds option to stop and start a search. Adds better user experience to the search area. 2022-11-08 23:55:02 +02:00
Llewellyn van der Merwe 9f30f30b9e
Release search stable BETA. 2022-11-04 22:18:05 +02:00
Llewellyn van der Merwe f1cb398f7a
Adds beta search engine to JCB. 2022-11-02 21:48:20 +02:00
Llewellyn van der Merwe f2ea22d0ad
Continued development on the search feature 2022-10-31 00:34:54 +02:00
Llewellyn van der Merwe 869a1879cb
Moved some class around for better structure in the jcb_powers of JCB. Fixed small issue with JCB package export. 2022-10-23 23:18:02 +02:00
Llewellyn van der Merwe d4843d6696
Improved the compiler power building class. Add the search form and the needed ajax functions. 2022-10-20 16:40:18 +02:00
Llewellyn van der Merwe 9db33ad449
Fixed issue #957 to load classes namespace. Refactored search classes. Improved the Power compiler class. 2022-10-06 19:34:44 +02:00
Llewellyn van der Merwe dcb4f86ee2
Fixed power include issue in plugin. 2022-09-20 15:09:12 +02:00
Llewellyn van der Merwe e6c8805143
Fixed power include issue. 2022-09-20 13:34:20 +02:00
Llewellyn van der Merwe 5537a868e3
Adds licensing template option to the powers area. 2022-09-20 13:06:03 +02:00
Llewellyn van der Merwe f4fccfe761
Adds the update option for sub-form array values 2022-09-19 10:05:41 +02:00
Llewellyn van der Merwe fca5bd5f42
Adds basic and regex search and replace types. 2022-09-17 23:59:31 +02:00
Llewellyn van der Merwe c53ece2a2d
Adds more classes, and refactoring to the search feature. Adds test search to search page. #952 2022-09-16 23:49:53 +02:00
Llewellyn van der Merwe d757e14fac
Adds the initial classes needed for the new search feature. Adds the empty view for the search feature. #952 2022-09-14 17:40:02 +02:00
Llewellyn van der Merwe 1dddba0fc8
Moved some arrays to the Registry, and marked and updated deprecated class methods and values in the compiler. 2022-09-10 10:16:44 +02:00
Llewellyn van der Merwe c5a85f167e
Moved many field related get methods to its own classes 2022-09-10 10:12:13 +02:00
Llewellyn van der Merwe 4a32d3d50e
Adds interfaces to many classes. 2022-09-03 12:48:53 +02:00
Llewellyn van der Merwe 0512af0f33
Adds the customcode extractor class 2022-09-02 12:24:00 +02:00
Llewellyn van der Merwe abe9b5d227
Adds the customcode dispencer class 2022-09-01 12:24:55 +02:00
Llewellyn van der Merwe 4928a8baaf
Moves multiple class methods to their own power classes. Moves many compiler config values to its own config class. Updated the Expantion method to use the new config class. 2022-08-30 17:28:41 +02:00
Llewellyn van der Merwe f8ac247377
Initial move of configuration to its own class and factory. #951 2022-08-21 19:21:03 +02:00
Llewellyn van der Merwe e7500b76eb
Add tmp debugging. 2022-08-20 18:33:09 +02:00
Llewellyn van der Merwe a0fda76abd
Adds getExtensionInstallClass and setInstallMethodScript to its own class. #950 2022-08-20 18:02:48 +02:00
Georgios Papadakis 154cd5ae1e Remove specific type for adapter parameter from all installer methods 2022-08-19 20:00:52 +03:00
Llewellyn van der Merwe d4ffc3addc
Fixed the dashboard to allow offline work 2022-07-09 22:37:56 +02:00
Llewellyn van der Merwe f81f05936a
Fixed a few links inside JCB 2022-07-09 18:27:30 +02:00
Llewellyn van der Merwe f50690819f
Fixed octojpack update server link 2022-07-09 18:07:02 +02:00
2888 changed files with 273439 additions and 121452 deletions

View File

@ -0,0 +1,165 @@
name: Bug Report
about: Draft a report to aid in our Debugging efforts.
title: "[BUG]: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
We value your effort in reporting an bug! Your feedback is essential for us to address and fix the problem.
- type: textarea
id: what-happened
attributes:
label: What Happened?
description: Please provide a detailed description of the issue and explain what outcome you anticipate.
placeholder: Describe the issue you experienced.
value: ""
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to reproduce the Bug
description: Please provide a detailed description of the steps to reproduce the issue you experienced.
placeholder: Describe the steps to reproduce the issue.
value: ""
validations:
required: true
- type: markdown
attributes:
value: |
# Environment Details
- type: input
id: joomla_version_compiling
attributes:
label: Which Joomla version are you compiling in?
placeholder: e.g., v4.4.3,
validations:
required: true
- type: input
id: php_version_compiling
attributes:
label: Which PHP version are you compiling in?
placeholder: e.g., v8.1,
validations:
required: true
- type: input
id: joomla_versions_targeting
attributes:
label: Which Joomla versions are you targeting?
placeholder: e.g., v5.0.3,
validations:
required: true
- type: input
id: php_version_targeting
attributes:
label: Which PHP version are you targeting?
placeholder: e.g., 8.2
validations:
required: true
- type: input
id: apache_version_using
attributes:
label: Which Web server is JCB running on?
description: Please provide the full name of the web server on which you are running JCB.
placeholder: e.g., Apache 2.4
validations:
required: true
- type: input
id: mysql_version_using
attributes:
label: Which Relational Database is JCB running on?
description: Please provide the full name of the database on which you are running JCB.
placeholder: e.g., Mysql 8.0, MariaDB 10.6,
validations:
required: true
- type: input
id: os
attributes:
label: Which OS is JCB running on?
description: Please provide the full name of the OS on which you are running JCB.
placeholder: e.g. CentOS 8 sever,
value: ""
validations:
required: true
- type: input
id: jcb_version
attributes:
label: Which JCB version are you using?
description: Please provide the full name of the JCB version you are using.
placeholder: e.g., v5.0.0-alpha3
validations:
required: true
- type: dropdown
id: area
attributes:
label: Where in JCB did this issue occur?
multiple: true
options:
- Compilation of a component
- Installation of a component
- Installation JCB pkg
- Installation of JCB plugins
- Compiler(admin_view)
- Dashboard(admin_view)
- Joomla Components(admin_views)
- Joomla Component(admin_view)
- Joomla Modules(admin_views)
- Joomla Module(admin_view)
- Joomla Plugins(admin_views)
- Joomla Plugin(admin_view)
- Power(admin_view)
- Powers(admin_views)
- Search(admin_view)
- Admin View(admin_view)
- Admin Views(admin_views)
- Custom Admin Views(admin_views)
- Site View(admin_view)
- Site Views(admin_views)
- Template(admin_view)
- Templates(admin_views)
- Layout(admin_view)
- Layouts(admin_views)
- Dynamic Get(admin_view)
- Dynamic Gets(admin_views)
- Custom Code(admin_view)
- Custom Codes(admin_views)
- Placeholder(admin_view)
- Placeholders(admin_views)
- Library(admin_view)
- Libraries(admin_views)
- Snippet(admin_view)
- Snippets(admin_views)
- Validation Rule(admin_view)
- Validation Rules(admin_views)
- Field(admin_view)
- Fields(admin_views)
- Fieldtypes(admin_views)
- Language Translations(admin_views)
- Server(admin_view)
- Servers(admin_views)
- Help Documents(admin_views)
- Other
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: On which browsers did you encounter the issue?
multiple: true
options:
- Firefox
- Chrome
- Microsoft Edge
- Safari
- Opera
- Brave
- Vivaldi
validations:
required: true
- type: textarea
id: comments
attributes:
label: Additional Comments
description: Feel free to include any further comments or pertinent details that might assist us.

View File

@ -0,0 +1,81 @@
name: Enhancement Request
about: Suggest an idea for JCB
title: "[ENHANCEMENT]: "
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an enhancement! Your input is crucial for our innovation and progress. To assist us better, please share detailed information about your idea.
- type: textarea
id: enhancement-details
attributes:
label: Enhancement Details
description: Could you detail the enhancement you're suggesting? Explain the issue it addresses or the new feature it introduces.
placeholder: Please give an in-depth explanation of your proposed enhancement.
validations:
required: true
- type: markdown
attributes:
value: |
# Context and Priority
- type: dropdown
id: area
attributes:
label: Which part of the extension will be affected by this enhancement?
multiple: true
options:
- Compilation of component
- Installation of a component
- Installation JCB pkg
- Installation of JCB plugins
- Compiler(admin_view)
- Dashboard(admin_view)
- Joomla Components(admin_views)
- Joomla Component(admin_view)
- Joomla Modules(admin_views)
- Joomla Module(admin_view)
- Joomla Plugins(admin_views)
- Joomla Plugin(admin_view)
- Power(admin_view)
- Powers(admin_views)
- Search(admin_view)
- Admin View(admin_view)
- Admin Views(admin_views)
- Custom Admin Views(admin_views)
- Site View(admin_view)
- Site Views(admin_views)
- Template(admin_view)
- Templates(admin_views)
- Layout(admin_view)
- Layouts(admin_views)
- Dynamic Get(admin_view)
- Dynamic Gets(admin_views)
- Custom Code(admin_view)
- Custom Codes(admin_views)
- Placeholder(admin_view)
- Placeholders(admin_views)
- Library(admin_view)
- Libraries(admin_views)
- Snippet(admin_view)
- Snippets(admin_views)
- Validation Rule(admin_view)
- Validation Rules(admin_views)
- Field(admin_view)
- Fields(admin_views)
- Fieldtypes(admin_views)
- Language Translations(admin_views)
- Server(admin_view)
- Servers(admin_views)
- Help Documents(admin_views)
- Other
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Supply additional context or screenshots related to the enhancement request in this space.
validations:
required: false

View File

@ -0,0 +1,45 @@
name: Task
about: Create a task for project management
title: "[TASK]: "
labels:
- task
body:
- type: markdown
attributes:
value: |
Thanks for setting up the task! Tasks assist us in arranging and ranking our work. Kindly provide comprehensive details about the task for clarity and efficient tracking.
- type: textarea
id: task-details
attributes:
label: Task Details
description: Please describe the task. What are the specific actions required?
placeholder: Provide a detailed description of the task.
validations:
required: true
- type: markdown
attributes:
value: |
# Task Context and Priority
- type: textarea
id: task-environment
attributes:
label: Task environment
description: Please provide the details of the environment in which this task will be completed.
placeholder: Describe the environment applicable to the task.
validations:
required: true
- type: textarea
id: task-objective
attributes:
label: Task Objective
description: What's the aim or purpose of this task? How will it contribute to the project or system's success?
placeholder: Describe the goal and anticipated result of the task.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Please share any extra context, files, or screenshots that could aid in comprehending or carrying out the task.
validations:
required: false

View File

@ -0,0 +1,37 @@
name: Documentation
about: Propose improvements to the documentation or highlight any issues found within it.
title: "[DOCUMENTATION]: "
labels:
- documentation
body:
- type: markdown
attributes:
value: |
We appreciate your input on our documentation! Clear and comprehensive documentation plays a vital role in enabling users to effectively interact with our systems. To assist us in making improvements, kindly offer thorough details regarding your suggestion or the specific problem you've encountered.
- type: textarea
id: documentation-details
attributes:
label: Documentation Details
description: Please explain the specific problem with the documentation or the improvements you recommend. Is it a missing topic, unclear instructions, outdated content, or something else?
placeholder: Detail the issue with the documentation or suggest improvements..
validations:
required: true
- type: markdown
attributes:
value: |
# Specific Context
- type: textarea
id: expected-outcome
attributes:
label: Expected Outcome
description: What outcomes do you anticipate from this change in documentation? How will it benifit the users or enhance the project?
placeholder: Explain the expected result of this change in the documentation.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Share any extra details, files, or screenshots that could help in understanding or applying the documentation change.
validations:
required: false

View File

@ -0,0 +1,61 @@
name: Performance Issue
about: Recommend or propose performance improvements
title: "[PERFORMANCE]: "
labels:
- performance
body:
- type: markdown
attributes:
value: |
Appreciation for tackling performance challenges! Optimizing performance is vital for our system's efficiency and the user experience. Could you offer more comprehensive details to aid in identifying and resolving the suggested performance issue or improvement?
- type: textarea
id: performance-details
attributes:
label: Performance Details
description: Please outline the performance problem or the enhancements you propose. Is it related to speed, resource usage, responsiveness, or something else?
placeholder: Offer an in-depth explanation of the performance challenge or improvement.
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Systems and Context
- type: textarea
id: performance-environment
attributes:
label: Environment in which performance issue occurs
description: Provide a detailed description of the environment in which you are experiencing this perforamnce issue.
placeholder: Describe the environment of the preformance issue.
validations:
required: true
- type: textarea
id: replication-steps
attributes:
label: Steps to Replicate
description: If possible, share a step-by-step guide to replicate the performance problem.
placeholder: Explain how to replicate the problem.
validations:
required: false
- type: textarea
id: impact-assessment
attributes:
label: Impact Assessment
description: How does the performance problem impact the system or its users? How severe is its effect?
placeholder: Explain the impact of the performance problem.
validations:
required: true
- type: textarea
id: proposed-solutions
attributes:
label: Proposed Solutions or Ideas
description: If you have any suggestions or ideas for resolving the performance problem, please share them here.
placeholder: Share any potential solutions or improvement problem.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Provide any additional context, benchmarks, logs, or screenshots that might help in understanding or addressing the performance problem.
validations:
required: false

View File

@ -0,0 +1,45 @@
name: Refactoring Task
about: Recommend or identify the necessity for code refactoring.
title: "[REFACTOR]: "
labels:
- refactor
body:
- type: markdown
attributes:
value: |
We appreciate your commitment to enhancing the maintainability and quality of our codebase! Code refactoring plays a crucial role in ensuring our system remains efficient and easy to manage. To assist us effectively, please share comprehensive details about the refactoring task you are suggesting or identifying.
- type: textarea
id: refactoring-details
attributes:
label: Refactoring Details
description: Outline the refactoring task, specifying which code segment requires attention and the reasons behind this need. What improvements are expected from this refactoring?
placeholder: Provide an in-depth explanation of the refactoring task?
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Components and Context
- type: textarea
id: area
attributes:
label: Which file or area of JCB needs refactoring?
description: Which area in JCB should be refactored?
placeholder: Give a road map where the refactoring should take place.
validations:
required: true
- type: textarea
id: expected-outcome
attributes:
label: Expected Outcome
description: What benefits do you anticipate from this refactoring? How will it enhance the codebase or overall system?
placeholder: Explain the expected results of this refactoring.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Share any further details or information, like code snippets, that could aid in comprehending or executing the refactoring task.
validations:
required: false

View File

@ -0,0 +1,38 @@
name: Security Issue
about: Identify a possible security risk.
title: "[SECURITY]: "
labels:
- security
body:
- type: markdown
attributes:
value: |
**⚠️ CRITICAL: Avoid sharing any sensitive or confidential details in this message.** Should you suspect a security flaw, please contact us directly at [joomla@vdm.io].
- type: textarea
id: security-general-description
attributes:
label: General Description
description: Offer a broad overview of the security concern, ensuring not to disclose any sensitive information.
placeholder: Provide a general description of the security problem.
validations:
required: true
- type: markdown
attributes:
value: |
# Affected Systems
- type: textarea
id: security-environment
attributes:
label: Environment affected by security issue.
description: Give a general description of the environment affected by this security issue.
placeholder: Describe the affected environment.
validations:
required: true
- type: textarea
id: non-sensitive-details
attributes:
label: Non-Sensitive Details
description: If applicable, please offer further non-sensitive information or general observations regarding the security concern.
placeholder: Provide any relevant non-sensitive details or observations.
validations:
required: false

View File

@ -1,24 +1,17 @@
Contributing to the Joomla Component Builder (JCB)
===============
You are welcome to submit a contribution for review and possible inclusion in the Joomla Component Builder but, before it will be accepted, we ask that you follow these simple steps:
If you wish to submit a contribution for review and potential inclusion in the Joomla Component Builder (JCB), please follow these simple steps:
1) Please watch [these tutorials][Tutorials]
1) Open an issue on GitHub, and if possible, provide a fix and create a pull request (PR). Creating a PR automatically generates an issue so that you do not need to create one separately.
2) Open an issue on GitHub. If you can, please provide a fix and create a pull request (PR) instead; this will automatically create an issue for you so you do not have to create an issue if you are creating a pull request.
2) Adhere to the [Joomla! Coding Standards](https://developer.joomla.org/coding-standards.html).
3) Follow the [Joomla! Coding Standards][Standards].
3) When filing an issue or opening a PR, provide a clear and concise title and description. The title should include a brief summary of the issue and reference to an open issue if possible. For example, Invalid Query in com_admin (Ref #1234) is sufficient. Additionally, provide a detailed description of the issue or PR, including what the problem is, what the PR is addressing, testing instructions, and environmental information such as PHP version and database driver and version, in case the issue is specific to certain environments.
4) When filing an issue or opening a PR, please include a clear title and description. The title should be a short summary of an issue and, if possible, should include a reference to an open issue. For example, `Invalid Query in com_admin (Ref #1234)` would be sufficient. All issues and PRs should include a description with as much detail as possible.
If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission.
4) Report security issues to the JCB! Core Team using the [Report security issues contact form](https://www.vdm.io/report-security-issues) instead of using public forums.
5) Report security issues to the JCB! Core Team using the [Report security issues contact form][Security]. Please do not use the public forums for security issues.
Please be patient as not all items will be tested immediately (remember, all bug testing for the JCB is done by volunteers) and be receptive to feedback about your code.
Please be patient, as not all items will be immediately tested since all bug testing for the JCB is performed by volunteers. Additionally, be open to feedback regarding your code.
#### Branches
PRs should usually be made to the `staging` branch as this contains the most recent version of the code.
[Tutorials]: https://www.youtube.com/watch?v=lLOfx9YA7VQ&list=PLQRGFI8XZ_wsfz3NdKawCiYsALuZ-GhwJ
[Standards]: https://developer.joomla.org/coding-standards.html\
[Security]: http://joomlacomponentbuilder.com/report-security-issues
For PRs, submit to the staging branch as it contains the most up-to-date version of the code.

39
.github/SUPPORT.md vendored
View File

@ -1,27 +1,22 @@
Where can you get support and help?
====================
+ [The JCB Tutorials][Tutorials]
+ [Hello World Tutorial][HelloWorld]
+ [The JCB! Wiki][Wiki]
+ [JCB Forum][forum]
+ [Report a Security Issue][Security]
+ [Community Complaint][Complaint]
+ [Open Issue On Github][Issue] ^^
- [Package](https://git.vdm.dev/joomla/pkg-component-builder).
- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip).
- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE).
- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7).
- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45).
- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions).
- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki).
- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). ^^
- [Issues Stream](https://t.me/jcb_issues).
- [Updates](https://t.me/jcb_updates).
- [User Group](https://t.me/jcb_group).
- [Announcement](https://t.me/Joomla_component_builder).
- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder).
- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip).
- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint).
- [Security](https://www.vdm.io/report-security-issues).
Since JCB has become a community project [VDM.io][VDM] is **no longer solely responsible** for support.
We have started a [**JCB forum**][forum] where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components.
^^ Then if you run into any issues, related to the JCB code, like bugs, **start by searching** the (*open & closed*) [issues][Issue] over on Github, and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines][guidelines].
[Tutorials]: https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE
[HelloWorld]: https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45
[Wiki]: https://github.com/vdm-io/Joomla-Component-Builder/wiki
[forum]: https://vdm.bz/jcb-forum
[Security]: http://joomlacomponentbuilder.com/report-security-issues
[Complaint]: http://joomlacomponentbuilder.com/community-complaint
[Issue]: https://github.com/vdm-io/Joomla-Component-Builder/issues
[VDM]: https://www.vdm.io/joomla-component-builder
[guidelines]: https://github.com/vdm-io/Joomla-Component-Builder/blob/master/.github/CONTRIBUTING.md
^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md).

View File

@ -20,7 +20,7 @@
"author_url": "https://io.vdm.dev/",
"description": "The Joomla Component Builder Package that bundles JCB Component and all the plugins and features available into one package for easy install and update of your JCB system.",
"version_id": "com_componentbuilder",
"update_servers": "https://git.vdm.dev/joomla/Component-Builder/raw/branch/staging/componentbuilder_update_server.xml"
"update_servers": "https://git.vdm.dev/joomla/Component-Builder/raw/branch/master/componentbuilder_update_server.xml"
},
"repository": {
"owner": "joomla",

185
CHANGELOG.md Normal file
View File

@ -0,0 +1,185 @@
# v3.2.1-beta3
- Fix version_update column size.
- Improved the Schema Table update engine.
# v3.2.1-beta2
- Fix the media field size limitation. #1109
- Add dynamic datatype update to schema field check.
# v3.2.1-beta1
- Add fallback option to ensure that all JCB tables and fields exist.
- Move the powers autoloader to its own file.
# v3.2.1-alpha4
- Add Joomla powers for namespace dynamic management.
# v3.2.1-alpha3
- Fix plugin code display when methods and properties are missing.
# v3.2.1-alpha2
- Add view list and single name fix.
- Add component code name fix.
- Add reset list of powers.
- Fix missing Factory class in plugin. #1102
# v3.2.1-alpha1
- Add power path override option on component level.
- Fix the sql build feature. #1032
# v3.2.0
- Fix #1053 so that the right and left tabs display correctly in Joomla 4&5
- Move the old helper compiler files to powers
- Move the old helper extrusion files to powers
- Add Preferred Joomla Version to Components
- Add custom file file mapping for Joomla 4 and 5
- Fix the plug-in installer script builder bug #1068
- Fix Event triggers for Joomla 4 and 5 builds.
- Fix plugin field selection
- Fix plugin params tab layout
- Add issue templates
- Force autoloader to always load
- Add Factory class to the J5 Event class. #1093
- Fix [Set String Value] in placeholder table to store the value as a base64 string.
- Fix the search area layout.
- Fix the search area code line selection.
- Fix the input edit button for custom fields.
- Add the new layout to list fields (GUI UPDATE)
# v3.2.0-beta
- Move beta to main repo
# v3.1.42
- Fix #1055 to add the style and scripts to all views.
# v3.1.40
- Fix #1052 so that tabs last opened is remembered and opened again on save, refresh or reopening of an item.
- Fix #1057 so that the datetime fields will be set correctly in mysql.
# v3.1.39
- Fix #1051 making sure the list view is lowercase.
# v3.1.38
- Fix #1046 so that the version restore function will work.
# v3.1.37
- Fix #1041 so that custom tabs are build correctly.
- Fix #1043 so that delete function in Joomla 4 and 5 will work.
- Fix #1045 so that plug-in Structure::setMainXmlFile method will except an object.
- Fix #1042 so that it will remove line breaks and new lines from other languages as well.
# v3.1.36
- Move the defined or die below use statements.
- Add the new router view
# v3.1.35
- Improve the Joomla 4 Templates.
- Fix #1033 the response class issue for the gitea classes.
- Remove the JRegistry class to resolve #1036, #1035
# v3.1.34
- Fix the AjaxController contructor class.
- Improved the getModel calls from the AxajController class.
# v3.1.33
- Fix #1026 by adding the correct layout to the filter views.
- Fix #1026 by adding the class to the filter views.
- Fix #1026 by adding a hint to the filters that are having multiple selection.
- Fix the directional bog where a field in the filters are also called direction.
- Fix the getModel helper method fot J4+.
# v3.1.32
- Fix #1026 by removing chosen everywhere.
- Resolve #1028 by adding in line helper toggle integration to all admin views.
- Remove the import and export buttons until the area is fixed.
- Add emptystate list template to all admin list views.
# v3.1.31
- Add joomla_version to custom code.
- Add Joomla 4 and 5 correct build files.
# v3.1.30
- Add namspace prefix to both global, and component override level.
- Add Joomla 4 and 5 build option
# v3.1.28
- Updates PHPSecLib.
- Fixed connection failure to remote server.
- Adds overriding of back-folder and git-folder on component level.
# v3.1.27
- Adds better remote repository management for the super power features.
- Fixes #1014 so that powers are added to components.
# v3.1.26
- Fixed changelog direction so newest changes is listed at top of the file.
- Finished the init function of super powers.
- Adds rest function inside super power.
- Adds super powers to all templates.
- Updates many helper class methods to now use the utility classes.
- Adds the `spl_autoload_register` method to the component entry file (as-well).
- Moved most methods from the compiler fields class to powers. #955
- Refactored many new builder classes from the registry class.
- Converted the Content class to two builder classes.
- Adds option to add additional templates to a module.
- Resolves #1002 by adding STRING instead of WORD.
- Ported the FOF encryption class into Powers. https://git.vdm.dev/joomla/fof
- Changed all CSS and JS to use `Html::_(` instead of `$this->document->` in compiler code.
- Adds option to turn jQuery off if UIKIT 3 is added.
- Adds option to auto write injection boilerplate code in Powers area.
- Adds option to auto write service provider boilerplate code in the Powers area.
- Improved the `getDynamicContent` method and all banner locations to fetch from https://git.vdm.dev/joomla/jcb-external/ instead.
- Major stability improvements all over the new powers complier classes.
- New [base Registry class](https://git.vdm.dev/joomla/super-powers/src/branch/master/src/7e822c03-1b20-41d1-9427-f5b8d5836af7) has been created specially for JCB.
- Remember to update all plug-ins with this version update (use the package).
# v3.1.24
- Fix the update server #978 issue.
- Fixed the change log to load all entries, not just the last one.
- Fixed #983 so that database updates are created when adding a new adminview
- Moved a few builder arrays to the Compiler Registry
- Adds super powers to JCB
- Adds Gitea API library
- Improves Power filters
- Fix #991 to add the Utilities service class
- Adds Superpower Key (SPK) replacement feature
- Adds Superpower search (GREP) feature
- Adds Power Insert/Update Classes
- Fix #995 that all update sites are using the correct URL
# v3.1.19
- We fixed #972 so that custom code (in the header) will be added after the power namespaces
- We added a message to show when a server move failed
- We fixed the BaseConfig to not use '_' as separator
- We fixed the footable loading issue
- We removed the need for passing placeholders by reference
- We added the option to generate a CHANGELOG
- We fixed the server class to load new client if server details changed.
- We fixed the readme placeholder issue #978.
- We fixed the empty server url issue #978.
- Fixed Package import to now use the phplibsec version 3

View File

@ -1,15 +1,15 @@
# Joomla Component Builder ([JCB](http://joomlacomponentbuilder.com))
# Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com))
This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/staging/admin/assets/images/vdm-component.jpg "The Component Builder")
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/master/admin/assets/images/jcb-banner.jpg "The Component Builder")
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.
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 (3.1.2) 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 (3.2.1-beta3) 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)
@ -23,8 +23,8 @@ Some of the Features
+ Add you [own dashboard](https://www.youtube.com/watch?v=tU7TeYn1Djo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=60) in the back-end.
+ [Dynamic File and Folder](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=56) Inclusion concept.
+ [Easy Translation](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=51) via excel.
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](http://joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](http://joomlacomponentbuilder.com).
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](https://www.joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](https://www.joomlacomponentbuilder.com).
+ Adding mySQL Dump to any View/Table.
+ Grab existing Table data and build a dynamic dump.
+ Unlimited [Joomla](https://extensions.joomla.org/extension/component-builder/) Components.
@ -83,13 +83,13 @@ You are in Control
+ You can dynamically add internal help structures to all component.
+ There is no limitations on how big or how much you want to build (server limitation only).
+ This is a complete factory kind of component that functions like a deployment hub.
+ Export any component completely mapped in [JCB](http://joomlacomponentbuilder.com) and import into another [JCB](http://joomlacomponentbuilder.com).
+ Export any component completely mapped in [JCB](https://www.joomlacomponentbuilder.com) and import into another [JCB](https://www.joomlacomponentbuilder.com).
+ This and much much more are all possible with this component builder!
Get More Demo Content
====================
> You can now get access to the WOW factor, [JCB](http://joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](http://joomlacomponentbuilder.com) mapped components.
> You can now get access to the WOW factor, [JCB](https://www.joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](https://www.joomlacomponentbuilder.com) mapped components.
### All you need to do is [explained here](https://vdm.bz/how-to-get-free-vdm-package-keys)!
@ -99,20 +99,24 @@ To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jc
Where can you get support and help?
====================
+ [The JCB Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE)
+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
+ [The JCB! Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki)
+ [Forum](https://vdm.bz/jcb-forum)
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
+ [Open Issue On Gitea](https://git.vdm.dev/joomla/Component-Builder/issues) ^^
- [Package](https://git.vdm.dev/joomla/pkg-component-builder).
- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip).
- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE).
- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7).
- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45).
- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions).
- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki).
- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). ^^
- [Issues Stream](https://t.me/jcb_issues).
- [Updates](https://t.me/jcb_updates).
- [User Group](https://t.me/jcb_group).
- [Announcement](https://t.me/Joomla_component_builder).
- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder).
- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip).
- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint).
- [Security](https://www.vdm.io/report-security-issues).
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
We have started a [**JCB forum**](https://vdm.bz/jcb-forum) where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components.
^^ Then if you run into any issues, related to the [JCB](http://joomlacomponentbuilder.com) code, like bugs, **start by searching** the (*open & closed*) issues over on Gitea, and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/.github/CONTRIBUTING.md).
^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md).
WHY GIVE IT AWAY LIKE THIS?
====================
@ -125,14 +129,14 @@ Our idea was to almost let this tool serve as a cheat sheet to how things can be
MAKING IT BETTER!
====================
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](http://joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](http://joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](https://www.joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](https://www.joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
TODO
======
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](http://joomlacomponentbuilder.com).
- Team collaborative development across [JCB](http://joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](http://joomlacomponentbuilder.com). (help us select the best system for this)
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](https://www.joomlacomponentbuilder.com).
- Team collaborative development across [JCB](https://www.joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](https://www.joomlacomponentbuilder.com). (help us select the best system for this)
# Build Details
@ -140,17 +144,17 @@ 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*: 9th July, 2022
+ *Version*: 3.1.2
+ *Last Build*: 24th April, 2024
+ *Version*: 3.2.1-beta3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **311259**
+ *Field count*: **2002**
+ *File count*: **2049**
+ *Folder count*: **349**
+ *Line count*: **764955**
+ *Field count*: **2097**
+ *File count*: **5382**
+ *Folder count*: **471**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
## Contributors

View File

@ -1,15 +1,15 @@
# Joomla Component Builder ([JCB](http://joomlacomponentbuilder.com))
# Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com))
This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/staging/admin/assets/images/vdm-component.jpg "The Component Builder")
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/master/admin/assets/images/jcb-banner.jpg "The Component Builder")
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.
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 (3.1.2) 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 (3.2.1-beta3) 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)
@ -23,8 +23,8 @@ Some of the Features
+ Add you [own dashboard](https://www.youtube.com/watch?v=tU7TeYn1Djo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=60) in the back-end.
+ [Dynamic File and Folder](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=56) Inclusion concept.
+ [Easy Translation](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=51) via excel.
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](http://joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](http://joomlacomponentbuilder.com).
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](https://www.joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](https://www.joomlacomponentbuilder.com).
+ Adding mySQL Dump to any View/Table.
+ Grab existing Table data and build a dynamic dump.
+ Unlimited [Joomla](https://extensions.joomla.org/extension/component-builder/) Components.
@ -83,13 +83,13 @@ You are in Control
+ You can dynamically add internal help structures to all component.
+ There is no limitations on how big or how much you want to build (server limitation only).
+ This is a complete factory kind of component that functions like a deployment hub.
+ Export any component completely mapped in [JCB](http://joomlacomponentbuilder.com) and import into another [JCB](http://joomlacomponentbuilder.com).
+ Export any component completely mapped in [JCB](https://www.joomlacomponentbuilder.com) and import into another [JCB](https://www.joomlacomponentbuilder.com).
+ This and much much more are all possible with this component builder!
Get More Demo Content
====================
> You can now get access to the WOW factor, [JCB](http://joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](http://joomlacomponentbuilder.com) mapped components.
> You can now get access to the WOW factor, [JCB](https://www.joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](https://www.joomlacomponentbuilder.com) mapped components.
### All you need to do is [explained here](https://vdm.bz/how-to-get-free-vdm-package-keys)!
@ -99,20 +99,24 @@ To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jc
Where can you get support and help?
====================
+ [The JCB Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE)
+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
+ [The JCB! Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki)
+ [Forum](https://vdm.bz/jcb-forum)
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
+ [Open Issue On Gitea](https://git.vdm.dev/joomla/Component-Builder/issues) ^^
- [Package](https://git.vdm.dev/joomla/pkg-component-builder).
- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip).
- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE).
- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7).
- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45).
- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions).
- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki).
- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). ^^
- [Issues Stream](https://t.me/jcb_issues).
- [Updates](https://t.me/jcb_updates).
- [User Group](https://t.me/jcb_group).
- [Announcement](https://t.me/Joomla_component_builder).
- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder).
- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip).
- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint).
- [Security](https://www.vdm.io/report-security-issues).
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
We have started a [**JCB forum**](https://vdm.bz/jcb-forum) where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components.
^^ Then if you run into any issues, related to the [JCB](http://joomlacomponentbuilder.com) code, like bugs, **start by searching** the (*open & closed*) issues over on Gitea, and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/.github/CONTRIBUTING.md).
^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md).
WHY GIVE IT AWAY LIKE THIS?
====================
@ -125,14 +129,14 @@ Our idea was to almost let this tool serve as a cheat sheet to how things can be
MAKING IT BETTER!
====================
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](http://joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](http://joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](https://www.joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](https://www.joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
TODO
======
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](http://joomlacomponentbuilder.com).
- Team collaborative development across [JCB](http://joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](http://joomlacomponentbuilder.com). (help us select the best system for this)
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](https://www.joomlacomponentbuilder.com).
- Team collaborative development across [JCB](https://www.joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](https://www.joomlacomponentbuilder.com). (help us select the best system for this)
# Build Details
@ -140,17 +144,17 @@ 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*: 9th July, 2022
+ *Version*: 3.1.2
+ *Last Build*: 24th April, 2024
+ *Version*: 3.2.1-beta3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **311259**
+ *Field count*: **2002**
+ *File count*: **2049**
+ *Folder count*: **349**
+ *Line count*: **764955**
+ *Field count*: **2097**
+ *File count*: **5382**
+ *Folder count*: **471**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
## Contributors

View File

@ -19,7 +19,6 @@
<action name="admin_view.access" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC" />
<action name="admin_view.batch" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE_DESC" />
<action name="admin_view.create" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE_DESC" />
<action name="admin_view.dashboard_add" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_DASHBOARD_ADD_DESC" />
<action name="admin_view.dashboard_list" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_DASHBOARD_LIST_DESC" />
<action name="admin_view.delete" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_DELETE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_DELETE_DESC" />
<action name="admin_view.edit" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_DESC" />
@ -212,6 +211,16 @@
<action name="component_plugins.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC" />
<action name="component_plugins.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC" />
<action name="component_plugins.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC" />
<action name="component_router.access" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_ACCESS_DESC" />
<action name="component_router.batch" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_BATCH_USE_DESC" />
<action name="component_router.create" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_CREATE_DESC" />
<action name="component_router.delete" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_DELETE_DESC" />
<action name="component_router.edit" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_DESC" />
<action name="component_router.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_BY_DESC" />
<action name="component_router.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_DATE_DESC" />
<action name="component_router.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_OWN_DESC" />
<action name="component_router.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_STATE_DESC" />
<action name="component_router.version" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_VERSION_DESC" />
<action name="component_site_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC" />
<action name="component_site_views.batch" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE_DESC" />
<action name="component_site_views.create" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE_DESC" />
@ -235,7 +244,6 @@
<action name="custom_admin_view.get_snippets" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="custom_admin_view.access" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS_DESC" />
<action name="custom_admin_view.batch" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_BATCH_USE_DESC" />
<action name="custom_admin_view.dashboard_add" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_DASHBOARD_ADD_DESC" />
<action name="custom_admin_view.dashboard_list" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_DASHBOARD_LIST_DESC" />
<action name="custom_admin_view.version" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EDIT_VERSION_DESC" />
<action name="custom_admin_view.export" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EXPORT" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EXPORT_DESC" />
@ -410,6 +418,19 @@
<action name="joomla_plugin_updates.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC" />
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
<action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" />
<action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" />
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
<action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" />
<action name="joomla_power.create" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_CREATE_DESC" />
<action name="joomla_power.delete" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_DELETE_DESC" />
<action name="joomla_power.edit" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_DESC" />
<action name="joomla_power.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_BY_DESC" />
<action name="joomla_power.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_power.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_OWN_DESC" />
<action name="joomla_power.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_STATE_DESC" />
<action name="joomla_power.version" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_VERSION_DESC" />
<action name="joomla_power.submenu" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC" />
<action name="language.build" title="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC" />
<action name="language_translation.access" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC" />
<action name="language_translation.batch" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE_DESC" />
@ -485,6 +506,8 @@
<action name="placeholder.export" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT_DESC" />
<action name="placeholder.import" title="COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT_DESC" />
<action name="placeholder.submenu" title="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU" description="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC" />
<action name="power.init" title="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS_DESC" />
<action name="power.reset" title="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC" />
<action name="power.run_expansion" title="COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="power.access" title="COM_COMPONENTBUILDER_POWERS_ACCESS" description="COM_COMPONENTBUILDER_POWERS_ACCESS_DESC" />
<action name="power.batch" title="COM_COMPONENTBUILDER_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_POWERS_BATCH_USE_DESC" />
@ -498,6 +521,10 @@
<action name="power.edit.state" title="COM_COMPONENTBUILDER_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC" />
<action name="power.version" title="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC" />
<action name="power.submenu" title="COM_COMPONENTBUILDER_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC" />
<action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" />
<action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" />
<action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" />
<action name="search.submenu" title="COM_COMPONENTBUILDER_SEARCH_SUBMENU" description="COM_COMPONENTBUILDER_SEARCH_SUBMENU_DESC" />
<action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" />
<action name="server.batch" title="COM_COMPONENTBUILDER_SERVERS_BATCH_USE" description="COM_COMPONENTBUILDER_SERVERS_BATCH_USE_DESC" />
<action name="server.create" title="COM_COMPONENTBUILDER_SERVERS_CREATE" description="COM_COMPONENTBUILDER_SERVERS_CREATE_DESC" />
@ -515,7 +542,6 @@
<action name="site_view.get_snippets" title="COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="site_view.access" title="COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS_DESC" />
<action name="site_view.batch" title="COM_COMPONENTBUILDER_SITE_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_SITE_VIEWS_BATCH_USE_DESC" />
<action name="site_view.dashboard_add" title="COM_COMPONENTBUILDER_SITE_VIEWS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_SITE_VIEWS_DASHBOARD_ADD_DESC" />
<action name="site_view.dashboard_list" title="COM_COMPONENTBUILDER_SITE_VIEWS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SITE_VIEWS_DASHBOARD_LIST_DESC" />
<action name="site_view.version" title="COM_COMPONENTBUILDER_SITE_VIEWS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SITE_VIEWS_EDIT_VERSION_DESC" />
<action name="site_view.export" title="COM_COMPONENTBUILDER_SITE_VIEWS_EXPORT" description="COM_COMPONENTBUILDER_SITE_VIEWS_EXPORT_DESC" />
@ -594,6 +620,17 @@
<action name="joomla_plugin.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC" />
<action name="joomla_plugin.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC" />
</section>
<section name="joomla_power">
<action name="joomla_power.edit" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_DESC" />
<action name="joomla_power.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_OWN_DESC" />
<action name="joomla_power.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_STATE_DESC" />
<action name="joomla_power.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_BY_DESC" />
<action name="joomla_power.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_power.create" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_CREATE_DESC" />
<action name="joomla_power.delete" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_DELETE_DESC" />
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
<action name="joomla_power.version" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_EDIT_VERSION_DESC" />
</section>
<section name="power">
<action name="power.edit" title="COM_COMPONENTBUILDER_POWERS_EDIT" description="COM_COMPONENTBUILDER_POWERS_EDIT_DESC" />
<action name="power.edit.own" title="COM_COMPONENTBUILDER_POWERS_EDIT_OWN" description="COM_COMPONENTBUILDER_POWERS_EDIT_OWN_DESC" />
@ -896,6 +933,17 @@
<action name="component_custom_admin_menus.access" title="COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_ACCESS_DESC" />
<action name="component_custom_admin_menus.version" title="COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS_EDIT_VERSION_DESC" />
</section>
<section name="component_router">
<action name="component_router.edit" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_DESC" />
<action name="component_router.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_OWN_DESC" />
<action name="component_router.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_STATE_DESC" />
<action name="component_router.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_BY_DESC" />
<action name="component_router.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_CREATED_DATE_DESC" />
<action name="component_router.create" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_CREATE_DESC" />
<action name="component_router.delete" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_DELETE_DESC" />
<action name="component_router.access" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_ACCESS_DESC" />
<action name="component_router.version" title="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_ROUTERS_EDIT_VERSION_DESC" />
</section>
<section name="component_config">
<action name="component_config.edit" title="COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_DESC" />
<action name="component_config.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_CONFIG_EDIT_OWN_DESC" />

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -11,153 +11,153 @@
/* CSS Document */
.dashboard-container {
margin-left: 10px;
margin-top: 10px;
width: 100%;
margin-left: 10px;
margin-top: 10px;
width: 100%;
}
.dashboard-container [class*="span"] {
display: block;
float: none;
margin-left: 0;
width: auto;
display: block;
float: none;
margin-left: 0;
width: auto;
}
.dashboard-container:before, .dashboard-container:after {
content: "";
display: table;
content: "";
display: table;
}
.dashboard-container:after {
clear: both;
clear: both;
}
.dashboard-container [class*="span"] {
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
}
.dashboard-container [class*="span"]:first-child {
margin-left: 0;
margin-left: 0;
}
.dashboard-wraper {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
}
.dashboard-content a {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
}
.dashboard-content a:hover {
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
}
.dashboard-title {
display: block;
padding-top: 5px;
display: block;
padding-top: 5px;
}
.dashboard-info {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
}
.dashboard-info span {
display: block;
text-align: center;
display: block;
text-align: center;
}
.dashboard-info img {
margin: 0 auto;
margin: 0 auto;
}
.dashboard-table {
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
}
.dashboard-info h5 {
font-size: 11px;
font-weight: bold;
font-size: 11px;
font-weight: bold;
}
.dashboard-block {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
}
.dashboard-block .dashboard-block-head {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
}
.dashboard-block .dashboard-block-head h5 {
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
}
.dashboard-block .dashboard-block-content {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
}
.dashboard-block .dashboard-block-box {
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
}
.dashboard-block .dashboard-block-content .dashboard-block-box {
margin-top: 0 !important;
margin-top: 0 !important;
}
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}
.dashboard-block-table {
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
}
.dashboard-block-table th, .dashboard-block-table td {
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
}
.dashboard-badge {
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
}

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,40 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */
.selected {
background-color:#d7d8db !important
}
tr.selected td {
background-color:#d7d8db !important
}
#search_settings_block .controls {
margin-left: 1px !important;
}
tr {
cursor:pointer
}
.found_code {
color: #46a546;
font-weight: bolder;
}
.search_details_title {
font-size: large;
font-weight: bolder;
}
.small_column {
padding: 2px;
text-align: center;
}
th.small_column {
padding: 2px !important;
text-align: center !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

956
admin/assets/js/search.js Normal file
View File

@ -0,0 +1,956 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* JS Document */
/**
* JS Function to execute the search
*/
const doSearch = async (signal, tables) => {
try {
// build form
const formData = new FormData();
// load the result table
const resultsTable = new DataTable('#search_results_table');
// get the search mode
let typeSearch = modeObject.querySelector('input[type=\'radio\']:checked').value;
// set some search values
let searchValue = searchObject.value;
let replaceValue = replaceObject.value;
let matchValue = matchObject.checked ? 1 : 0;
let wholeValue = wholeObject.checked ? 1 : 0;
let regexValue = regexObject.checked ? 1 : 0;
// add the form data
formData.append('table_name', '');
formData.append('type_search', typeSearch);
formData.append('search_value', searchValue);
formData.append('replace_value', replaceValue);
formData.append('match_case', matchValue);
formData.append('whole_word', wholeValue);
formData.append('regex_search', regexValue);
// update the URL
updateUrlQuery(searchValue, replaceValue, matchValue, wholeValue, regexValue, typeSearch);
let abort_this_search_values = false;
// reset the progress bar
searchProgressBarObject.style.width = '0%';
searchProgressBarObject.innerHTML = '0%';
// show the progress bar
searchProgressObject.style.display = '';
// hidde the search button
startSearchButton.style.display = 'none';
// show the stop search button
stopSearchButton.style.display = '';
// start search timer
startSearchTimer();
// reset our global counters
fieldCount = 0;
lineCount = 0;
// set our local counters
let total = 0;
let progress = tables.length;
let index;
for (index = 0; index < progress; index++) {
let tableName = tables[index];
// add the table name
formData.set('table_name', tableName);
let options = {
signal: signal,
method: 'POST', // *GET, POST, PUT, DELETE, etc.
body: formData
}
if (abort_this_search_values) {
break;
}
const response = await fetch(UrlAjax + 'doSearch', options).then(response => {
total++;
// return the json response
if (response.ok) {
return response.json();
} else {
UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_THE_SEARCH_PROCESS_HAD_AN_ERROR_WITH_TABLE') + ' ' + tableName, {pos:'top-right', status:'danger'});
}
}).then((data) => {
if (typeof data.success !== 'undefined') {
UIkit.notify(data.success, {pos:'top-right', timeout : 200, status:'success'});
//} else if (typeof data.not_found !== 'undefined') {
// UIkit.notify(data.not_found, {pos:'bottom-right', timeout : 200});
}
if (typeof data.items !== 'undefined') {
addTableItems(resultsTable, data.items, typeSearch);
}
if (typeof data.fields_count !== 'undefined') {
fieldCount += data.fields_count;
}
if (typeof data.line_count !== 'undefined') {
lineCount += data.line_count;
}
// calculate the percent
let percent = 100.0 * (total / progress);
// update the progress bar
searchProgressObject.style.display = ''; // always make sure it still shows...
searchProgressBarObject.style.width = percent.toFixed(2) + '%';
searchProgressBarObject.innerHTML = percent.toFixed(2) + '%';
// when complete hide the progress bar
if (progress == total) {
let total_field_line = ' ' + fieldCount + ' ' + Joomla.JText._('COM_COMPONENTBUILDER_FIELDS_THAT_HAD') + ' ' + lineCount + ' ' + Joomla.JText._('COM_COMPONENTBUILDER_LINES') + ' ';
if (progress == 1) {
searchProgressBarObject.innerHTML = Joomla.JText._('COM_COMPONENTBUILDER_SEARCHING') + ' ' + tableName + total_field_line + Joomla.JText._('COM_COMPONENTBUILDER_AND_FINISHED_THE_SEARCH_IN') + ' ' + getSearchLenght() + ' ' + Joomla.JText._('COM_COMPONENTBUILDER_SECONDS');
} else {
searchProgressBarObject.innerHTML = Joomla.JText._('COM_COMPONENTBUILDER_SEARCHING') + ' ' + progress + ' ' + Joomla.JText._('COM_COMPONENTBUILDER_TABLES_WITH') + total_field_line + Joomla.JText._('COM_COMPONENTBUILDER_AND_FINISHED_THE_SEARCH_IN') + ' ' + getSearchLenght() + ' ' + Joomla.JText._('COM_COMPONENTBUILDER_SECONDS');
}
// show the search button
startSearchButton.style.display = '';
// hidde the stop search button
stopSearchButton.style.display = 'none';
setTimeout(function () {
// hide the progress bar again
searchProgressObject.style.display = 'none';
}, 13000);
}
}).catch(error => {
console.log(error);
if (error.name === "AbortError") {
abort_this_search_values = true;
}
});
}
} catch (error) {
console.log(error);
} finally {
// Executed regardless if we caught the error
}
};
/**
* JS Function to start search timer
*/
const startSearchTimer = () => {
startSearchTime = new Date();
};
/**
* JS Function to get search lenght
*/
const getSearchLenght = () => {
// set ending time
endSearchTime = new Date();
// get diff in ms
var timeDiff = endSearchTime - startSearchTime;
// strip the ms
timeDiff /= 1000;
// get seconds
return Math.round(timeDiff);
};
/**
* JS Function to fetch selected item
*/
const getSelectedItem = async (table, row, field, line) => {
try {
// get the search mode
let mode = modeObject.querySelector('input[type=\'radio\']:checked').value;
// build form
const formData = new FormData();
formData.append('field_name', field);
formData.append('row_id', row);
formData.append('table_name', table);
formData.append('search_value', searchObject.value);
formData.append('replace_value', replaceObject.value);
formData.append('match_case', matchObject.checked ? 1 : 0);
formData.append('whole_word', wholeObject.checked ? 1 : 0);
formData.append('regex_search', regexObject.checked ? 1 : 0);
// get search value
if (mode == 2) {
// add the line value
formData.append('line_nr', line);
// calling URL
postURL = UrlAjax + 'getReplaceValue';
} else {
// calling URL
postURL = UrlAjax + 'getSearchValue';
}
let options = {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
body: formData
}
const response = await fetch(postURL, options).then(response => {
if (response.ok) {
return response.json();
}
}).then((data) => {
if (typeof data.success !== 'undefined') {
UIkit.notify(data.success, {pos:'top-right', status:'success'});
}
if (typeof data.value !== 'undefined') {
addSelectedItem(data.value, table, row, field, line);
}
}).catch(error => {
console.log(error);
});
} catch (error) {
console.log(error);
} finally {
// Executed regardless if we caught the error
}
};
/**
* JS Function to check if we should save/update the all current found items
*/
const replaceAllCheck = () => {
// get the current searc and replace values
let searchValue = searchObject.value;
let replaceValue = replaceObject.value;
// load question
let question = Joomla.JText._('COM_COMPONENTBUILDER_YOUR_ARE_ABOUT_TO_UPDATE_BALLB_VALUES_THAT_CAN_BE_FOUND_IN_THE_DATABASE') + '<br />' +
Joomla.JText._('COM_COMPONENTBUILDER_YOU_WILL_REPLACE') + ': [<span class="found_code">' + htmlentities(searchValue) + '</span>] ' +
Joomla.JText._('COM_COMPONENTBUILDER_WITH') + ': [<span class="found_code">' + htmlentities(replaceValue) + '</span>]<br />' +
Joomla.JText._('COM_COMPONENTBUILDER_THIS_CAN_NOT_BE_UNDONE_BYOU_HAVE_BEEN_WARNEDB') + '<br /><br />' +
Joomla.JText._('COM_COMPONENTBUILDER_ARE_YOU_THEREFORE_ABSOLUTELY_SURE_YOU_WANT_TO_CONTINUE');
// do check
UIkit.modal.confirm(question, function () {
// show the search settings again
showSearch();
// Create new controller and issue new request
controller_replace = new AbortController();
// check if any specific table was set
let tables = [];
let table = tableObject.value;
if (table != -1) {
tables.push(table);
replaceAll(controller_replace.signal, tables);
} else {
replaceAll(controller_replace.signal, searchTables);
}
}, {labels: { Ok: Joomla.JText._('COM_COMPONENTBUILDER_YES_UPDATE_ALL'), Cancel: Joomla.JText._('COM_COMPONENTBUILDER_NO') }});
};
/**
* JS Function to execute the search
*/
const replaceAll = async (signal, tables) => {
try {
// build form
const formData = new FormData();
// get the search mode
let typeSearch = modeObject.querySelector('input[type=\'radio\']:checked').value;
// set some search values
let searchValue = searchObject.value;
let replaceValue = replaceObject.value;
let matchValue = matchObject.checked ? 1 : 0;
let wholeValue = wholeObject.checked ? 1 : 0;
let regexValue = regexObject.checked ? 1 : 0;
// add the form data
formData.append('table_name', '');
formData.append('type_search', typeSearch);
formData.append('search_value', searchValue);
formData.append('replace_value', replaceValue);
formData.append('match_case', matchValue);
formData.append('whole_word', wholeValue);
formData.append('regex_search', regexValue);
// reset the progress bar
replaceProgressBarObject.style.width = '0%';
// show the progress bar
replaceProgressObject.style.display = '';
let abort_this_replace_values = false;
let total = 0;
let progress = tables.length;
let index;
for (index = 0; index < progress; index++) {
let tableName = tables[index];
// add the table name
formData.set('table_name', tableName);
let options = {
signal: signal,
method: 'POST', // *GET, POST, PUT, DELETE, etc.
body: formData
}
if (abort_this_replace_values) {
break;
}
const response = await fetch(UrlAjax + 'replaceAll', options).then(response => {
total++;
if (response.ok) {
return response.json();
} else {
UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE') + ' ' + tableName, {pos:'top-right', status:'danger'});
}
}).then((data) => {
if (typeof data.success !== 'undefined') {
UIkit.notify(data.success, {pos:'top-right', timeout : 200, status:'success'});
} else if (typeof data.error !== 'undefined') {
UIkit.notify(data.error, {pos:'bottom-right', timeout : 200});
}
// calculate the percent
let percent = 100.0 * (total / progress);
// update the progress bar
replaceProgressBarObject.style.width = percent.toFixed(2) + '%';
// when complete hide the progress bar
if (progress == total) {
setTimeout(function () {
// hide the progress bar again
replaceProgressObject.style.display = 'none';
// we clear the table again
clearAll();
// if not reqex we reverse the search for you so you can see the update was a success
if (regexValue == 0) {
// set the replace value as the search value
UIkit.modal.confirm(Joomla.JText._('COM_COMPONENTBUILDER_WOULD_YOU_LIKE_TO_DO_A_REVERSE_SEARCH'), function(){
startNewSearch(replaceValue, searchValue, matchValue, wholeValue, regexValue, 2);
}, function () {
UIkit.modal.confirm(Joomla.JText._('COM_COMPONENTBUILDER_WOULD_YOU_LIKE_TO_REPEAT_THE_SAME_SEARCH'), function(){
startSearch();
}, function () {
clearSearch();
}, {labels: { Ok: Joomla.JText._('COM_COMPONENTBUILDER_YES'), Cancel: Joomla.JText._('COM_COMPONENTBUILDER_NO') }});
}, {labels: { Ok: Joomla.JText._('COM_COMPONENTBUILDER_YES'), Cancel: Joomla.JText._('COM_COMPONENTBUILDER_NO') }});
} else {
// else we search it again just to prove its changed
UIkit.modal.confirm(Joomla.JText._('COM_COMPONENTBUILDER_WOULD_YOU_LIKE_TO_REPEAT_THE_SAME_SEARCH'), function(){
startSearch();
}, function () {
clearSearch();
}, {labels: { Ok: Joomla.JText._('COM_COMPONENTBUILDER_YES'), Cancel: Joomla.JText._('COM_COMPONENTBUILDER_NO') }});
}
}, 3000);
}
}).catch(error => {
console.log(error);
if (error.name === "AbortError") {
abort_this_replace_values = true;
}
});
}
} catch (error) {
console.log(error);
} finally {
// Executed regardless if we caught the error
}
};
/**
* JS Function to check if we should save/update the current selected item
*/
const setValueCheck = (row, field, table) => {
// load question
let question = Joomla.JText._('COM_COMPONENTBUILDER_YOUR_ARE_ABOUT_TO_UPDATE_ROW') + ' (' + row + ') -> (' + field + ') ' +
Joomla.JText._('COM_COMPONENTBUILDER_FIELD_IN_THE') + ' (' + table + ') ' + Joomla.JText._('COM_COMPONENTBUILDER_TABLE') + '.<br /><br />' +
Joomla.JText._('COM_COMPONENTBUILDER_THIS_CAN_NOT_BE_UNDONE_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE');
// do check
UIkit.modal.confirm(question, function () {
setValue(row, field, table);
}, {labels: { Ok: Joomla.JText._('COM_COMPONENTBUILDER_YES'), Cancel: Joomla.JText._('COM_COMPONENTBUILDER_NO') }});
};
/**
* JS Function to set the current selected item
*/
const setValue = async (row, field, table) => {
try {
// get the value from the editor
let value = editorObject.getValue();
// build form
const formData = new FormData();
formData.append('value', value);
formData.append('row_id', row);
formData.append('field_name', field);
formData.append('table_name', table);
let options = {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
body: formData
}
const response = await fetch(UrlAjax + 'setValue', options).then(response => {
if (response.ok) {
return response.json();
}
}).then((data) => {
if (typeof data.success !== 'undefined') {
UIkit.notify(data.success, {pos:'top-right', status:'success'});
clearSelectedItem();
tableActiveObject.remove().draw();
}
}).catch(error => {
console.log(error);
});
} catch (error) {
console.log(error);
} finally {
// Executed regardless if we caught the error
}
};
/**
* JS Function to add item to the editor
*/
const addSelectedItem = async (value, table, row, field, line) => {
// display area
if (value.length > 1)
{
// add value to editor
editorObject.setValue(value);
// set item details notice area
itemNoticeObject.style.display = '';
itemEditButtonObject.innerHTML = editButtonSelected;
itemTableNameObject.innerHTML = table;
itemRowIdObject.innerHTML = row;
itemFieldNameObject.innerHTML = field;
itemLineNumberObject.innerHTML = line;
// set button and editor line if we have a line number
if (typeof line == 'number') {
// show and set the save button
buttonUpdateItemObject.style.display = '';
buttonUpdateItemObject.setAttribute('onclick',"setValueCheck(" + row + ", '" + field + "', '" + table + "');");
// get top of the code line
let top = editorObject.charCoords({line: line, ch: 0}, "local").top;
// scroll to the line
editorObject.scrollTo(null, top - 12);
// select the line
editorObject.setCursor(line - 1);
} else {
// no line so no data we can't save this data
buttonUpdateItemObject.setAttribute('onclick', "");
buttonUpdateItemObject.style.display = 'none';
}
}
};
/**
* JS Function to clear item from the editor and hide it
*/
const clearSelectedItem = async () => {
// display area
editorObject.setValue('');
// clear notice area
itemNoticeObject.style.display = 'none';
itemEditButtonObject.innerHTML = '...';
itemTableNameObject.innerHTML = '...';
itemRowIdObject.innerHTML = '...';
itemFieldNameObject.innerHTML = '...';
itemLineNumberObject.innerHTML = '...';
// clear update button
buttonUpdateItemObject.setAttribute('onclick', '');
};
/**
* JS Function to clear table items
*/
const clearTableItems = async () => {
let table = new DataTable('#search_results_table');
// clear search
table.search('').columns().search( '' );
// clear items
table.clear().draw( true );
// hide the update all items
buttonUpdateAllStyleDisplay('none');
};
/**
* JS Function to clear all details of the search
*/
const clearAll = async () => {
// clear all details
clearTableItems();
clearSelectedItem();
searchedObject.innerHTML = '....';
};
/**
* JS Function to clear the search and replace values
*/
const clearSearch = async () => {
// clear the search and replace values
searchObject.value = '';
replaceObject.value = '';
};
/**
* JS Function to set the search and replace values
*/
const startNewSearch = async (search, replace = '', match = 0, whole = 0, regex = 0, mode = 1) => {
// redirect to a new search
window.location.href = getSearchURL(search, replace, match, whole, regex, mode);
};
/**
* JS Function to update the URL of the browser with the search query
*/
const updateUrlQuery = async (search, replace = '', match = 0, whole = 0, regex = 0, mode = 1) => {
// update the url query
window.history.pushState({}, '', getSearchURL(search, replace, match, whole, regex, mode));
};
/**
* JS Function to get the current search URL
*/
const getSearchURL = (search, replace = '', match = 0, whole = 0, regex = 0, mode = 1) => {
// check if its a single table search
let table = tableObject.value;
let table_name = '';
if (table != -1) {
table_name = '&table_name=' + urlencode(table);
}
// update the type of search
if (mode == 1) {
return UrlSearch + table_name +
'&search_value=' + urlencode(search) +
'&type_search=1&match_case=' + match +
'&whole_word=' + whole +
'&regex_search=' + regex;
} else if (mode == 2) {
return UrlSearch + table_name +
'&search_value=' + urlencode(search) +
'&replace_value=' + urlencode(replace) +
'&type_search=2&match_case=' + match +
'&whole_word=' + whole +
'&regex_search=' + regex;
}
return UrlSearch + table_name;
};
/**
* JS Function to check if a element has a class
*/
const hasClass = (elementObject, classNaam) => {
return !!elementObject.className.match(new RegExp('(\\s|^)' + classNaam + '(\\s|$)'));
};
/**
* JS Function add a class from an element
*/
const addClass = (elementObject, classNaam) => {
if (!hasClass(elementObject, classNaam)) {
elementObject.className += " " + classNaam;
}
};
/**
* JS Function remove a class from an element
*/
const removeClass = (elementObject, classNaam) => {
if (hasClass(elementObject, classNaam)) {
var reg = new RegExp('(\\s|^)' + classNaam + '(\\s|$)');
elementObject.className = elementObject.className.replace(reg, ' ');
}
};
/**
* JS Function to add items to the table
*/
const addTableItems = async (table, items, typeSearch) => {
table.rows.add(items).draw( false );
if (typeSearch == 2) {
buttonUpdateAllStyleDisplay(''); // TODO should only show once all items are loaded
} else {
buttonUpdateAllStyleDisplay('none'); // TODO should only show once all items are loaded
}
};
/**
* JS Function to update the update all button
*/
const buttonUpdateAllStyleDisplay = async (value) => {
buttonUpdateAllObject.forEach((buttonObject) => {
buttonObject.style.display = value;
});
};
/**
* JS Function to execute (A) on search/replace text change , (B) on search options changes
*/
const startSearch = (field, forced = false) => {
// check mode
let mode = modeObject.querySelector('input[type=\'radio\']:checked').value;
if (mode == 0) {
// reset the search area
window.location.href = UrlSearch;
}
// check if we have an Enter click
if (field && typeof field.code !== 'undefined' && field.code === "Enter") {
forced = true;
}
// get replace value if set
const replaceValue = replaceObject.value;
if (replaceValue.length > 0) {
// set the searched value
replacedObject.innerHTML = htmlentities(replaceValue);
} else {
replacedObject.innerHTML = '';
}
// get search value
const searchValue = searchObject.value;
if (searchValue.length > 2 || (searchValue.length > 0 && forced)) {
// Cancel any ongoing requests
if (controller) controller.abort();
// we clear the table again
clearAll();
// set the searched value
searchedObject.innerHTML = htmlentities(searchValue);
// Create new controller and issue new request
controller = new AbortController();
// check if any specific table was set
let tables = [];
let table = tableObject.value;
if (table != -1) {
tables.push(table);
doSearch(controller.signal, tables);
} else {
doSearch(controller.signal, searchTables);
}
} else {
// Clear the table
clearAll();
}
};
/**
* JS Function to stop a search
*/
const stopSearch = () => {
// Cancel any ongoing requests
if (controller) controller.abort();
// show the search button
startSearchButton.style.display = '';
// hidde the stop search button
stopSearchButton.style.display = 'none';
// remove the progress bar at some point
setTimeout(function () {
// hide the progress bar again
searchProgressObject.style.display = 'none';
}, 13000);
}
/**
* JS Function to hide search settings and show table search
*/
const showSearch = () => {
searchSettingsObject.style.display = '';
searchDetailsObject.style.display = 'none';
replaceDetailsObject.style.display = 'none';
tableSearchObject.style.display = 'none';
tableLengthObject.style.display = 'none';
};
/**
* JS Function to show search settings and hide table search
*/
const hideSearch = () => {
searchSettingsObject.style.display = 'none';
searchDetailsObject.style.display = '';
tableSearchObject.style.display = '';
tableLengthObject.style.display = '';
// check if we are in replace mode
let mode = modeObject.querySelector('input[type=\'radio\']:checked').value;
if (mode == 2) {
replaceDetailsObject.style.display = '';
}
};
function htmlentities(string, quoteStyle, charset, doubleEncode) {
// discuss at: https://locutus.io/php/htmlentities/
// original by: Kevin van Zonneveld (https://kvz.io)
// revised by: Kevin van Zonneveld (https://kvz.io)
// revised by: Kevin van Zonneveld (https://kvz.io)
// improved by: nobbler
// improved by: Jack
// improved by: Rafał Kukawski (https://blog.kukawski.pl)
// improved by: Dj (https://locutus.io/php/htmlentities:425#comment_134018)
// bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)
// bugfixed by: Brett Zamir (https://brett-zamir.me)
// input by: Ratheous
// note 1: function is compatible with PHP 5.2 and older
// example 1: htmlentities('Kevin & van Zonneveld')
// returns 1: 'Kevin &amp; van Zonneveld'
// example 2: htmlentities("foo'bar","ENT_QUOTES")
// returns 2: 'foo&#039;bar'
const hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle)
string = string === null ? '' : string + ''
if (!hashMap) {
return false
}
if (quoteStyle && quoteStyle === 'ENT_QUOTES') {
hashMap["'"] = '&#039;'
}
doubleEncode = doubleEncode === null || !!doubleEncode
const regex = new RegExp('&(?:#\\d+|#x[\\da-f]+|[a-zA-Z][\\da-z]*);|[' +
Object.keys(hashMap)
.join('')
// replace regexp special chars
.replace(/([()[\]{}\-.*+?^$|/\\])/g, '\\$1') + ']',
'g')
return string.replace(regex, function (ent) {
if (ent.length > 1) {
return doubleEncode ? hashMap['&'] + ent.substr(1) : ent
}
return hashMap[ent]
})
}
function getHtmlTranslationTable(table, quoteStyle) { // eslint-disable-line camelcase
// discuss at: https://locutus.io/php/get_html_translation_table/
// original by: Philip Peterson
// revised by: Kevin van Zonneveld (https://kvz.io)
// bugfixed by: noname
// bugfixed by: Alex
// bugfixed by: Marco
// bugfixed by: madipta
// bugfixed by: Brett Zamir (https://brett-zamir.me)
// bugfixed by: T.Wild
// improved by: KELAN
// improved by: Brett Zamir (https://brett-zamir.me)
// input by: Frank Forte
// input by: Ratheous
// note 1: It has been decided that we're not going to add global
// note 1: dependencies to Locutus, meaning the constants are not
// note 1: real constants, but strings instead. Integers are also supported if someone
// note 1: chooses to create the constants themselves.
// example 1: get_html_translation_table('HTML_SPECIALCHARS')
// returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
const entities = {}
const hashMap = {}
let decimal
const constMappingTable = {}
const constMappingQuoteStyle = {}
let useTable = {}
let useQuoteStyle = {}
// Translate arguments
constMappingTable[0] = 'HTML_SPECIALCHARS'
constMappingTable[1] = 'HTML_ENTITIES'
constMappingQuoteStyle[0] = 'ENT_NOQUOTES'
constMappingQuoteStyle[2] = 'ENT_COMPAT'
constMappingQuoteStyle[3] = 'ENT_QUOTES'
useTable = !isNaN(table)
? constMappingTable[table]
: table
? table.toUpperCase()
: 'HTML_SPECIALCHARS'
useQuoteStyle = !isNaN(quoteStyle)
? constMappingQuoteStyle[quoteStyle]
: quoteStyle
? quoteStyle.toUpperCase()
: 'ENT_COMPAT'
if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
throw new Error('Table: ' + useTable + ' not supported')
}
entities['38'] = '&amp;'
if (useTable === 'HTML_ENTITIES') {
entities['160'] = '&nbsp;'
entities['161'] = '&iexcl;'
entities['162'] = '&cent;'
entities['163'] = '&pound;'
entities['164'] = '&curren;'
entities['165'] = '&yen;'
entities['166'] = '&brvbar;'
entities['167'] = '&sect;'
entities['168'] = '&uml;'
entities['169'] = '&copy;'
entities['170'] = '&ordf;'
entities['171'] = '&laquo;'
entities['172'] = '&not;'
entities['173'] = '&shy;'
entities['174'] = '&reg;'
entities['175'] = '&macr;'
entities['176'] = '&deg;'
entities['177'] = '&plusmn;'
entities['178'] = '&sup2;'
entities['179'] = '&sup3;'
entities['180'] = '&acute;'
entities['181'] = '&micro;'
entities['182'] = '&para;'
entities['183'] = '&middot;'
entities['184'] = '&cedil;'
entities['185'] = '&sup1;'
entities['186'] = '&ordm;'
entities['187'] = '&raquo;'
entities['188'] = '&frac14;'
entities['189'] = '&frac12;'
entities['190'] = '&frac34;'
entities['191'] = '&iquest;'
entities['192'] = '&Agrave;'
entities['193'] = '&Aacute;'
entities['194'] = '&Acirc;'
entities['195'] = '&Atilde;'
entities['196'] = '&Auml;'
entities['197'] = '&Aring;'
entities['198'] = '&AElig;'
entities['199'] = '&Ccedil;'
entities['200'] = '&Egrave;'
entities['201'] = '&Eacute;'
entities['202'] = '&Ecirc;'
entities['203'] = '&Euml;'
entities['204'] = '&Igrave;'
entities['205'] = '&Iacute;'
entities['206'] = '&Icirc;'
entities['207'] = '&Iuml;'
entities['208'] = '&ETH;'
entities['209'] = '&Ntilde;'
entities['210'] = '&Ograve;'
entities['211'] = '&Oacute;'
entities['212'] = '&Ocirc;'
entities['213'] = '&Otilde;'
entities['214'] = '&Ouml;'
entities['215'] = '&times;'
entities['216'] = '&Oslash;'
entities['217'] = '&Ugrave;'
entities['218'] = '&Uacute;'
entities['219'] = '&Ucirc;'
entities['220'] = '&Uuml;'
entities['221'] = '&Yacute;'
entities['222'] = '&THORN;'
entities['223'] = '&szlig;'
entities['224'] = '&agrave;'
entities['225'] = '&aacute;'
entities['226'] = '&acirc;'
entities['227'] = '&atilde;'
entities['228'] = '&auml;'
entities['229'] = '&aring;'
entities['230'] = '&aelig;'
entities['231'] = '&ccedil;'
entities['232'] = '&egrave;'
entities['233'] = '&eacute;'
entities['234'] = '&ecirc;'
entities['235'] = '&euml;'
entities['236'] = '&igrave;'
entities['237'] = '&iacute;'
entities['238'] = '&icirc;'
entities['239'] = '&iuml;'
entities['240'] = '&eth;'
entities['241'] = '&ntilde;'
entities['242'] = '&ograve;'
entities['243'] = '&oacute;'
entities['244'] = '&ocirc;'
entities['245'] = '&otilde;'
entities['246'] = '&ouml;'
entities['247'] = '&divide;'
entities['248'] = '&oslash;'
entities['249'] = '&ugrave;'
entities['250'] = '&uacute;'
entities['251'] = '&ucirc;'
entities['252'] = '&uuml;'
entities['253'] = '&yacute;'
entities['254'] = '&thorn;'
entities['255'] = '&yuml;'
}
if (useQuoteStyle !== 'ENT_NOQUOTES') {
entities['34'] = '&quot;'
}
if (useQuoteStyle === 'ENT_QUOTES') {
entities['39'] = '&#39;'
}
entities['60'] = '&lt;'
entities['62'] = '&gt;'
// ascii decimals to real symbols
for (decimal in entities) {
if (entities.hasOwnProperty(decimal)) {
hashMap[String.fromCharCode(decimal)] = entities[decimal]
}
}
return hashMap
}
function urlencode (str) {
// discuss at: https://locutus.io/php/urlencode/
// original by: Philip Peterson
// improved by: Kevin van Zonneveld (https://kvz.io)
// improved by: Kevin van Zonneveld (https://kvz.io)
// improved by: Brett Zamir (https://brett-zamir.me)
// improved by: Lars Fischer
// improved by: Waldo Malqui Silva (https://fayr.us/waldo/)
// input by: AJ
// input by: travc
// input by: Brett Zamir (https://brett-zamir.me)
// input by: Ratheous
// bugfixed by: Kevin van Zonneveld (https://kvz.io)
// bugfixed by: Kevin van Zonneveld (https://kvz.io)
// bugfixed by: Joris
// reimplemented by: Brett Zamir (https://brett-zamir.me)
// reimplemented by: Brett Zamir (https://brett-zamir.me)
// note 1: This reflects PHP 5.3/6.0+ behavior
// note 1: Please be aware that this function
// note 1: expects to encode into UTF-8 encoded strings, as found on
// note 1: pages served as UTF-8
// example 1: urlencode('Kevin van Zonneveld!')
// returns 1: 'Kevin+van+Zonneveld%21'
// example 2: urlencode('https://kvz.io/')
// returns 2: 'https%3A%2F%2Fkvz.io%2F'
// example 3: urlencode('https://www.google.nl/search?q=Locutus&ie=utf-8')
// returns 3: 'https%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3DLocutus%26ie%3Dutf-8'
str = (str + '')
return encodeURIComponent(str)
.replace(/!/g, '%21')
.replace(/'/g, '%27')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29')
.replace(/\*/g, '%2A')
.replace(/~/g, '%7E')
.replace(/%20/g, '+')
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -47,4 +47,4 @@ class ###Component###Controller###Views### extends AdminController
{
return parent::getModel($name, $prefix, $config);
}###CONTROLLEREXIMPORTMETHOD######CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER######ADMIN_CUSTOM_BUTTONS_CONTROLLER_LIST###
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -34,9 +34,9 @@ class ###Component###Controller###SViews### extends AdminController
/**
* Proxy for getModel.
* @since 2.5
* @since 2.5
*/
public function getModel($name = '###SView###', $prefix = '###Component###Model', $config = array())
public function getModel($name = '###SView###', $prefix = '###Component###Model', $config = [])
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
@ -45,7 +45,7 @@ class ###Component###Controller###SViews### extends AdminController
public function dashboard()
{
$this->setRedirect(JRoute::_('index.php?option=com_###component###', false));
$this->setRedirect(Route::_('index.php?option=com_###component###', false));
return;
}###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -52,18 +52,18 @@ class ###Component###Model###View### extends AdminModel
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
* @return Table A database object
*
* @since 1.6
*/
public function getTable($type = '###view###', $prefix = '###Component###Table', $config = array())
public function getTable($type = '###view###', $prefix = '###Component###Table', $config = [])
{
// add table path for when model gets used from other component
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_###component###/tables');
// get instance of the table
return JTable::getInstance($type, $prefix, $config);
return Table::getInstance($type, $prefix, $config);
}###ADMIN_CUSTOM_BUTTONS_METHOD###
/**
* Method to get a single record.
*
@ -108,7 +108,7 @@ class ###Component###Model###View### extends AdminModel
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform'))
public function getForm($data = [], $loadData = true, $options = array('control' => 'jform'))
{
// set load data option
$options['load_data'] = $loadData;###JMODELADMIN_GETFORM###
@ -117,13 +117,13 @@ class ###Component###Model###View### extends AdminModel
/**
* Method to get the script that have to be included on the form
*
* @return string script files
* @return string script files
*/
public function getScript()
{
return 'media/com_###component###/js/###view###.js';
}
/**
* Method to test whether a record can be deleted.
*
@ -149,24 +149,24 @@ class ###Component###Model###View### extends AdminModel
protected function canEditState($record)
{###JMODELADMIN_CANEDITSTATE###
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{###JMODELADMIN_ALLOWEDIT###
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
* @param Table $table A Table object.
*
* @return void
*
@ -174,19 +174,19 @@ class ###Component###Model###View### extends AdminModel
*/
protected function prepareTable($table)
{###LICENSE_TABLE_LOCKED_CHECK###
$date = JFactory::getDate();
$user = JFactory::getUser();
$date = Factory::getDate();
$user = Factory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
@ -198,7 +198,7 @@ class ###Component###Model###View### extends AdminModel
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__###component###_###view###'));
@ -213,7 +213,7 @@ class ###Component###Model###View### extends AdminModel
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
@ -228,10 +228,10 @@ class ###Component###Model###View### extends AdminModel
*
* @since 1.6
*/
protected function loadFormData()
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_###component###.edit.###view###.data', array());
$data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
if (empty($data))
{
@ -242,7 +242,7 @@ class ###Component###Model###View### extends AdminModel
return $data;
}###VALIDATIONFIX######UNIQUEFIELDS###
/**
* Method to delete one or more records.
*
@ -258,7 +258,7 @@ class ###Component###Model###View### extends AdminModel
{
return false;
}###JMODELADMIN_AFTER_DELETE###
return true;
}
@ -278,10 +278,10 @@ class ###Component###Model###View### extends AdminModel
{
return false;
}###JMODELADMIN_AFTER_PUBLISH###
return true;
}
}
/**
* Method to perform batch operations on an item or a set of items.
*
@ -307,30 +307,30 @@ class ###Component###Model###View### extends AdminModel
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
$this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ###Component###Helper::getActions('###view###');
$this->batchSet = true;
$this->user = Factory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new UCMType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ###Component###Helper::getActions('###view###');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$type = new UCMType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
@ -367,8 +367,7 @@ class ###Component###Model###View### extends AdminModel
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -377,7 +376,7 @@ class ###Component###Model###View### extends AdminModel
return true;
}###MODEL_BATCH_COPY######MODEL_BATCH_MOVE###
/**
* Method to save the form data.
*
@ -389,34 +388,34 @@ class ###Component###Model###View### extends AdminModel
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
$input = Factory::getApplication()->input;
$filter = InputFilter::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata = new Registry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}###CHECKBOX_SAVE######METHOD_ITEM_SAVE###
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params = new Registry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}###TITLEALIASFIX###
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a unique value.
*
@ -429,7 +428,6 @@ class ###Component###Model###View### extends AdminModel
*/
protected function generateUnique($field,$value)
{
// set field value unique
$table = $this->getTable();

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -52,18 +52,18 @@ class ###Component###Model###View### extends AdminModel
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
* @return Table A database object
*
* @since 1.6
*/
public function getTable($type = '###view###', $prefix = '###Component###Table', $config = array())
public function getTable($type = '###view###', $prefix = '###Component###Table', $config = [])
{
// add table path for when model gets used from other component
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_###component###/tables');
// get instance of the table
return JTable::getInstance($type, $prefix, $config);
return Table::getInstance($type, $prefix, $config);
}###ADMIN_CUSTOM_BUTTONS_METHOD###
/**
* Method to get a single record.
*
@ -108,7 +108,7 @@ class ###Component###Model###View### extends AdminModel
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform'))
public function getForm($data = [], $loadData = true, $options = array('control' => 'jform'))
{
// set load data option
$options['load_data'] = $loadData;###JMODELADMIN_GETFORM###
@ -117,13 +117,13 @@ class ###Component###Model###View### extends AdminModel
/**
* Method to get the script that have to be included on the form
*
* @return string script files
* @return string script files
*/
public function getScript()
{
return 'media/com_###component###/js/###view###.js';
}
/**
* Method to test whether a record can be deleted.
*
@ -149,24 +149,24 @@ class ###Component###Model###View### extends AdminModel
protected function canEditState($record)
{###JMODELADMIN_CANEDITSTATE###
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{###JMODELADMIN_ALLOWEDIT###
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
* @param Table $table A Table object.
*
* @return void
*
@ -174,19 +174,19 @@ class ###Component###Model###View### extends AdminModel
*/
protected function prepareTable($table)
{###LICENSE_TABLE_LOCKED_CHECK###
$date = JFactory::getDate();
$user = JFactory::getUser();
$date = Factory::getDate();
$user = Factory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
@ -198,7 +198,7 @@ class ###Component###Model###View### extends AdminModel
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__###component###_###view###'));
@ -213,7 +213,7 @@ class ###Component###Model###View### extends AdminModel
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
@ -228,10 +228,10 @@ class ###Component###Model###View### extends AdminModel
*
* @since 1.6
*/
protected function loadFormData()
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_###component###.edit.###view###.data', array());
$data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
if (empty($data))
{
@ -242,7 +242,7 @@ class ###Component###Model###View### extends AdminModel
return $data;
}###VALIDATIONFIX######UNIQUEFIELDS###
/**
* Method to delete one or more records.
*
@ -258,7 +258,7 @@ class ###Component###Model###View### extends AdminModel
{
return false;
}###JMODELADMIN_AFTER_DELETE###
return true;
}
@ -278,10 +278,10 @@ class ###Component###Model###View### extends AdminModel
{
return false;
}###JMODELADMIN_AFTER_PUBLISH###
return true;
}
}
/**
* Method to perform batch operations on an item or a set of items.
*
@ -307,30 +307,30 @@ class ###Component###Model###View### extends AdminModel
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
$this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ###Component###Helper::getActions('###view###');
$this->batchSet = true;
$this->user = Factory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new UCMType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ###Component###Helper::getActions('###view###');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$type = new UCMType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
@ -367,8 +367,7 @@ class ###Component###Model###View### extends AdminModel
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -377,7 +376,7 @@ class ###Component###Model###View### extends AdminModel
return true;
}###MODEL_BATCH_COPY######MODEL_BATCH_MOVE###
/**
* Method to save the form data.
*
@ -389,34 +388,34 @@ class ###Component###Model###View### extends AdminModel
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
$input = Factory::getApplication()->input;
$filter = InputFilter::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata = new Registry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}###CHECKBOX_SAVE######METHOD_ITEM_SAVE###
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params = new Registry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}###TITLEALIASFIX###
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a unique value.
*
@ -427,9 +426,8 @@ class ###Component###Model###View### extends AdminModel
*
* @since 3.0
*/
protected function generateUnique($field,$value)
protected function generateUnique($field, $value)
{
// set field value unique
$table = $this->getTable();

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -19,6 +19,8 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/**
* General Controller of ###Component### component
@ -34,7 +36,7 @@ class ###Component###Controller extends BaseController
*
* @since 3.0
*/
public function __construct($config = array())
public function __construct($config = [])
{
// set the default view
$config['default_view'] = '###DASHBOARDVIEW###';
@ -50,38 +52,38 @@ class ###Component###Controller extends BaseController
function display($cachable = false, $urlparams = false)
{
// set default view if not set
$view = $this->input->getCmd('view', '###DASHBOARDVIEW###');
$data = $this->getViewRelation($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
$view = $this->input->getCmd('view', '###DASHBOARDVIEW###');
$data = $this->getViewRelation($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
// Check for edit form.
if(###Component###Helper::checkArray($data))
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($data))
{
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_###component###.edit.'.$data['view'], $id))
{
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error');
// check if item was opend from other then its own list view
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
// set redirect
if ($refid > 0 && ###Component###Helper::checkString($ref))
if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to item of ref
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
}
elseif (###Component###Helper::checkString($ref))
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to ref
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view='.(string)$ref, false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref, false));
}
else
{
// normal redirect back to the list view
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view='.$data['views'], false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.$data['views'], false));
}
return false;
@ -94,7 +96,7 @@ class ###Component###Controller extends BaseController
protected function getViewRelation($view)
{
// check the we have a value
if (###Component###Helper::checkString($view))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($view))
{
// the view relationships
$views = array(###VIEWARRAY###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
@ -29,9 +31,9 @@ class ###Component###ControllerAjax extends BaseController
{
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
Factory::getDocument()->setMimeEncoding( 'application/json' );
// get the application
$app = JFactory::getApplication();
$app = Factory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks ###REGISTER_AJAX_TASK###
@ -40,16 +42,16 @@ class ###Component###ControllerAjax extends BaseController
public function ajax()
{
// get the user for later use
$user = JFactory::getUser();
$user = Factory::getUser();
// get the input values
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
@ -29,9 +31,9 @@ class ###Component###ControllerAjax extends BaseController
{
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
Factory::getDocument()->setMimeEncoding( 'application/json' );
// get the application
$app = JFactory::getApplication();
$app = Factory::getApplication();
$app->setHeader('Content-Disposition','attachment;filename="getajax.json"');
$app->setHeader('Access-Control-Allow-Origin', '*');
// load the tasks ###REGISTER_SITE_AJAX_TASK###
@ -40,16 +42,16 @@ class ###Component###ControllerAjax extends BaseController
public function ajax()
{
// get the user for later use
$user = JFactory::getUser();
$user = Factory::getUser();
// get the input values
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
// check if we should return raw
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
// get the task
@ -71,7 +73,7 @@ class ###Component###ControllerAjax extends BaseController
echo json_encode(false);
}
else
{
{
echo "(".json_encode(false).");";
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
@ -34,12 +37,12 @@ class ###Component###ControllerHelp extends BaseController
public function help()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && $token == $call_token)
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
{
$task = $this->getTask();
switch($task){
@ -67,7 +70,7 @@ class ###Component###ControllerHelp extends BaseController
break;
}
}
else
else
{
// stop execution gracefully
jexit();
@ -76,8 +79,8 @@ class ###Component###ControllerHelp extends BaseController
protected function getHelpDocumentText($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__###component###_help_document AS a');
$query->where('a.id = '.(int) $id);
@ -86,21 +89,21 @@ class ###Component###ControllerHelp extends BaseController
$db->execute();
if($db->getNumRows())
{
$text = array();
$text = [];
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.JURI::root().'images';
$images["src='images"] = "src='".JURI::root()."images";
$images['src="/images'] = 'src="'.JURI::root().'images';
$images["src='/images"] = "src='".JURI::root()."images";
$images['src="images'] = 'src="'.Uri::root().'images';
$images["src='images"] = "src='".Uri::root()."images";
$images['src="/images'] = 'src="'.Uri::root().'images';
$images["src='/images"] = "src='".Uri::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = '<link type="text/css" href="'.Uri::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
/**
@ -34,12 +37,12 @@ class ###Component###ControllerHelp extends BaseController
public function help()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($token == $call_token)
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
{
$task = $this->getTask();
switch($task){
@ -76,8 +79,8 @@ class ###Component###ControllerHelp extends BaseController
protected function getHelpDocumentText($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__###component###_help_document AS a');
$query->where('a.id = '.(int) $id);
@ -87,21 +90,21 @@ class ###Component###ControllerHelp extends BaseController
$db->execute();
if($db->getNumRows())
{
$text = array();
$text = [];
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.JURI::root().'images';
$images["src='images"] = "src='".JURI::root()."images";
$images['src="/images'] = 'src="'.JURI::root().'images';
$images["src='/images"] = "src='".JURI::root()."images";
$images['src="images'] = 'src="'.Uri::root().'images';
$images["src='images"] = "src='".Uri::root()."images";
$images['src="/images'] = 'src="'.Uri::root().'images';
$images["src='/images"] = "src='".Uri::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.JURI::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.JURI::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = '<link type="text/css" href="'.Uri::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,8 +17,11 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
/**
* ###Component### Component Base Controller
@ -37,51 +40,51 @@ class ###Component###Controller extends BaseController
function display($cachable = false, $urlparams = false)
{
// set default view if not set
$view = $this->input->getCmd('view', '###SITE_DEFAULT_VIEW###');
$view = $this->input->getCmd('view', '###SITE_DEFAULT_VIEW###');
$this->input->set('view', $view);
$isEdit = $this->checkEditView($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
// $cachable = true; (TODO) working on a fix [gh-238](https://github.com/vdm-io/Joomla-Component-Builder/issues/238)
$isEdit = $this->checkEditView($view);
$layout = $this->input->get('layout', null, 'WORD');
$id = $this->input->getInt('id');
// $cachable = true; (TODO) working on a fix [gh-238](https://github.com/vdm-io/Joomla-Component-Builder/issues/238)
// insure that the view is not cashable if edit view or if user is logged in
$user = JFactory::getUser();
$user = Factory::getUser();
if ($user->get('id') || $isEdit)
{
$cachable = false;
}
// Check for edit form.
if($isEdit)
{
if ($layout == 'edit' && !$this->checkEditId('com_###component###.edit.'.$view, $id))
{
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error');
// check if item was opend from other then its own list view
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
$ref = $this->input->getCmd('ref', 0);
$refid = $this->input->getInt('refid', 0);
// set redirect
if ($refid > 0 && ###Component###Helper::checkString($ref))
if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to item of ref
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
}
elseif (###Component###Helper::checkString($ref))
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to ref
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view='.(string)$ref, false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref, false));
}
else
{
// normal redirect back to the list default site view
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false));
}
return false;
}
}
// we may need to make this more dynamic in the future. (TODO)
$safeurlparams = array(
'catid' => 'INT',
@ -102,9 +105,9 @@ class ###Component###Controller extends BaseController
'Itemid' => 'INT');
// should these not merge?
if (###Component###Helper::checkArray($urlparams))
if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($urlparams))
{
$safeurlparams = ###Component###Helper::mergeArrays(array($urlparams, $safeurlparams));
$safeurlparams = Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::merge(array($urlparams, $safeurlparams));
}
return parent::display($cachable, $safeurlparams);
@ -112,7 +115,7 @@ class ###Component###Controller extends BaseController
protected function checkEditView($view)
{
if (###Component###Helper::checkString($view))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($view))
{
$views = array(###SITE_EDIT_VIEW_ARRAY###
);

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -31,7 +31,7 @@ class ###Component###Controller###SView### extends BaseController
public function dashboard()
{
$this->setRedirect(JRoute::_('index.php?option=com_###component###', false));
$this->setRedirect(Route::_('index.php?option=com_###component###', false));
return;
}###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,8 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
###IMPORT_CONTROLLER_HEADER###
/**
* ###Component### Import Base Controller
@ -33,21 +32,21 @@ class ###Component###ControllerImport extends BaseController
public function import()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$model = $this->getModel('import');
if ($model->import())
{
$cache = JFactory::getCache('mod_menu');
$cache = Factory::getCache('mod_menu');
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits
}
$app = JFactory::getApplication();
$app = Factory::getApplication();
$redirect_url = $app->getUserState('com_###component###.redirect_url');
if (empty($redirect_url))
{
$redirect_url = JRoute::_('index.php?option=com_###component###&view=import', false);
$redirect_url = Route::_('index.php?option=com_###component###&view=import', false);
}
else
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,8 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Utilities\ArrayHelper;
###IMPORT_CUSTOM_CONTROLLER_HEADER###
/**
* ###Component### ###View### Base Controller
@ -33,21 +32,21 @@ class ###Component###Controller###View### extends BaseController
public function import()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$model = $this->getModel('###View###');
if ($model->import())
{
$cache = JFactory::getCache('mod_menu');
$cache = Factory::getCache('mod_menu');
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits
}
$app = JFactory::getApplication();
$app = Factory::getApplication();
$redirect_url = $app->getUserState('com_###component###.redirect_url');
if (empty($redirect_url))
{
$redirect_url = JRoute::_('index.php?option=com_###component###&view=###view###', false);
$redirect_url = Route::_('index.php?option=com_###component###&view=###view###', false);
}
else
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,13 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
###IMPORT_MODEL_HEADER###
/**
/***
* ###Component### Import Base Database Model
*/
class ###Component###ModelImport extends BaseDatabaseModel
@ -31,8 +27,8 @@ class ###Component###ModelImport extends BaseDatabaseModel
// set uploading values
protected $use_streams = false;
protected $allow_unsafe = false;
protected $safeFileOptions = array();
protected $safeFileOptions = [];
/**
* @var object JTable object
*/
@ -49,13 +45,13 @@ class ###Component###ModelImport extends BaseDatabaseModel
* @var string
*/
protected $_context = 'com_###component###.import';
/**
* Import Settings
*/
protected $getType = NULL;
protected $dataType = NULL;
protected $getType = NULL;
protected $dataType = NULL;
/**
* Method to auto-populate the model state.
*
@ -66,7 +62,7 @@ class ###Component###ModelImport extends BaseDatabaseModel
*/
protected function populateState()
{
$app = JFactory::getApplication('administrator');
$app = Factory::getApplication('administrator');
$this->setState('message', $app->getUserState('com_###component###.message'));
$app->setUserState('com_###component###.message', '');
@ -86,14 +82,14 @@ class ###Component###ModelImport extends BaseDatabaseModel
public function import()
{
$this->setState('action', 'import');
$app = JFactory::getApplication();
$session = JFactory::getSession();
$app = Factory::getApplication();
$session = Factory::getSession();
$package = null;
$continue = false;
// get import type
$this->getType = $app->input->getString('gettype', NULL);
// get import type
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
if ($package === null)
{
@ -114,9 +110,9 @@ class ###Component###ModelImport extends BaseDatabaseModel
break;
case 'continue':
$continue = true;
$package = $session->get('package', null);
$package = json_decode($package, true);
$continue = true;
$package = $session->get('package', null);
$package = json_decode($package, true);
// clear session
$session->clear('package');
$session->clear('dataType');
@ -124,7 +120,7 @@ class ###Component###ModelImport extends BaseDatabaseModel
break;
default:
$app->setUserState('com_###component###.message', JText::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));
$app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));
return false;
break;
@ -138,10 +134,10 @@ class ###Component###ModelImport extends BaseDatabaseModel
$this->remove($package['packagename']);
}
$app->setUserState('com_###component###.message', JText::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));
$app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));
return false;
}
// first link data to table headers
if(!$continue){
$package = json_encode($package);
@ -150,13 +146,13 @@ class ###Component###ModelImport extends BaseDatabaseModel
$session->set('hasPackage', true);
return true;
}
// set the data
$headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false), true);
if (!$this->setData($package,$this->dataType,$headerList))
{
// There was an error importing the package
$msg = JText::_('COM_###COMPONENT###_IMPORT_ERROR');
$msg = Text::_('COM_###COMPONENT###_IMPORT_ERROR');
$back = $session->get('backto_VDM_IMPORT', NULL);
if ($back)
{
@ -168,12 +164,12 @@ class ###Component###ModelImport extends BaseDatabaseModel
else
{
// Package imported sucessfully
$msg = JText::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']);
$msg = Text::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']);
$back = $session->get('backto_VDM_IMPORT', NULL);
if ($back)
{
$app->setUserState('com_###component###.redirect_url', 'index.php?option=com_###component###&view='.$back);
$session->clear('backto_VDM_IMPORT');
$app->setUserState('com_###component###.redirect_url', 'index.php?option=com_###component###&view='.$back);
$session->clear('backto_VDM_IMPORT');
}
$result = true;
}
@ -184,7 +180,7 @@ class ###Component###ModelImport extends BaseDatabaseModel
// remove file after import
$this->remove($package['packagename']);
$session->clear($this->getType.'_VDM_IMPORTHEADERS');
return $result;
}
@ -194,48 +190,47 @@ class ###Component###ModelImport extends BaseDatabaseModel
* @return spreadsheet definition or false on failure
*/
protected function _getPackageFromUpload()
{
{
// Get the uploaded file information
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
$userfile = $input->files->get('import_package', null, 'raw');
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
// Build the appropriate paths
$config = JFactory::getConfig();
$config = Factory::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
{
$session = JFactory::getSession();
$session = Factory::getSession();
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
@ -257,16 +252,16 @@ class ###Component###ModelImport extends BaseDatabaseModel
*/
protected function _getPackageFromFolder()
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Get the path to the package to import
$p_dir = $input->getString('import_directory');
$p_dir = JPath::clean($p_dir);
$p_dir = Path::clean($p_dir);
// Did you give us a valid path?
if (!file_exists($p_dir))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -276,17 +271,17 @@ class ###Component###ModelImport extends BaseDatabaseModel
// Did you give us a valid package?
if (!$type)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
if(!$this->checkExtension($p_dir))
{
// set error message
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$package['packagename'] = null;
$package['dir'] = $p_dir;
$package['type'] = $type;
@ -302,26 +297,26 @@ class ###Component###ModelImport extends BaseDatabaseModel
*/
protected function _getPackageFromUrl()
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Get the URL of the package to import
$url = $input->getString('import_url');
// Did you give us a URL?
if (!$url)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
// Download the package at the URL given
$p_file = JInstallerHelper::downloadPackage($url);
$p_file = InstallerHelper::downloadPackage($url);
// Was the package downloaded?
if (!$p_file)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -330,7 +325,7 @@ class ###Component###ModelImport extends BaseDatabaseModel
return $package;
}
/**
* Check a file and verifies it as a spreadsheet file
* Supports .csv .xlsx .xls and .ods
@ -342,29 +337,29 @@ class ###Component###ModelImport extends BaseDatabaseModel
*/
protected function check($archivename)
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
// Clean the name
$archivename = JPath::clean($archivename);
$archivename = Path::clean($archivename);
// check the extention
if(!$this->checkExtension($archivename))
{
// Cleanup the import files
$this->remove($archivename);
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$config = JFactory::getConfig();
$config = Factory::getConfig();
// set Package Name
$check['packagename'] = $archivename;
// set directory
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
// set type
$check['type'] = $this->getType;
return $check;
}###IMPORT_EXT_METHOD###
@ -379,8 +374,8 @@ class ###Component###ModelImport extends BaseDatabaseModel
protected function remove($package)
{
jimport('joomla.filesystem.file');
$config = JFactory::getConfig();
$config = Factory::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
// Is the package file a valid file?
@ -388,23 +383,23 @@ class ###Component###ModelImport extends BaseDatabaseModel
{
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
elseif (is_file(Path::clean($package)))
{
// It might also be just a base filename
File::delete(JPath::clean($package));
File::delete(Path::clean($package));
}
}###IMPORT_SETDATA_METHOD######IMPORT_SAVE_METHOD###
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias
if (JFactory::getConfig()->get('unicodeslugs') == 1)
if (Factory::getConfig()->get('unicodeslugs') == 1)
{
$alias = JFilterOutput::stringURLUnicodeSlug($name);
$alias = OutputFilter::stringURLUnicodeSlug($name);
}
else
{
$alias = JFilterOutput::stringURLSafe($name);
$alias = OutputFilter::stringURLSafe($name);
}
// must be a uniqe alias
if ($type)
@ -413,7 +408,7 @@ class ###Component###ModelImport extends BaseDatabaseModel
}
return $alias;
}
/**
* Method to generate a uniqe value.
*
@ -428,16 +423,16 @@ class ###Component###ModelImport extends BaseDatabaseModel
// insure the filed is always uniqe
while (isset($this->uniqeValueArray[$type][$field][$value]))
{
$value = JString::increment($value, 'dash');
$value = StringHelper::increment($value, 'dash');
}
$this->uniqeValueArray[$type][$field][$value] = $value;
return $value;
}
protected function getAliasesUsed($table)
{
// Get a db connection.
$db = JFactory::getDbo();
$db = Factory::getDbo();
// first we check if there is a alias column
$columns = $db->getTableColumns('#__###component###_'.$table);
if(isset($columns['alias'])){

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,11 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
###IMPORT_CUSTOM_MODEL_HEADER###
/**
* ###Component### ###View### Base Database Model
@ -31,8 +27,8 @@ class ###Component###Model###View### extends BaseDatabaseModel
// set uploading values
protected $use_streams = false;
protected $allow_unsafe = false;
protected $safeFileOptions = array();
protected $safeFileOptions = [];
/**
* @var object JTable object
*/
@ -49,13 +45,13 @@ class ###Component###Model###View### extends BaseDatabaseModel
* @var string
*/
protected $_context = 'com_###component###.###view###';
/**
* Import Settings
*/
protected $getType = NULL;
protected $dataType = NULL;
/**
* Method to auto-populate the model state.
*
@ -66,7 +62,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
*/
protected function populateState()
{
$app = JFactory::getApplication('administrator');
$app = Factory::getApplication('administrator');
$this->setState('message', $app->getUserState('com_###component###.message'));
$app->setUserState('com_###component###.message', '');
@ -76,7 +72,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
$this->setState('import.directory', $path);
parent::populateState();
}
###IMPORT_METHOD_CUSTOM###
###IMPORT_METHOD_CUSTOM###
/**
* Works out an importation spreadsheet from a HTTP upload
@ -84,37 +80,37 @@ class ###Component###Model###View### extends BaseDatabaseModel
* @return spreadsheet definition or false on failure
*/
protected function _getPackageFromUpload()
{
{
// Get the uploaded file information
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
$userfile = $input->files->get('import_package', null, 'raw');
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
// Build the appropriate paths
$config = JFactory::getConfig();
$config = Factory::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
@ -124,7 +120,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
// Was the package downloaded?
if (!$p_file)
{
$session = JFactory::getSession();
$session = Factory::getSession();
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
@ -146,16 +142,16 @@ class ###Component###Model###View### extends BaseDatabaseModel
*/
protected function _getPackageFromFolder()
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Get the path to the package to import
$p_dir = $input->getString('import_directory');
$p_dir = JPath::clean($p_dir);
$p_dir = Path::clean($p_dir);
// Did you give us a valid path?
if (!file_exists($p_dir))
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -165,17 +161,17 @@ class ###Component###Model###View### extends BaseDatabaseModel
// Did you give us a valid package?
if (!$type)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
if(!$this->checkExtension($p_dir))
{
// set error message
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$package['packagename'] = null;
$package['dir'] = $p_dir;
$package['type'] = $type;
@ -191,7 +187,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
*/
protected function _getPackageFromUrl()
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
$input = $app->input;
// Get the URL of the package to import
@ -200,17 +196,17 @@ class ###Component###Model###View### extends BaseDatabaseModel
// Did you give us a URL?
if (!$url)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
// Download the package at the URL given
$p_file = JInstallerHelper::downloadPackage($url);
$p_file = InstallerHelper::downloadPackage($url);
// Was the package downloaded?
if (!$p_file)
{
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -219,7 +215,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
return $package;
}
/**
* Check a file and verifies it as a spreadsheet file
* Supports .csv .xlsx .xls and .ods
@ -231,29 +227,29 @@ class ###Component###Model###View### extends BaseDatabaseModel
*/
protected function check($archivename)
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
// Clean the name
$archivename = JPath::clean($archivename);
$archivename = Path::clean($archivename);
// check the extention
if(!$this->checkExtension($archivename))
{
// Cleanup the import files
$this->remove($archivename);
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$config = JFactory::getConfig();
$config = Factory::getConfig();
// set Package Name
$check['packagename'] = $archivename;
// set directory
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
// set type
$check['type'] = $this->getType;
return $check;
}
###IMPORT_EXT_METHOD###
@ -268,9 +264,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
*/
protected function remove($package)
{
jimport('joomla.filesystem.file');
$config = JFactory::getConfig();
$config = Factory::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
// Is the package file a valid file?
@ -278,10 +272,10 @@ class ###Component###Model###View### extends BaseDatabaseModel
{
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
elseif (is_file(Path::clean($package)))
{
// It might also be just a base filename
File::delete(JPath::clean($package));
File::delete(Path::clean($package));
}
}
###IMPORT_SETDATA_METHOD###
@ -290,13 +284,13 @@ class ###Component###Model###View### extends BaseDatabaseModel
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias
if (JFactory::getConfig()->get('unicodeslugs') == 1)
if (Factory::getConfig()->get('unicodeslugs') == 1)
{
$alias = JFilterOutput::stringURLUnicodeSlug($name);
$alias = OutputFilter::stringURLUnicodeSlug($name);
}
else
{
$alias = JFilterOutput::stringURLSafe($name);
$alias = OutputFilter::stringURLSafe($name);
}
// must be a uniqe alias
if ($type)
@ -305,7 +299,7 @@ class ###Component###Model###View### extends BaseDatabaseModel
}
return $alias;
}
/**
* Method to generate a uniqe value.
*
@ -320,16 +314,16 @@ class ###Component###Model###View### extends BaseDatabaseModel
// insure the filed is always uniqe
while (isset($this->uniqeValueArray[$type][$field][$value]))
{
$value = JString::increment($value, 'dash');
$value = StringHelper::increment($value, 'dash');
}
$this->uniqeValueArray[$type][$field][$value] = $value;
return $value;
}
protected function getAliasesUsed($table)
{
// Get a db connection.
$db = JFactory::getDbo();
$db = Factory::getDbo();
// first we check if there is a alias column
$columns = $db->getTableColumns('#__###component###_'.$table);
if(isset($columns['alias'])){

View File

@ -0,0 +1 @@
###CHANGELOG###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -22,7 +22,7 @@ defined('_JEXEC') or die('Restricted access');
/**
* ###Component### View class
*/
class ###Component###View###Component### extends JViewLegacy
class ###Component###View###Component### extends HtmlView
{
/**
* View display method
@ -31,15 +31,15 @@ class ###Component###View###Component### extends JViewLegacy
function display($tpl = null)
{
// Assign data to the view
$this->icons = $this->get('Icons');
$this->contributors = ###Component###Helper::getContributors();###DASH_GET_CUSTOM_DATA###
$this->icons = $this->get('Icons');
$this->contributors = ###Component###Helper::getContributors();###DASH_GET_CUSTOM_DATA###
// get the manifest details of the component
$this->manifest = ###Component###Helper::manifest();
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -59,18 +59,18 @@ class ###Component###View###Component### extends JViewLegacy
protected function addToolBar()
{
$canDo = ###Component###Helper::getActions('###component###');
JToolBarHelper::title(JText::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
ToolbarHelper::title(Text::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###component###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
if ($canDo->get('core.admin') || $canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}
}
@ -81,15 +81,17 @@ class ###Component###View###Component### extends JViewLegacy
*/
protected function setDocument()
{
$document = JFactory::getDocument();
// add dashboard style sheets
$document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/dashboard.css");
if (!isset($this->document))
{
$this->document = Factory::getDocument();
}
// set page title
$document->setTitle(JText::_('COM_###COMPONENT###_DASHBOARD'));
$this->document->setTitle(Text::_('COM_###COMPONENT###_DASHBOARD'));
// add manifest to page JavaScript
$document->addScriptDeclaration("var manifest = jQuery.parseJSON('" . json_encode($this->manifest) . "');", "text/javascript");
$this->document->addScriptDeclaration("var manifest = jQuery.parseJSON('" . json_encode($this->manifest) . "');", "text/javascript");
// add dashboard style sheets
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/dashboard.css", ['version' => 'auto']);
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -40,13 +40,13 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = '###Views###'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -55,7 +55,7 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{###JCONTROLLERFORM_ALLOWADD###
}
@ -69,7 +69,7 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{###JCONTROLLERFORM_ALLOWEDIT###
}
@ -94,12 +94,12 @@ class ###Component###Controller###View### extends FormController
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -116,13 +116,13 @@ class ###Component###Controller###View### extends FormController
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('###View###', '', array());
$model = $this->getModel('###View###', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -147,13 +147,13 @@ class ###Component###Controller###View### extends FormController
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
@ -164,7 +164,7 @@ class ###Component###Controller###View### extends FormController
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -175,7 +175,7 @@ class ###Component###Controller###View### extends FormController
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -201,7 +201,7 @@ class ###Component###Controller###View### extends FormController
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -219,29 +219,29 @@ class ###Component###Controller###View### extends FormController
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -253,15 +253,14 @@ class ###Component###Controller###View### extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{###POSTSAVEHOOK###
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -33,7 +33,7 @@ class ###Component###Controller###SView### extends FormController
*/
protected $task;
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view.
parent::__construct($config);
@ -51,13 +51,13 @@ class ###Component###Controller###SView### extends FormController
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{
// to insure no other tampering
return false;
}
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -66,7 +66,7 @@ class ###Component###Controller###SView### extends FormController
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{
// to insure no other tampering
return false;
@ -101,7 +101,7 @@ class ###Component###Controller###SView### extends FormController
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(JModelLegacy $model, $validData = [])
{
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -40,13 +40,13 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
public function __construct($config = array())
public function __construct($config = [])
{
$this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view.
parent::__construct($config);
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
@ -55,7 +55,7 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
protected function allowAdd($data = array())
protected function allowAdd($data = [])
{###JCONTROLLERFORM_ALLOWADD###
}
@ -69,7 +69,7 @@ class ###Component###Controller###View### extends FormController
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
protected function allowEdit($data = [], $key = 'id')
{###JCONTROLLERFORM_ALLOWEDIT###
}
@ -94,12 +94,12 @@ class ###Component###Controller###View### extends FormController
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
$append = '&ref='. (string) $ref . $append;
}
return $append;
@ -116,13 +116,13 @@ class ###Component###Controller###View### extends FormController
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('###View###', '', array());
$model = $this->getModel('###View###', '', []);
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -147,35 +147,35 @@ class ###Component###Controller###View### extends FormController
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -201,7 +201,7 @@ class ###Component###Controller###View### extends FormController
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -219,29 +219,29 @@ class ###Component###Controller###View### extends FormController
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -253,14 +253,14 @@ class ###Component###Controller###View### extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{###POSTSAVEHOOK###
}

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -28,7 +28,7 @@ class ###Component######View###Categories extends JCategories
* @param array $options Array of options
*
*/
public function __construct($options = array())
public function __construct($options = [])
{
$options['table'] = '#__###component###_###view###';
$options['extension'] = 'com_###component###.###view###';

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,11 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Mail\Mail;
use Joomla\Registry\Registry;
/**
* ###Component### component email helper
*/
@ -27,28 +32,28 @@ abstract class ###Component###Email
*
* @var activeRecipient (array)
*/
public static $active = array();
public static $active = [];
/**
* Configuraiton object
*
* @var JConfig
* @var Registry
*/
public static $config = null;
public static ?Registry $config = null;
/**
* Mailer object
*
* @var JMail
* @var Mail
*/
public static $mailer = null;
public static ?Mail $mailer = null;
/**
* Custom Headers
*
* @var array
*/
protected static $header = array();
protected static array $header = [];
/**
* Get a configuration object
@ -58,7 +63,7 @@ abstract class ###Component###Email
{
if (!self::$config)
{
self::$config = JComponentHelper::getParams('com_###component###');
self::$config = ComponentHelper::getParams('com_###component###');
}
return self::$config;
@ -97,7 +102,7 @@ abstract class ###Component###Email
* @static
* @access public
*/
public static function validateAddress($address, $patternselect = null)
public static function validateAddress($address, $patternselect = null): bool
{
return self::getMailerInstance()->validateAddress($address, $patternselect);
}
@ -105,13 +110,13 @@ abstract class ###Component###Email
/**
* Get a mailer object.
*
* Returns the global {@link JMail} object, only creating it if it doesn't already exist.
* Returns the global {@link Mail} object, only creating it if it doesn't already exist.
*
* @return JMail object
* @return Mail object
*
* @see JMail
* @see Mail
*/
public static function getMailer()
public static function getMailer(): Mail
{
if (!self::$mailer)
{
@ -126,58 +131,58 @@ abstract class ###Component###Email
/**
* Create a mailer object
*
* @return JMail object
* @return Mail object
*
* @see JMail
* @see Mail
*/
protected static function createMailer()
protected static function createMailer(): Mail
{
// set component params
$conf = self::getConfig();
// now load the mailer
$mailer = $conf->get('mailer', 'global');
// Create a JMail object
$mail = JMail::getInstance();
// Create a Mail object
$mail = Mail::getInstance();
// check if set to global
if ('global' == $mailer)
{
// get the global details
$globalConf = JFactory::getConfig();
$mailer = $globalConf->get('mailer');
$smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1;
$smtpuser = $globalConf->get('smtpuser');
$smtppass = $globalConf->get('smtppass');
$smtphost = $globalConf->get('smtphost');
$smtpsecure = $globalConf->get('smtpsecure');
$smtpport = $globalConf->get('smtpport');
$sendmail = $globalConf->get('sendmail');
$mailfrom = $globalConf->get('mailfrom');
$fromname = $globalConf->get('fromname');
$replyto = $globalConf->get('replyto');
$replytoname = $globalConf->get('replytoname');
$globalConf = Factory::getConfig();
$mailer = $globalConf->get('mailer');
$smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1;
$smtpuser = $globalConf->get('smtpuser');
$smtppass = $globalConf->get('smtppass');
$smtphost = $globalConf->get('smtphost');
$smtpsecure = $globalConf->get('smtpsecure');
$smtpport = $globalConf->get('smtpport');
$sendmail = $globalConf->get('sendmail');
$mailfrom = $globalConf->get('mailfrom');
$fromname = $globalConf->get('fromname');
$replyto = $globalConf->get('replyto');
$replytoname = $globalConf->get('replytoname');
}
else
{
$smtpauth = ($conf->get('smtpauth') == 0) ? null : 1;
$smtpuser = $conf->get('smtpuser');
$smtppass = $conf->get('smtppass');
$smtphost = $conf->get('smtphost');
$smtpsecure = $conf->get('smtpsecure');
$smtpport = $conf->get('smtpport');
$sendmail = $conf->get('sendmail');
$mailfrom = $conf->get('emailfrom');
$fromname = $conf->get('fromname');
$replyto = $conf->get('replyto');
$replytoname = $conf->get('replytoname');
$smtpauth = ($conf->get('smtpauth') == 0) ? null : 1;
$smtpuser = $conf->get('smtpuser');
$smtppass = $conf->get('smtppass');
$smtphost = $conf->get('smtphost');
$smtpsecure = $conf->get('smtpsecure');
$smtpport = $conf->get('smtpport');
$sendmail = $conf->get('sendmail');
$mailfrom = $conf->get('emailfrom');
$fromname = $conf->get('fromname');
$replyto = $conf->get('replyto');
$replytoname = $conf->get('replytoname');
}
// Set global sender
$mail->setSender(array($mailfrom, $fromname));
// set the global reply-to if found
if ($replyto && $replytoname)
{
@ -226,25 +231,25 @@ abstract class ###Component###Email
*/
public static function send($recipient, $subject, $body, $textonly, $mode = 0, $bounce_email = null, $idsession = null, $mailreply = null, $replyname = null , $mailfrom = null, $fromname = null, $cc = null, $bcc = null, $attachment = null, $embeded = null , $embeds = null)
{
// Get a JMail instance
// Get a Mail instance
$mail = self::getMailer();
// set component params
$conf = self::getConfig();
// set if we have override
if ($mailfrom && $fromname)
{
$mail->setSender(array($mailfrom, $fromname));
}
// load the bounce email as sender if set
if (!is_null($bounce_email))
{
{
$mail->Sender = $bounce_email;
}
// Add tag to email to identify it
// Add tag to email to identify it
if (!is_null($idsession))
{
$mail->addCustomHeader('X-VDMmethodID:'.$idsession);
@ -262,7 +267,7 @@ abstract class ###Component###Email
// set the subject & Body
$mail->setSubject($subject);
$mail->setBody($body);
// Are we sending the email as HTML?
if ($mode)
{
@ -273,7 +278,7 @@ abstract class ###Component###Email
//embed images
if ($embeded)
{
if(###Component###Helper::checkArray($embeds))
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($embeds))
{
foreach($embeds as $embed)
{
@ -308,21 +313,21 @@ abstract class ###Component###Email
{
if (!empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public')))
{
$mail->DKIM_domain = $conf->get('dkim_domain');
$mail->DKIM_selector = $conf->get('dkim_selector');
$mail->DKIM_identity = $conf->get('dkim_identity');
$mail->DKIM_passphrase = $conf->get('dkim_passphrase');
$tmp = tempnam(sys_get_temp_dir(), 'VDM');
$h = fopen($tmp, 'w');
$mail->DKIM_domain = $conf->get('dkim_domain');
$mail->DKIM_selector = $conf->get('dkim_selector');
$mail->DKIM_identity = $conf->get('dkim_identity');
$mail->DKIM_passphrase = $conf->get('dkim_passphrase');
$tmp = tempnam(sys_get_temp_dir(), 'VDM');
$h = fopen($tmp, 'w');
fwrite($h, $conf->get('dkim_private'));
fclose($h);
$mail->DKIM_private = $tmp;
$mail->DKIM_private = $tmp;
}
}
$sendmail = $mail->Send();
if ($conf->get('enable_dkim') && !empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public')))
{
@unlink($tmp);
@ -351,7 +356,7 @@ abstract class ###Component###Email
/**
* Set html text (in a row) and subject (as title) to a email table.
* do not use <p> instead use <br />
* in your html that you pass to this method
* in your html that you pass to this method
* since it is a table row it does not
* work well with paragraphs
*
@ -360,7 +365,7 @@ abstract class ###Component###Email
*/
public static function setBasicBody($html, $subject)
{
$body = array();
$body = [];
$body[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
$body[] = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
$body[] = "<head>";
@ -397,7 +402,7 @@ abstract class ###Component###Email
/**
* Set html text (in a row) and subject (as title) to a email table.
* do not use <p> instead use <br />
* in your html that you pass to this method
* in your html that you pass to this method
* since it is a table row it does not
* work well with paragraphs
*
@ -406,7 +411,7 @@ abstract class ###Component###Email
*/
public static function setTableBody($html, $subject)
{
$body = array();
$body = [];
$body[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
$body[] = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
$body[] = "<head>";

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -15,9 +15,9 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED###
###CUSTOM_ADMIN_VIEW_HTML_HEADER###
###CUSTOM_ADMIN_VIEW_HTML_HEADER######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
/**
* ###Component### Html View class for the ###SView###
@ -28,11 +28,11 @@ class ###Component###View###SView### extends HtmlView
function display($tpl = null)
{
// get component params
$this->params = JComponentHelper::getParams('com_###component###');
$this->params = ComponentHelper::getParams('com_###component###');
// get the application
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
// get the user object
$this->user = JFactory::getUser();
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
@ -43,7 +43,7 @@ class ###Component###View###SView### extends HtmlView
protected function setDocument()
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_DOCUMENT_METADATA######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
// add the document default css file
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
Html::_('stylesheet', 'administrator/components/com_###component###/assets/css/###sview###.css', ['version' => 'auto']);###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
}
/**
@ -59,22 +59,22 @@ class ###Component###View###SView### extends HtmlView
// Check for empty title and add view name if param is set
if (empty($title))
{
$title = JText::_('COM_###COMPONENT###_###SVIEW###');
$title = Text::_('COM_###COMPONENT###_###SVIEW###');
}
// add title to the page
JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
ToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}
}###CUSTOM_ADMIN_GET_MODULE###
@ -88,7 +88,17 @@ class ###Component###View###SView### extends HtmlView
public function escape($var)
{
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}
?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -31,7 +31,7 @@ class ###Component###View###View### extends HtmlView
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_###component###');
$this->params = ComponentHelper::getParams('com_###component###');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@ -40,7 +40,7 @@ class ###Component###View###View### extends HtmlView
// get action permissions
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$return = $jinput->get('return', null, 'base64');
@ -65,7 +65,7 @@ class ###Component###View###View### extends HtmlView
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -99,11 +99,11 @@ class ###Component###View###View### extends HtmlView
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return ###Component###Helper::htmlEscape($var, $this->_charset, true, 30);
// use the helper htmlEscape method instead and shorten the string
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
}
/**
@ -114,14 +114,20 @@ class ###Component###View###View### extends HtmlView
protected function setDocument()
{
$isNew = ($this->item->id < 1);
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
$this->document->addScript(JURI::root() . $this->script, (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); ###DOCUMENT_CUSTOM_PHP###
JText::script('view not acceptable. Error');
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
Html::_('script', $this->script, ['version' => 'auto']);
Html::_('script', "administrator/components/com_###component###/views/###view###/submitbutton.js", ['version' => 'auto']);###DOCUMENT_CUSTOM_PHP###
Text::script('view not acceptable. Error');
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -31,7 +31,7 @@ class ###Component###View###View### extends HtmlView
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_###component###');
$this->params = ComponentHelper::getParams('com_###component###');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@ -40,7 +40,7 @@ class ###Component###View###View### extends HtmlView
// get action permissions
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$return = $jinput->get('return', null, 'base64');
@ -65,7 +65,7 @@ class ###Component###View###View### extends HtmlView
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -86,7 +86,7 @@ class ###Component###View###View### extends HtmlView
protected function addToolBar()
{###ADDTOOLBAR###
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();
$this->toolbar = Toolbar::getInstance();
}
/**
@ -100,11 +100,11 @@ class ###Component###View###View### extends HtmlView
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return ###Component###Helper::htmlEscape($var, $this->_charset, true, 30);
// use the helper htmlEscape method instead and shorten the string
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
}
/**
@ -115,11 +115,7 @@ class ###Component###View###View### extends HtmlView
protected function setDocument()
{
$isNew = ($this->item->id < 1);
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
// only add the ISIS template css & js if needed (default is 1 = true)
// you can override this in the global component options
// just add a (radio yes/no field) with a name called add_isis_template
@ -127,14 +123,24 @@ class ###Component###View###View### extends HtmlView
if ($this->params->get('add_isis_template', 1))
{
// we need this to fix the form display (TODO)
$this->document->addStyleSheet(JURI::root() . "administrator/templates/isis/css/template.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript(JURI::root() . "administrator/templates/isis/js/template.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
Html::_('stylesheet', "administrator/templates/isis/css/template.css", ['version' => 'auto']);
Html::_('script', "administrator/templates/isis/js/template.js", ['version' => 'auto']);
}
// the default style of this view
$this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
Html::_('stylesheet', "components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
// default javascript of this view
$this->document->addScript(JURI::root(). $this->script, (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); ###DOCUMENT_CUSTOM_PHP###
JText::script('view not acceptable. Error');
Html::_('script', $this->script, ['version' => 'auto']);
Html::_('script', "components/com_###component###/views/###view###/submitbutton.js", ['version' => 'auto']);###DOCUMENT_CUSTOM_PHP###
Text::script('view not acceptable. Error');
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* ###Component### Import Html View
@ -31,7 +34,7 @@ class ###Component###ViewImport extends HtmlView
protected $dataType;
public function display($tpl = null)
{
{
if ($this->getLayout() !== 'modal')
{
// Include helper submenu
@ -44,7 +47,7 @@ class ###Component###ViewImport extends HtmlView
$this->paths = &$paths;
$this->state = &$state;
// get global action permissions
// get global action permissions
$this->canDo = ###Component###Helper::getActions('import');
// We don't need toolbar in the modal window.
@ -55,18 +58,18 @@ class ###Component###ViewImport extends HtmlView
}
// get the session object
$session = JFactory::getSession();
$session = Factory::getSession();
// check if it has package
$this->hasPackage = $session->get('hasPackage', false);
$this->dataType = $session->get('dataType', false);
$this->hasPackage = $session->get('hasPackage', false);
$this->dataType = $session->get('dataType', false);
if($this->hasPackage && $this->dataType)
{
$this->headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false),true);
$this->headers = ###Component###Helper::getFileHeaders($this->dataType);
$this->headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false),true);
$this->headers = ###Component###Helper::getFileHeaders($this->dataType);
// clear the data type
$session->clear('dataType');
}
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -82,19 +85,19 @@ class ###Component###ViewImport extends HtmlView
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
JHtmlSidebar::setAction('index.php?option=com_###component###&view=import');
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('import');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,13 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
/**
* ###Component### ###View### Html View
@ -30,19 +36,19 @@ class ###Component###View###View### extends HtmlView
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
JHtmlSidebar::setAction('index.php?option=com_###component###&view=###view###');
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###view###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -40,10 +40,10 @@ class ###Component###View###Views### extends HtmlView
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->user = JFactory::getUser();###ADMIN_DIPLAY_METHOD###
$this->user = Factory::getUser();###ADMIN_DIPLAY_METHOD###
$this->saveOrder = $this->listOrder == 'a.ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
$this->return_here = urlencode(base64_encode((string) Uri::getInstance()));
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
@ -58,7 +58,7 @@ class ###Component###View###Views### extends HtmlView
$this->batchDisplay = JHtmlBatch_::render();
}
}
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -77,32 +77,32 @@ class ###Component###View###Views### extends HtmlView
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###');
JHtmlSidebar::setAction('index.php?option=com_###component###&view=###views###');
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
ToolbarHelper::title(Text::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###');
FormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
if ($this->canCreate)
{
JToolBarHelper::addNew('###view###.add');
ToolbarHelper::addNew('###view###.add');
}
// Only load if there are items
if (###Component###Helper::checkArray($this->items))
if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->items))
{
if ($this->canEdit)
{
JToolBarHelper::editList('###view###.edit');
ToolbarHelper::editList('###view###.edit');
}
if ($this->canState)
{
JToolBarHelper::publishList('###views###.publish');
JToolBarHelper::unpublishList('###views###.unpublish');
JToolBarHelper::archiveList('###views###.archive');
ToolbarHelper::publishList('###views###.publish');
ToolbarHelper::unpublishList('###views###.unpublish');
ToolbarHelper::archiveList('###views###.archive');
if ($this->canDo->get('core.admin'))
{
JToolBarHelper::checkin('###views###.checkin');
ToolbarHelper::checkin('###views###.checkin');
}
}
@ -110,11 +110,11 @@ class ###Component###View###Views### extends HtmlView
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
{
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
$bar = Toolbar::getInstance('toolbar');
// set the batch button name
$title = JText::_('JTOOLBAR_BATCH');
$title = Text::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
$layout = new FileLayout('joomla.toolbar.batch');
// add the button to the page
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
@ -122,25 +122,25 @@ class ###Component###View###Views### extends HtmlView
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{
JToolbarHelper::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH');
ToolbarHelper::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($this->canState && $this->canDelete)
{
JToolbarHelper::trash('###views###.trash');
ToolbarHelper::trash('###views###.trash');
}###EXPORTBUTTON###
}###ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST######IMPORTBUTTON###
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###views###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}###FILTERFIELDDISPLAYHELPER######BATCHDISPLAYHELPER###
}
@ -153,10 +153,10 @@ class ###Component###View###Views### extends HtmlView
{
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
$this->document = Factory::getDocument();
}
$this->document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###ADMIN_ADD_JAVASCRIPT_FILE###
$this->document->setTitle(Text::_('COM_###COMPONENT###_###VIEWS###'));
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###views###.css", ['version' => 'auto']);###ADMIN_ADD_JAVASCRIPT_FILE###
}
/**
@ -171,19 +171,29 @@ class ###Component###View###Views### extends HtmlView
if(strlen($var) > 50)
{
// use the helper htmlEscape method instead and shorten the string
return ###Component###Helper::htmlEscape($var, $this->_charset, true);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, true);
}
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
* @return array Array containing the field name to sort by as the key and display text as value
*/
protected function getSortFields()
{
###SORTFIELDS###
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}###FILTERFUNCTIONS###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -15,9 +15,9 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###CUSTOM_ADMIN_VIEWS_HTML_HEADER###
###CUSTOM_ADMIN_VIEWS_HTML_HEADER######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
/**
* ###Component### Html View class for the ###SViews###
@ -28,11 +28,11 @@ class ###Component###View###SViews### extends HtmlView
function display($tpl = null)
{
// get component params
$this->params = JComponentHelper::getParams('com_###component###');
$this->params = ComponentHelper::getParams('com_###component###');
// get the application
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
// get the user object
$this->user = JFactory::getUser();
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
@ -43,7 +43,7 @@ class ###Component###View###SViews### extends HtmlView
protected function setDocument()
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
// add the document default css file
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
Html::_('stylesheet', 'administrator/components/com_###component###/assets/css/###sviews###.css', ['version' => 'auto']);###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
}
/**
@ -52,19 +52,19 @@ class ###Component###View###SViews### extends HtmlView
protected function addToolBar()
{###HIDEMAINMENU###
// add title to the page
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
ToolbarHelper::title(Text::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_###component###');
ToolbarHelper::preferences('com_###component###');
}
}###CUSTOM_ADMIN_GET_MODULE###
@ -78,6 +78,16 @@ class ###Component###View###SViews### extends HtmlView
public function escape($var)
{
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -15,9 +15,9 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_GET_MODULE_JIMPORT###
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###SITE_VIEWS_HTML_HEADER###
###SITE_VIEWS_HTML_HEADER######SITE_GET_MODULE_JIMPORT###
/**
* ###Component### Html View class for the ###SViews###
@ -26,13 +26,13 @@ class ###Component###View###SViews### extends HtmlView
{
// Overwriting JView display method
function display($tpl = null)
{
{
// get combined params of both component and menu
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();###SITE_DIPLAY_METHOD###
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
}###SITE_EXTRA_DIPLAY_METHODS###
/**
@ -41,7 +41,7 @@ class ###Component###View###SViews### extends HtmlView
protected function _prepareDocument()
{###SITE_LIBRARIES_LOADER######SITE_UIKIT_LOADER######SITE_GOOGLECHART_LOADER######SITE_FOOTABLE_LOADER######SITE_DOCUMENT_METADATA######SITE_DOCUMENT_CUSTOM_PHP###
// add the document default css file
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###SITE_DOCUMENT_CUSTOM_CSS######SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
Html::_('stylesheet', 'components/com_###component###/assets/css/###sview###.css', ['version' => 'auto']);###SITE_DOCUMENT_CUSTOM_CSS######SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
}
/**
@ -49,15 +49,15 @@ class ###Component###View###SViews### extends HtmlView
*/
protected function addToolBar()
{###SITE_CUSTOM_BUTTONS###
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();
$this->toolbar = Toolbar::getInstance();
}###SITE_GET_MODULE###
/**
@ -70,6 +70,16 @@ class ###Component###View###SViews### extends HtmlView
public function escape($var, $sorten = false, $length = 40)
{
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset, $sorten, $length);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, $sorten, $length);
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -15,9 +15,9 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_GET_MODULE_JIMPORT###
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###SITE_VIEW_HTML_HEADER###
###SITE_VIEW_HTML_HEADER######SITE_GET_MODULE_JIMPORT###
/**
* ###Component### Html View class for the ###SView###
@ -26,22 +26,22 @@ class ###Component###View###SView### extends HtmlView
{
// Overwriting JView display method
function display($tpl = null)
{
{
// get combined params of both component and menu
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();###SITE_DIPLAY_METHOD###
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
}###SITE_EXTRA_DIPLAY_METHODS###
/**
* Prepares the document
*/
protected function _prepareDocument()
{###SITE_LIBRARIES_LOADER######SITE_UIKIT_LOADER######SITE_GOOGLECHART_LOADER######SITE_FOOTABLE_LOADER######SITE_DOCUMENT_METADATA######SITE_DOCUMENT_CUSTOM_PHP###
{###SITE_LIBRARIES_LOADER######SITE_UIKIT_LOADER######SITE_GOOGLECHART_LOADER######SITE_FOOTABLE_LOADER######SITE_DOCUMENT_METADATA######SITE_DOCUMENT_CUSTOM_PHP###
// add the document default css file
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###SITE_DOCUMENT_CUSTOM_CSS######SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
Html::_('stylesheet', 'components/com_###component###/assets/css/###sview###.css', ['version' => 'auto']);###SITE_DOCUMENT_CUSTOM_CSS######SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
}
/**
@ -52,12 +52,12 @@ class ###Component###View###SView### extends HtmlView
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
if (###Component###Helper::checkString($this->help_url))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();
$this->toolbar = Toolbar::getInstance();
}###SITE_GET_MODULE###
/**
@ -70,6 +70,16 @@ class ###Component###View###SView### extends HtmlView
public function escape($var, $sorten = false, $length = 40)
{
// use the helper htmlEscape method instead.
return ###Component###Helper::htmlEscape($var, $this->_charset, $sorten, $length);
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, $sorten, $length);
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -31,7 +31,7 @@ class ###Component###Model###SView### extends ItemModel
*/
protected $_context = 'com_###component###.###sview###';
/**
/**
* Model user data.
*
* @var strings
@ -61,7 +61,7 @@ class ###Component###Model###SView### extends ItemModel
*/
protected function populateState()
{
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->input = $this->app->input;
// Get the item main id
$id = $this->input->getInt('id', null);
@ -80,12 +80,12 @@ class ###Component###Model###SView### extends ItemModel
*/
public function getItem($pk = null)
{
$this->user = JFactory::getUser();
$this->user = Factory::getUser();
// check if this user has permission to access item
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
$app = Factory::getApplication();
$app->enqueueMessage(Text::_('Not authorised!'), 'error');
// redirect away if not a correct to cPanel/default view
$app->redirect('index.php?option=com_###component###');
return false;
@ -98,10 +98,10 @@ class ###Component###Model###SView### extends ItemModel
$this->initSet = true;
$pk = (!empty($pk)) ? $pk : (int) $this->getState('###sview###.id');###CUSTOM_ADMIN_BEFORE_GET_ITEM###
if ($this->_item === null)
{
$this->_item = array();
$this->_item = [];
}###LICENSE_LOCKED_CHECK###
if (!isset($this->_item[$pk]))
@ -114,7 +114,7 @@ class ###Component###Model###SView### extends ItemModel
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseWarning(404, $e->getMessage());
JError::raiseError(404, $e->getMessage());
}
else
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -61,7 +61,7 @@ class ###Component###Model###SView### extends ItemModel
*/
protected function populateState()
{
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->input = $this->app->input;
// Get the itme main id
$id = $this->input->getInt('id', null);
@ -82,7 +82,7 @@ class ###Component###Model###SView### extends ItemModel
*/
public function getItem($pk = null)
{
$this->user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS###
$this->user = Factory::getUser();###USER_PERMISSION_CHECK_ACCESS###
$this->userId = $this->user->get('id');
$this->guest = $this->user->get('guest');
$this->groups = $this->user->get('groups');
@ -91,10 +91,10 @@ class ###Component###Model###SView### extends ItemModel
$this->initSet = true;
$pk = (!empty($pk)) ? $pk : (int) $this->getState('###sview###.id');###SITE_BEFORE_GET_ITEM###
if ($this->_item === null)
{
$this->_item = array();
$this->_item = [];
}###LICENSE_LOCKED_CHECK###
if (!isset($this->_item[$pk]))
@ -107,7 +107,7 @@ class ###Component###Model###SView### extends ItemModel
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseWarning(404, $e->getMessage());
JError::raiseError(404, $e->getMessage());
}
else
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('checkboxes');
@ -29,14 +33,14 @@ class ###JPREFIX###FormField###Type### extends JFormFieldCheckboxes
/**
* The ###type### field type.
*
* @var string
* @var string
*/
public $type = '###type###';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of Html options.
*/
protected function getOptions()
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###JFORM_TYPE_HEADER###
###FORM_CUSTOM_FIELD_HEADER###
/**
* ###Type### Form Field class for the ###Component### component
@ -27,7 +27,7 @@ class ###JPREFIX###FormField###Type### extends JFormField###JFORM_EXTENDS###
/**
* The ###type### field type.
*
* @var string
* @var string
*/
public $type = '###type###';###JFORM_TYPE_PHP###
public $type = '###type###';###FORM_CUSTOM_FIELD_PHP###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
@ -29,14 +33,14 @@ class ###JPREFIX###FormField###Type### extends JFormFieldList
/**
* The ###type### field type.
*
* @var string
* @var string
*/
public $type = '###type###';###ADD_BUTTON###
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of Html options.
*/
protected function getOptions()
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('radio');
@ -29,14 +33,14 @@ class ###JPREFIX###FormField###Type### extends JFormFieldRadio
/**
* The ###type### field type.
*
* @var string
* @var string
*/
public $type = '###type###';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
* @return array An array of Html options.
*/
protected function getOptions()
{

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('user');
@ -29,7 +33,7 @@ class ###JPREFIX###FormField###Type### extends JFormFieldUser
/**
* The ###type### field type.
*
* @var string
* @var string
*/
public $type = '###type###';

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,9 +17,12 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Form\FormRule;
use Joomla\Registry\Registry;
use Joomla\CMS\HTML\HTMLHelper as Html;
/**
* Form Rule (###Name###) class for the Joomla Platform.

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -24,10 +24,10 @@ defined('_JEXEC') or die('Restricted access');
*/
class ###Component###Model###Views### extends ListModel
{
public function __construct($config = array())
public function __construct($config = [])
{
if (empty($config['filter_fields']))
{
{
$config['filter_fields'] = array(
###FILTER_FIELDS###
);
@ -49,7 +49,7 @@ class ###Component###Model###Views### extends ListModel
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
$app = Factory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
@ -60,7 +60,7 @@ class ###Component###Model###Views### extends ListModel
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
@ -70,21 +70,21 @@ class ###Component###Model###Views### extends ListModel
{###LICENSE_LOCKED_CHECK######CHECKINCALL###
// load parent items
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX######SELECTIONTRANSLATIONFIX######GET_ITEMS_METHOD_AFTER_ALL###
// return items
return $items;
}###SELECTIONTRANSLATIONFIXFUNC###
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
* @return string An SQL query
*/
protected function getListQuery()
{###LICENSE_LOCKED_CHECK###
###LISTQUERY###
}###MODELEXPORTMETHOD######LICENSE_LOCKED_SET_BOOL###
/**
* Method to get a store id based on model configuration state.
*

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -25,12 +25,12 @@ defined('_JEXEC') or die('Restricted access');
class ###Component###ModelAjax extends ListModel
{
protected $app_params;
public function __construct()
{
parent::__construct();
public function __construct()
{
parent::__construct();
// get params
$this->app_params = JComponentHelper::getParams('com_###component###');
$this->app_params = ComponentHelper::getParams('com_###component###');
}###AJAX_MODEL_METHODS###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -30,7 +30,7 @@ class ###Component###ModelAjax extends ListModel
{
parent::__construct();
// get params
$this->app_params = JComponentHelper::getParams('com_###component###');
$this->app_params = ComponentHelper::getParams('com_###component###');
}###AJAX_SITE_MODEL_METHODS###
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -27,9 +27,9 @@ class ###Component###Model###Component### extends ListModel
public function getIcons()
{
// load user for access menus
$user = JFactory::getUser();
$user = Factory::getUser();
// reset icon array
$icons = array();
$icons = [];
// view groups array
$viewGroups = array(
'main' => array(###DASHBOARDICONS###)
@ -38,7 +38,7 @@ class ###Component###Model###Component### extends ListModel
foreach($viewGroups as $group => $views)
{
$i = 0;
if (###Component###Helper::checkArray($views))
if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($views))
{
foreach($views as $view)
{
@ -50,11 +50,11 @@ class ###Component###Model###Component### extends ListModel
if (count($dwd) == 3)
{
list($type, $name, $url) = $dwd;
$viewName = $name;
$alt = $name;
$url = $url;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
$viewName = $name;
$alt = $name;
$url = $url;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::safe($name,'U');
}
}
// internal views
@ -76,11 +76,11 @@ class ###Component###Model###Component### extends ListModel
switch($action)
{
case 'add':
$url = 'index.php?option=com_###component###&view=' . $name . '&layout=edit';
$image = $name . '_' . $action. '.' . $type;
$alt = $name . '&nbsp;' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_ADD';
$add = true;
$url = 'index.php?option=com_###component###&view=' . $name . '&layout=edit';
$image = $name . '_' . $action. '.' . $type;
$alt = $name . '&nbsp;' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::safe($name,'U').'_ADD';
$add = true;
break;
default:
// check for new convention (more stable)
@ -93,34 +93,34 @@ class ###Component###Model###Component### extends ListModel
{
$extension = 'com_###component###.' . $name;
}
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type;
$alt = $viewName . '&nbsp;' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U') . '_' . ###Component###Helper::safeString($action,'U');
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type;
$alt = $viewName . '&nbsp;' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_' . Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::safe($name,'U') . '_' . Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::safe($action,'U');
break;
}
}
else
{
$viewName = $name;
$alt = $name;
$url = 'index.php?option=com_###component###&view=' . $name;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
$hover = false;
$viewName = $name;
$alt = $name;
$url = 'index.php?option=com_###component###&view=' . $name;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::safe($name,'U');
$hover = false;
}
}
else
{
$viewName = $view;
$alt = $view;
$url = 'index.php?option=com_###component###&view=' . $view;
$image = $view . '.png';
$name = ucwords($view).'<br /><br />';
$hover = false;
$viewName = $view;
$alt = $view;
$url = 'index.php?option=com_###component###&view=' . $view;
$image = $view . '.png';
$name = ucwords($view).'<br /><br />';
$hover = false;
}
// first make sure the view access is set
if (###Component###Helper::checkArray($viewAccess))
if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($viewAccess))
{
// setup some defaults
$dashboard_add = false;
@ -128,11 +128,11 @@ class ###Component###Model###Component### extends ListModel
$accessTo = '';
$accessAdd = '';
// access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.access']):false;
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($viewAccess[$viewName.'.access']):false;
// set main controllers
$accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.dashboard_add']):false;
$accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.dashboard_list']):false;
$accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($viewAccess[$viewName.'.dashboard_add']):false;
$accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($viewAccess[$viewName.'.dashboard_list']):false;
// check for adding access
if ($add && $accessCreate)
{
@ -150,64 +150,64 @@ class ###Component###Model###Component### extends ListModel
// set main access controllers
if ($accessDashboard_add)
{
$dashboard_add = $user->authorise($viewAccess[$viewName.'.dashboard_add'], 'com_###component###');
$dashboard_add = $user->authorise($viewAccess[$viewName.'.dashboard_add'], 'com_###component###');
}
if ($accessDashboard_list)
{
$dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_###component###');
}
if (###Component###Helper::checkString($accessAdd) && ###Component###Helper::checkString($accessTo))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($accessAdd) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($accessTo))
{
// check access
if($user->authorise($accessAdd, 'com_###component###') && $user->authorise($accessTo, 'com_###component###') && $dashboard_add)
{
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
}
}
elseif (###Component###Helper::checkString($accessTo))
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($accessTo))
{
// check access
if($user->authorise($accessTo, 'com_###component###') && $dashboard_list)
{
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
}
}
elseif (###Component###Helper::checkString($accessAdd))
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($accessAdd))
{
// check access
if($user->authorise($accessAdd, 'com_###component###') && $dashboard_add)
{
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
}
}
else
{
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
}
}
else
{
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
$icons[$group][$i] = new StdClass;
$icons[$group][$i]->url = $url;
$icons[$group][$i]->name = $name;
$icons[$group][$i]->image = $image;
$icons[$group][$i]->alt = $alt;
}
$i++;
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -46,15 +46,15 @@ class ###Component###Model###SViews### extends ListModel
protected function getListQuery()
{
// Get the current user for authorisation checks
$this->user = JFactory::getUser();
$this->user = Factory::getUser();
$this->userId = $this->user->get('id');
$this->guest = $this->user->get('guest');
$this->groups = $this->user->get('groups');
$this->authorisedGroups = $this->user->getAuthorisedGroups();
$this->authorisedGroups = $this->user->getAuthorisedGroups();
$this->levels = $this->user->getAuthorisedViewLevels();
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->input = $this->app->input;
$this->initSet = true; ###CUSTOM_ADMIN_GET_LIST_QUERY###
$this->initSet = true;###CUSTOM_ADMIN_GET_LIST_QUERY###
}
/**
@ -64,12 +64,12 @@ class ###Component###Model###SViews### extends ListModel
*/
public function getItems()
{
$user = JFactory::getUser();
$user = Factory::getUser();
// check if this user has permission to access items
if (!$user->authorise('###sviews###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
$app = Factory::getApplication();
$app->enqueueMessage(Text::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect('index.php?option=com_###component###');
return false;
@ -78,7 +78,7 @@ class ###Component###Model###SViews### extends ListModel
$items = parent::getItems();
// Get the global params
$globalParams = JComponentHelper::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS###
$globalParams = ComponentHelper::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS###
// return items
return $items;

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -46,13 +46,13 @@ class ###Component###Model###SViews### extends ListModel
protected function getListQuery()
{
// Get the current user for authorisation checks
$this->user = JFactory::getUser();
$this->user = Factory::getUser();
$this->userId = $this->user->get('id');
$this->guest = $this->user->get('guest');
$this->groups = $this->user->get('groups');
$this->authorisedGroups = $this->user->getAuthorisedGroups();
$this->levels = $this->user->getAuthorisedViewLevels();
$this->app = JFactory::getApplication();
$this->app = Factory::getApplication();
$this->input = $this->app->input;
$this->initSet = true; ###SITE_GET_LIST_QUERY###
}
@ -64,12 +64,12 @@ class ###Component###Model###SViews### extends ListModel
*/
public function getItems()
{
$user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS######LICENSE_LOCKED_CHECK######SITE_BEFORE_GET_ITEMS###
$user = Factory::getUser();###USER_PERMISSION_CHECK_ACCESS######LICENSE_LOCKED_CHECK######SITE_BEFORE_GET_ITEMS###
// load parent items
$items = parent::getItems();
// Get the global params
$globalParams = JComponentHelper::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS###
$globalParams = ComponentHelper::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS###
// return items
return $items;

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,10 +17,17 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Access\Access as AccessRules;
use Joomla\CMS\Access\Rules;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\String\PunycodeHelper;
use Joomla\CMS\Table\Observer\Tags as TableObserverTags;
use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory;
use Joomla\CMS\Application\ApplicationHelper;
/**
* ###Views### Table class
@ -34,60 +41,60 @@ class ###Component###Table###View### extends Table
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
function __construct(&$db)
{
parent::__construct('#__###component###_###view###', 'id', $db);###JTABLECONSTRUCTOR######LICENSE_LOCKED_CHECK###
}
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry = new Registry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry = new Registry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
{
$rules = new AccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the ###View### table.
*
* @param boolean Toggle whether null values should be updated.
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
$date = Factory::getDate();
$user = Factory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
@ -102,33 +109,38 @@ class ###Component###Table###View### extends Table
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('###view###', '###Component###Table');
$table = Table::getInstance('###view###', '###Component###Table');
if ($table->load(array('alias' => $this->alias###JTABLEALIASCATEGORY###)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS'));
$this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS'));
if ($table->published === -2)
{
$this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS_TRASHED'));
}
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
$this->url = PunycodeHelper::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
$this->website = PunycodeHelper::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
@ -140,20 +152,20 @@ class ###Component###Table###View### extends Table
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('###view###', '###component###Table');
$table = Table::getInstance('###view###', '###component###Table');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = StringHelper::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
@ -164,7 +176,7 @@ class ###Component###Table###View### extends Table
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
$clean_keys = [];
foreach ($keys as $key)
{
@ -187,13 +199,13 @@ class ###Component###Table###View### extends Table
$this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
// If we don't have any access rules set at this point just use an empty AccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_###component###.###view###.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
@ -209,12 +221,12 @@ class ###Component###Table###View### extends Table
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
* @return AccessRules The AccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
@ -225,14 +237,14 @@ class ###Component###Table###View### extends Table
{
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
if ($result instanceof AccessRules)
{
if (isset($try[1]))
{
@ -249,7 +261,7 @@ class ###Component###Table###View### extends Table
else
{
// clear the value since we inherit
$rule = array();
$rule = [];
}
}
// check if there are any view values remaining
@ -257,8 +269,8 @@ class ###Component###Table###View### extends Table
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
// Instantiate and return the AccessRules object for the asset rules.
$rules = new AccessRules;
$rules->mergeCollection($_result);
return $rules;
@ -267,7 +279,7 @@ class ###Component###Table###View### extends Table
return $result;
}
}
return JAccess::getAssetRules(0);
return AccessRules::getAssetRules(0);
}
/**
@ -275,8 +287,8 @@ class ###Component###Table###View### extends Table
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
@ -287,8 +299,8 @@ class ###Component###Table###View### extends Table
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
@ -302,12 +314,12 @@ class ###Component###Table###View### extends Table
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
protected function _getAssetParentId(?Table $table = null, $id = null)
{
$asset = JTable::getInstance('Asset');
$asset = Table::getInstance('Asset');
$asset->loadByName('com_###component###');
return $asset->id;

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Session\Session;
/**
* ###Component### Ajax Controller
*/
@ -26,19 +29,19 @@ class ###Component###ControllerAjax extends JControllerLegacy
{
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json' );
JFactory::getApplication()->setHeader('Content-Disposition','attachment;filename="getajax.json"');
JFactory::getApplication()->setHeader("Access-Control-Allow-Origin", "*");
Factory::getDocument()->setMimeEncoding( 'application/json' );
Factory::getApplication()->setHeader('Content-Disposition','attachment;filename="getajax.json"');
Factory::getApplication()->setHeader("Access-Control-Allow-Origin", "*");
// load the tasks
$this->registerTask('fieldRequired', 'ajax');
}
public function ajax()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$user = Factory::getUser();
$jinput = Factory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$token = Session::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && $token == $call_token)
{
@ -50,8 +53,8 @@ class ###Component###ControllerAjax extends JControllerLegacy
$name = $jinput->get('name', NULL, 'WORD');
$form = $jinput->get('form', NULL, 'WORD');
$status = $jinput->get('status', NULL, 'INT');
if (###Component###Helper::checkString($name) && ###Component###Helper::checkString($form))
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($name) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($form))
{
$result = $this->getModel('ajax')->setFieldRequired($name,$form,$status);
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,27 +17,32 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Component\ComponentHelper;
/**
* ###Component### Ajax Model
*/
class ###Component###ModelAjax extends JModelList
class ###Component###ModelAjax extends ListModel
{
protected $app_params;
public function __construct()
{
parent::__construct();
{
parent::__construct();
// get params
$this->app_params = JComponentHelper::getParams('com_###component###');
$this->app_params = ComponentHelper::getParams('com_###component###');
}
public function setFieldRequired($name,$form,$status)
{
// get the session
$session = JFactory::getSession();
$session = Factory::getSession();
// get this forms set fields
$fields = $session->get($form.'_requiredFieldFix');
if(###Component###Helper::checkArray($fields))
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($fields))
{
if ($status == 1)
{
@ -45,7 +50,7 @@ class ###Component###ModelAjax extends JModelList
$fields = array_unique($fields);
}
else
{
{
// remove from array
if(($key = array_search($name, $fields)) !== false)
{
@ -61,7 +66,7 @@ class ###Component###ModelAjax extends JModelList
}
}
// load the remaining values to session
if(###Component###Helper::checkArray($fields))
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($fields))
{
$session->set($form.'_requiredFieldFix', $fields);
}

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die;###ADMIN_POWER_HELPER###

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die;###SITE_POWER_HELPER###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -30,7 +30,7 @@ abstract class JHtmlBatch_
* @var array
* @since 3.0
*/
protected static $ListSelection = array();
protected static $ListSelection = [];
/**
* Render the batch selection options.

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('JPATH_BASE') or die;
use Joomla\CMS\Language\Text;
JHtmlBehavior::core();
$divWrapper = range(1,120,2);
$counter = 0;
@ -24,8 +25,8 @@ $counter = 0;
<?php if ($displayData->ListSelection) : ?>
<div class="row-fluid">
<?php foreach ($displayData->ListSelection as $ListSelection) : ?>
<div class="control-group span6">
<div class="controls">
<div class="control-group span6">
<div class="controls">
<label for="<?php echo $ListSelection['name']; ?>" class="element-invisible"><?php echo $ListSelection['label']; ?></label>
<select name="<?php echo $ListSelection['name']; ?>" id="<?php echo $ListSelection['name']; ?>" class="span12 small">
<?php if (!$ListSelection['noDefault']) : ?>
@ -33,21 +34,21 @@ $counter = 0;
<?php endif; ?>
<?php echo $ListSelection['options']; ?>
</select>
</div>
</div>
</div>
<?php if (in_array($counter,$divWrapper)) : ?>
</div>
<div class="row-fluid">
<?php endif; ?>
<?php $counter++; ?>
<?php $counter++; ?>
<?php endforeach; ?>
</div>
<div class="control-group radio" id="batch-move-copy">
<div class="controls">
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo JText::_('Copy'); ?></label>
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo JText::_('Update'); ?></label>
</div>
<label class="radio" id="batch[move_copy]c-lbl" for="batch[move_copy]c">
<input type="radio" value="c" id="batch[move_copy]c" name="batch[move_copy]"><?php echo Text::_('Copy'); ?></label>
<label class="radio" id="batch[move_copy]m-lbl" for="batch[move_copy]m">
<input type="radio" checked="checked" value="m" id="batch[move_copy]m" name="batch[move_copy]"><?php echo Text::_('Update'); ?></label>
</div>
</div>
<?php endif; ?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,28 +17,34 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// The power autoloader for this project admin area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/powerloader.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
###ADMIN_COMPONENT_HEADER###
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_###component###'))
if (!Factory::getUser()->authorise('core.manage', 'com_###component###'))
{
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
};
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
// Add CSS file for all pages
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_###component###/assets/css/admin.css');
$document->addScript('components/com_###component###/assets/js/admin.js');
Html::_('stylesheet', 'components/com_###component###/assets/css/admin.css', ['version' => 'auto']);
Html::_('script', 'components/com_###component###/assets/js/admin.js', ['version' => 'auto']);
// require helper files
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php');###HELPER_EMAIL###
JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php');###LICENSE_LOCKED_INT######ADMIN_GLOBAL_EVENT###
// Get an instance of the controller prefixed by ###Component###
$controller = JControllerLegacy::getInstance('###Component###');
$controller = BaseController::getInstance('###Component###');
// Perform the Request task
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->execute(Factory::getApplication()->input->get('task'));
// Redirect if set by the controller
$controller->redirect();

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,22 +17,28 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// The power autoloader for this project site area.
$power_autoloader = JPATH_SITE . '/components/com_###component###/helpers/powerloader.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
###SITE_COMPONENT_HEADER###
// Set the component css/js
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_###component###/assets/css/site.css');
$document->addScript('components/com_###component###/assets/js/site.js');
Html::_('stylesheet', 'components/com_###component###/assets/css/site.css', ['version' => 'auto']);
Html::_('script', 'components/com_###component###/assets/js/site.js', ['version' => 'auto']);
// Require helper files
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php');###HELPER_EMAIL###
JLoader::register('###Component###HelperRoute', __DIR__ . '/helpers/route.php');###LICENSE_LOCKED_INT######SITE_GLOBAL_EVENT###
// Get an instance of the controller prefixed by ###Component###
$controller = JControllerLegacy::getInstance('###Component###');
$controller = BaseController::getInstance('###Component###');
// Perform the request task
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->execute(Factory::getApplication()->input->get('task'));
// Redirect if set by the controller
$controller->redirect();

View File

@ -3,153 +3,153 @@
/* CSS Document */
.dashboard-container {
margin-left: 10px;
margin-top: 10px;
width: 100%;
margin-left: 10px;
margin-top: 10px;
width: 100%;
}
.dashboard-container [class*="span"] {
display: block;
float: none;
margin-left: 0;
width: auto;
display: block;
float: none;
margin-left: 0;
width: auto;
}
.dashboard-container:before, .dashboard-container:after {
content: "";
display: table;
content: "";
display: table;
}
.dashboard-container:after {
clear: both;
clear: both;
}
.dashboard-container [class*="span"] {
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
box-sizing: border-box;
display: block;
float: left;
min-height: 145px;
min-width: 96px;
width: 100%;
}
.dashboard-container [class*="span"]:first-child {
margin-left: 0;
margin-left: 0;
}
.dashboard-wraper {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 5px;
float: left;
margin: 1%;
padding: 3px;
width: 17%;
min-height: 194px;
min-width: 96px;
}
.dashboard-content a {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
min-height: 89px;
padding: 10px;
text-align: center;
text-decoration: none;
}
.dashboard-content a:hover {
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
color: hsl(200, 100%, 30%);
text-decoration: none;
}
.dashboard-title {
display: block;
padding-top: 5px;
display: block;
padding-top: 5px;
}
.dashboard-info {
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 85%);
border-radius: 4px;
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
color: hsl(0, 0%, 20%);
display: block;
font-size: 12px;
padding: 10px;
text-align: center;
}
.dashboard-info span {
display: block;
text-align: center;
display: block;
text-align: center;
}
.dashboard-info img {
margin: 0 auto;
margin: 0 auto;
}
.dashboard-table {
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
border-top: 1px solid hsl(0, 0%, 87%);
margin-top: 5px;
width: 100%;
}
.dashboard-info h5 {
font-size: 11px;
font-weight: bold;
font-size: 11px;
font-weight: bold;
}
.dashboard-block {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border: 1px solid hsl(0, 0%, 76%);
border-radius: 3px;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
margin-bottom: 20px;
}
.dashboard-block .dashboard-block-head {
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
border-bottom: 1px solid hsl(0, 0%, 76%);
border-radius: 3px 3px 0 0;
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
height: 40px;
position: relative;
}
.dashboard-block .dashboard-block-head h5 {
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
font-size: 12px;
margin: 0;
padding-left: 10px;
padding-top: 11px;
text-transform: uppercase;
}
.dashboard-block .dashboard-block-content {
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
border-radius: 0 0 3px 3px;
}
.dashboard-block .dashboard-block-box {
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
border-top: 1px solid hsl(0, 0%, 82%);
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
}
.dashboard-block .dashboard-block-content .dashboard-block-box {
margin-top: 0 !important;
margin-top: 0 !important;
}
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}
.dashboard-block-table {
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
background-color: hsla(0, 0%, 0%, 0);
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
width: 100%;
}
.dashboard-block-table th, .dashboard-block-table td {
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
border-top: 1px solid hsl(0, 0%, 87%);
line-height: 20px;
padding: 5px;
text-align: left;
vertical-align: middle;
}
.dashboard-badge {
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
background-color: hsl(0, 0%, 60%);
border-radius: 9px;
color: hsl(0, 0%, 100%);
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
padding: 1px 9px 2px;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
vertical-align: baseline;
white-space: nowrap;
}

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -18,10 +18,11 @@ defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###ADMIN_VIEWS_HEADER###
if ($this->saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_###component###&task=###views###.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
Html::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
###VIEWS_DEFAULT_BODY######VIEWS_FOOTER_SCRIPT###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,7 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
?>
<p><?php echo JText::_('COM_###COMPONENT###_###VIEWS###_BATCH_TIP'); ?></p>
<p><?php echo Text::_('COM_###COMPONENT###_###VIEWS###_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay; ?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,12 +17,14 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Language\Text;
?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button" onclick="###BATCH_ONCLICK_CANCEL_SCRIPT###" data-dismiss="modal">
<?php echo JText::_('JCANCEL'); ?>
<?php echo Text::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('###view###.batch');">
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
<?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,6 +17,10 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
$edit = "index.php?option=com_###component###&view=###views###&task=###view###.edit";
?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -18,11 +18,11 @@ defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###CUSTOM_ADMIN_VIEW_HEADER######CUSTOM_ADMIN_CODE_BODY###
?>
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
<?php $urlId = (isset($this->item->id)) ? '&id='. (int) $this->item->id : ''; ?>
###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM###
<?php else: ?>
<h1><?php echo JText::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<h1><?php echo Text::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -15,6 +15,10 @@ defined('_JEXEC') or die('Restricted access');
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_TEMPLATE_CODE_BODY###
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;###CUSTOM_ADMIN_TEMPLATE_CODE_BODY###
?>###CUSTOM_ADMIN_TEMPLATE_BODY###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,5 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
?>
###LISTHEAD###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,13 +17,17 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
JHtml::_('jquery.framework');
JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;
Html::_('jquery.framework');
Html::_('bootstrap.tooltip');
Html::_('script', 'system/core.js', false, true);
Html::_('behavior.keepalive');
?>
<script type="text/javascript">
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList)) : ?>
<?php if ($this->hasPackage && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headerList)) : ?>
Joomla.continueImport = function()
{
var form = document.getElementById('adminForm');
@ -40,7 +44,7 @@ JHtml::_('behavior.keepalive');
// do field validation
if (error)
{
alert("<?php echo JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
}
else
{
@ -58,7 +62,7 @@ JHtml::_('behavior.keepalive');
// do field validation
if (form.import_package.value == "")
{
alert("<?php echo JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
}
else
{
@ -75,7 +79,7 @@ JHtml::_('behavior.keepalive');
// do field validation
if (form.import_directory.value == ""){
alert("<?php echo JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
}
else
{
@ -93,7 +97,7 @@ JHtml::_('behavior.keepalive');
// do field validation
if (form.import_url.value == "" || form.import_url.value == "http://")
{
alert("<?php echo JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL', true); ?>");
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL', true); ?>");
}
else
{
@ -126,7 +130,7 @@ jQuery(document).ready(function($) {
</script>
<div id="installer-import" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_###component###&view=import');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_###component###&view=import');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
<?php if (!empty( $this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
@ -137,13 +141,13 @@ jQuery(document).ready(function($) {
<div id="j-main-container">
<?php endif;?>
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList) && ###Component###Helper::checkArray($this->headers)) : ?>
<?php if ($this->hasPackage && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headerList) && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headers)) : ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<div class="control-group">
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<label class="control-label" ><h4><?php echo Text::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<div class="controls">
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
<label class="control-label" ><h4><?php echo Text::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
</div>
</div>
<?php foreach($this->headerList as $name => $title): ?>
@ -151,72 +155,72 @@ jQuery(document).ready(function($) {
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
<div class="controls">
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
<option value=""><?php echo JText::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo JText::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
<option value=""><?php echo Text::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo Text::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
<?php foreach($this->headers as $value => $option): ?>
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
<option value="<?php echo ###Component###Helper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ###Component###Helper::htmlEscape($option); ?></option>
<option value="<?php echo Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($value); ?>" class="required" <?php echo $selected ?>><?php echo Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($option); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
</div>
</fieldset>
<input type="hidden" name="gettype" value="continue" />
<?php else: ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
<?php echo Html::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
<?php echo Html::_('bootstrap.addTab', 'myTab', 'upload', Text::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_package" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
<label for="import_package" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
<div class="controls">
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
</div>
</div>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.addTab', 'myTab', 'directory', Text::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_directory" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<label for="import_directory" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<div class="controls">
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
<?php echo Html::_('bootstrap.addTab', 'myTab', 'url', Text::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_url" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
<label for="import_url" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
<div class="controls">
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTabSet'); ?>
<input type="hidden" name="gettype" value="upload" />
<?php endif; ?>
<input type="hidden" name="task" value="import.import" />
<?php echo JHtml::_('form.token'); ?>
<?php echo Html::_('form.token'); ?>
</form>
</div>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -17,8 +17,13 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
JHtml::_('jquery.framework');
JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;
Html::_('jquery.framework');
Html::_('bootstrap.tooltip');
Html::_('script', 'system/core.js', false, true);
Html::_('behavior.keepalive');
?>###IMPORT_DEFAULT_VIEW_CUSTOM###

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -22,5 +22,5 @@ defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM###
<?php else: ?>
<h1><?php echo JText::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<h1><?php echo Text::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

View File

@ -3,8 +3,8 @@
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Some files were not shown because too many files have changed in this diff Show More