Compare commits

...

38 Commits

Author SHA1 Message Date
8b4efd640f Fixed the subform to allow encryption of values without data lose. 2018-04-30 14:06:05 +02:00
cec566176d Fixed admin_fields_conditions edit view to insure an array gets given to the count function 2018-04-27 15:45:50 +02:00
74f2d8df56 Added a switch to control the message display of the expand feature when cronjob runs 2018-04-26 02:09:15 +02:00
47d1a6c155 Added the feature that allows you to setup the behaviour of a selected set of components that will be auto build and installed. So you do not need to manually compile and install those components any more, the system does all that automatically for you. We have called the feature Expansion Development Method, and it can be set in the global settings of JCB under the Development Method tab. 2018-04-25 00:36:05 +02:00
909a91844f Fixed the auto backup system, to allow JCB to be backed up automatically 2018-04-23 14:47:19 +02:00
0857101371 Tweaked the field database area to insure that users are forced to set the database values 2018-04-23 02:42:41 +02:00
a110ff0e35 Fixed a strange mismatch issue with JCB package import with more then 10 components at a time. Also fixed the translation entranslation to source. 2018-04-20 23:14:49 +02:00
4b57e69edb Improved JCB to now be able to have other languanges then en-GB as its base/main/global language. This will allow you to build your components in a language of your choice. 2018-04-20 01:36:49 +02:00
d1813147d3 Added edit links to templates and layouts. Fixed the alias and title selection issue in admin fields area. Added all available languages in Joomla to language area. 2018-04-19 17:52:47 +02:00
48a3a49d6f Added minify of JS to the compiler area, also improved the infusion area to make more use of the getCustomScriptBuilder method 2018-04-18 21:11:14 +02:00
98448b24b7 Fixed the Add JavaScript (views-footer) option, since it did not add the javascript, but now does. Also added some spinner to the Joomla Components view. 2018-04-18 14:03:07 +02:00
0dc22b100b Added the option to clone a Component and all its linked data, also to import a JCB package without merging with local Component 2018-04-17 23:25:03 +02:00
dfff74989e Keeping naming consistency resolved gh-265. Started adding the needed features for the new translation improvment gh-261 2018-04-15 22:21:34 +02:00
4e7d4af1d3 Added the php field properties to a textarea outside of the subform for easier editing 2018-04-15 00:52:48 +02:00
81e5038bb2 Fixed gh-264 another glitch due to the update of the field area, that caused the language tag selection to break 2018-04-14 02:04:12 +02:00
82c9b6edef Stable release of field area update 2018-04-13 22:17:30 +02:00
3002e093de Added custom getOptions back after the fix of the field area 2018-04-13 22:11:35 +02:00
a0890ea87f Fixed gh-262 that broke the saving of php values in custom field 2018-04-13 22:06:45 +02:00
04aefa256b Fixed gh-263 that broke the JCB package imports 2018-04-13 19:48:55 +02:00
131d144ce8 Fixed database mismatch in admin view since we removed the not_required field from the database with the new datbase-less feature 2018-04-13 17:53:14 +02:00
c53716b811 Resolved gh-262 by adding more fixes to the count function around JCB 2018-04-13 17:33:04 +02:00
694612aff9 Urgent fix to the fields area to address the extra field options, and fields with 0 being removed. Added the option to add a field and not add it to the database, so it will show in the edit view but will not be stored to the database. This is to use javascript/php to use that field value, and then drop it. 2018-04-13 17:24:06 +02:00
51d13b75f0 Fixed the css missing fields from field area 2018-04-11 23:04:33 +02:00
802554e7a9 Fixed line break error in JavaScript building area, also added little notice in field area to select field type. 2018-04-11 22:53:11 +02:00
e6b2b48ac7 Update the field area to be more user friendly, phase A of gh-258 2018-04-11 22:06:12 +02:00
6d4c823ea6 added a wrapper for the bcmath functions, so there will be a (basic) fall back if those functions are not on the server 2018-04-08 23:20:33 +02:00
10fdac5d60 Improved the field builder around JCB, moved some xml function into the JCB helper class core 2018-04-08 08:12:18 +02:00
6a77d71095 Fixed the import JCB packages link on dashboard, add frame to layout and template snippet display in related views 2018-04-03 08:24:24 +02:00
5d3a68b448 Added the return value if external component is detected in custom field gh-255 2018-04-02 21:45:52 +02:00
0a4b8f067f Added the validation rules to the export and import of JCB packages 2018-03-30 11:32:22 +02:00
af1e76d21e Made further improvments to the dynamic button to list fields 2018-03-30 09:58:24 +02:00
07662a8a8b Fixed gh-255 to insure that the correct component name is used when building the button on the edit view where the custom field is used. 2018-03-30 06:41:33 +02:00
65e0a19dee Fixed the edit-view for front-end to insure ajax also gets moved to site ajax. Also updated the UIkit notify to target uikit2 convention. 2018-03-30 03:29:24 +02:00
4e740f568e Added the option for automatic alias building, resolve gh-246. Made improvements to the buttons all over JCB, and the tweaked the field view a little more. 2018-03-28 11:46:14 +02:00
0ba2a0e8cf Added validation rules resolve gh-254. Removed empty sql files. Improved the field area. 2018-03-27 11:57:16 +02:00
856a6fad3f Added some more bom files 2018-03-24 03:42:29 +02:00
4f7ddcefe7 Added checksum validation for VDM packages and improved the JCB package import area 2018-03-24 03:36:07 +02:00
b761c7b22d fixed a type 'quite' to 'quiet' 2018-03-21 07:57:44 +02:00
267 changed files with 14308 additions and 6791 deletions

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.0) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -126,14 +126,14 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st March, 2018
+ *Version*: 2.7.0
+ *Last Build*: 30th April, 2018
+ *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186509**
+ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
+ *Line count*: **193305**
+ *Field count*: **1027**
+ *File count*: **1201**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.0) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -126,14 +126,14 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st March, 2018
+ *Version*: 2.7.0
+ *Last Build*: 30th April, 2018
+ *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **186509**
+ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
+ *Line count*: **193305**
+ *Field count*: **1027**
+ *File count*: **1201**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -212,15 +212,16 @@
<action name="fieldtype.submenu" title="COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU" description="COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC" />
<action name="get_snippets.access" title="COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC" />
<action name="get_snippets.custom_admin_views" title="COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.dashboard_list" title="COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC" />
<action name="get_snippets.layouts" title="COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.libraries" title="COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC" />
<action name="get_snippets.site_views" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.snippets" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="get_snippets.submenu" title="COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU" description="COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC" />
<action name="get_snippets.templates" title="COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC" />
<action name="help_document.access" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS_DESC" />
<action name="help_document.batch" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC" />
<action name="help_document.create" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC" />
<action name="help_document.dashboard_add" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC" />
<action name="help_document.dashboard_list" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC" />
<action name="help_document.delete" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE_DESC" />
<action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" />
@ -231,8 +232,9 @@
<action name="help_document.import" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT_DESC" />
<action name="help_document.submenu" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC" />
<action name="joomla_component.backup" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC" />
<action name="joomla_component.export_components" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC" />
<action name="joomla_component.import_components" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC" />
<action name="joomla_component.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC" />
<action name="joomla_component.export_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.import_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
@ -246,6 +248,7 @@
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_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" />
<action name="language_translation.create" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE_DESC" />
@ -344,7 +347,6 @@
<action name="snippet_type.version" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_VERSION_DESC" />
<action name="snippet.access" title="COM_COMPONENTBUILDER_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC" />
<action name="snippet.batch" title="COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE" description="COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC" />
<action name="snippet.dashboard_add" title="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC" />
<action name="snippet.dashboard_list" title="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC" />
<action name="snippet.version" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION_DESC" />
<action name="snippet.export" title="COM_COMPONENTBUILDER_SNIPPETS_EXPORT" description="COM_COMPONENTBUILDER_SNIPPETS_EXPORT_DESC" />
@ -359,6 +361,18 @@
<action name="template.export" title="COM_COMPONENTBUILDER_TEMPLATES_EXPORT" description="COM_COMPONENTBUILDER_TEMPLATES_EXPORT_DESC" />
<action name="template.import" title="COM_COMPONENTBUILDER_TEMPLATES_IMPORT" description="COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC" />
<action name="template.submenu" title="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU" description="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC" />
<action name="validation_rule.access" title="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC" />
<action name="validation_rule.batch" title="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC" />
<action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
<action name="validation_rule.dashboard_list" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC" />
<action name="validation_rule.delete" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC" />
<action name="validation_rule.edit" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC" />
<action name="validation_rule.edit.own" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC" />
<action name="validation_rule.edit.state" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC" />
<action name="validation_rule.version" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC" />
<action name="validation_rule.export" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC" />
<action name="validation_rule.import" title="COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC" />
<action name="validation_rule.submenu" title="COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU" description="COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC" />
</section>
<section name="joomla_component">
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
@ -456,6 +470,15 @@
<action name="snippet.access" title="COM_COMPONENTBUILDER_SNIPPETS_ACCESS" description="COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC" />
<action name="snippet.version" title="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SNIPPETS_EDIT_VERSION_DESC" />
</section>
<section name="validation_rule">
<action name="validation_rule.edit" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC" />
<action name="validation_rule.edit.state" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC" />
<action name="validation_rule.edit.own" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC" />
<action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
<action name="validation_rule.delete" title="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC" />
<action name="validation_rule.access" title="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC" />
<action name="validation_rule.version" title="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION" description="COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC" />
</section>
<section name="field">
<action name="field.edit" title="COM_COMPONENTBUILDER_FIELDS_EDIT" description="COM_COMPONENTBUILDER_FIELDS_EDIT_DESC" />
<action name="field.edit.state" title="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE" description="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE_DESC" />

View File

@ -26,6 +26,8 @@
.no-click {
pointer-events: none;
}
.fieldMedium { width: 130px; }
.fieldMedium { width: 120px; }
.fieldMid { width: 80px; }
.fieldFull { width: 100%; }
.fieldSmall { width: 60px; }
code { display: inline-block; margin: 3px;}

View File

@ -42,4 +42,7 @@ width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}
.uk-scrollable-box {
height: 380px !important;
}

View File

@ -24,4 +24,6 @@
/* CSS Document */
.uk-scrollable-box { height: 380px !important; }
.subform-table-sublayout-section .controls { margin-left: 0px; }

View File

@ -36,4 +36,7 @@ width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}
.uk-scrollable-box {
height: 380px !important;
}

View File

@ -42,4 +42,7 @@ width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}
.uk-scrollable-box {
height: 380px !important;
}

View File

@ -36,4 +36,7 @@ width: 100% !important;
}
.jform_dynamic_get_input_width {
width: 90% !important;
}
.uk-scrollable-box {
height: 380px !important;
}

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.css
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

@ -0,0 +1,27 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rules.css
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
/* CSS Document */

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

23
admin/compiler/JCB.txt Normal file
View File

@ -0,0 +1,23 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version ###VERSION###
@created ###CREATIONDATE###
@package ###Component_name###
@subpackage ###FILENAME###
@author ###AUTHOR### <###AUTHORWEBSITE###>###CONTRIBUTORS###
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright ###COPYRIGHT###
@license ###LICENSE###
###SHORT_DESCRIPTION###
/-----------------------------------------------------------------------------------------------------------------------------*/

22
admin/compiler/SD.txt Normal file
View File

@ -0,0 +1,22 @@
/*-------------------------------------------------------------------------------------------------------------| www.vdm.io |------/
____ ____ __ __ __
/\ _`\ /\ _`\ __ /\ \__ __/\ \ /\ \__
\ \,\L\_\ __ _ __ ___ ___ ___ ___ \ \ \/\ \/\_\ ____\ \ ,_\ _ __ /\_\ \ \____ __ __\ \ ,_\ ___ _ __
\/_\__ \ /'__`\/\`'__\/' __` __`\ / __`\ /' _ `\ \ \ \ \ \/\ \ /',__\\ \ \/ /\`'__\/\ \ \ '__`\/\ \/\ \\ \ \/ / __`\/\`'__\
/\ \L\ \/\ __/\ \ \/ /\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \_\ \ \ \/\__, `\\ \ \_\ \ \/ \ \ \ \ \L\ \ \ \_\ \\ \ \_/\ \L\ \ \ \/
\ `\____\ \____\\ \_\ \ \_\ \_\ \_\ \____/\ \_\ \_\ \ \____/\ \_\/\____/ \ \__\\ \_\ \ \_\ \_,__/\ \____/ \ \__\ \____/\ \_\
\/_____/\/____/ \/_/ \/_/\/_/\/_/\/___/ \/_/\/_/ \/___/ \/_/\/___/ \/__/ \/_/ \/_/\/___/ \/___/ \/__/\/___/ \/_/
/------------------------------------------------------------------------------------------------------------------------------------/
@version ###VERSION###
@created ###CREATIONDATE###
@package ###Component_name###
@subpackage ###FILENAME###
@author ###AUTHOR### <###AUTHORWEBSITE###>###CONTRIBUTORS###
@copyright ###COPYRIGHT###
@license ###LICENSE###
###SHORT_DESCRIPTION###
/----------------------------------------------------------------------------------------------------------------------------------*/

View File

@ -110,6 +110,19 @@ abstract class ###Component###Helper
###SUBMENU###
}###HELPER_CREATEUSER### ###HELPER_UIKIT### ###HELPER_EXEL###
/**
* Get a Variable
*
* @param string $table The table from which to get the variable
* @param string $where The value where
* @param string $whereString The target/field string where/name
* @param string $what The return field
* @param string $operator The operator between $whereString/field and $where/value
* @param string $main The component in which the table is found
*
* @return mix string/int/float
*
*/
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
{
if(!$where)
@ -150,6 +163,20 @@ abstract class ###Component###Helper
return false;
}
/**
* Get array of variables
*
* @param string $table The table from which to get the variables
* @param string $where The value where
* @param string $whereString The target/field string where/name
* @param string $what The return field
* @param string $operator The operator between $whereString/field and $where/value
* @param string $main The component in which the table is found
* @param bool $unique The switch to return a unique array
*
* @return array
*
*/
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
{
if(!$where)
@ -618,28 +645,141 @@ abstract class ###Component###Helper
return JAccess::getAssetRules(0);
}
/**
* xmlAppend
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
*
* @return null
*
*/
public static function xmlAppend(&$xml, $node)
{
if (!$node)
{
// element was not returned
return;
}
switch (get_class($node))
{
case 'stdClass':
if (property_exists($node, 'comment'))
{
self::xmlComment($xml, $node->comment);
}
if (property_exists($node, 'fieldXML'))
{
self::xmlAppend($xml, $node->fieldXML);
}
break;
case 'SimpleXMLElement':
$domXML = dom_import_simplexml($xml);
$domNode = dom_import_simplexml($node);
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
$xml = simplexml_import_dom($domXML);
break;
}
}
/**
* xmlComment
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param string $comment The comment to inject
*
* @return null
*
*/
public static function xmlComment(&$xml, $comment)
{
$domXML = dom_import_simplexml($xml);
$domComment = new DOMComment($comment);
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
$domXML->appendChild($nodeTarget);
$xml = simplexml_import_dom($domXML);
}
/**
* xmlAddAttributes
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $attributes The attributes to apply to the XML element
*
* @return null
*
*/
public static function xmlAddAttributes(&$xml, $attributes = array())
{
foreach ($attributes as $key => $value)
{
$xml->addAttribute($key, $value);
}
}
/**
* xmlAddOptions
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $options The options to apply to the XML element
*
* @return void
*
*/
public static function xmlAddOptions(&$xml, $options = array())
{
foreach ($options as $key => $value)
{
$addOption = $xml->addChild('option');
$addOption->addAttribute('value', $key);
$addOption[] = $value;
}
}
/**
* Render Bool Button
*
* @param array $args All the args for the button
* 0) name
* 1) additional (options class) // not used at this time
* 2) default
* 3) yes (name)
* 4) no (name)
*
* @return string The input html of the button
*
*/
public static function renderBoolButton()
{
$args = func_get_args();
// check if there is additional button class
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
// start the xml
$buttonXML = new SimpleXMLElement('<field/>');
// button attributes
$buttonAttributes = array(
'type' => 'radio',
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
'class' => 'btn-group',
'filter' => 'INT',
'default' => isset($args[2]) ? (int) $args[2] : 0);
// load the haskey attributes
self::xmlAddAttributes($buttonXML, $buttonAttributes);
// set the button options
$buttonOptions = array(
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
// load the button options
self::xmlAddOptions($buttonXML, $buttonOptions);
// get the radio element
$button = JFormHelper::loadFieldType('radio');
// setup the properties
$name = self::htmlEscape($args[0]);
$additional = isset($args[1]) ? (string) $args[1] : '';
$value = $args[2];
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
// prepare the xml
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
// run
$button->setup($element, $value);
$button->setup($buttonXML, $buttonAttributes['default']);
return $button->input;
}
/**

View File

@ -291,30 +291,156 @@ abstract class ###Component###Helper
return JAccess::getAssetRules(0);
}
/**
* xmlAppend
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
*
* @return null
*
*/
public static function xmlAppend(&$xml, $node)
{
if (!$node)
{
// element was not returned
return;
}
switch (get_class($node))
{
case 'stdClass':
if (property_exists($node, 'comment'))
{
self::xmlComment($xml, $node->comment);
}
if (property_exists($node, 'fieldXML'))
{
self::xmlAppend($xml, $node->fieldXML);
}
break;
case 'SimpleXMLElement':
$domXML = dom_import_simplexml($xml);
$domNode = dom_import_simplexml($node);
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
$xml = simplexml_import_dom($domXML);
break;
}
}
/**
* xmlComment
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param string $comment The comment to inject
*
* @return null
*
*/
public static function xmlComment(&$xml, $comment)
{
$domXML = dom_import_simplexml($xml);
$domComment = new DOMComment($comment);
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
$domXML->appendChild($nodeTarget);
$xml = simplexml_import_dom($domXML);
}
/**
* xmlAddAttributes
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $attributes The attributes to apply to the XML element
*
* @return null
*
*/
public static function xmlAddAttributes(&$xml, $attributes = array())
{
foreach ($attributes as $key => $value)
{
$xml->addAttribute($key, $value);
}
}
/**
* xmlAddOptions
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $options The options to apply to the XML element
*
* @return void
*
*/
public static function xmlAddOptions(&$xml, $options = array())
{
foreach ($options as $key => $value)
{
$addOption = $xml->addChild('option');
$addOption->addAttribute('value', $key);
$addOption[] = $value;
}
}
/**
* Render Bool Button
*
* @param array $args All the args for the button
* 0) name
* 1) additional (options class) // not used at this time
* 2) default
* 3) yes (name)
* 4) no (name)
*
* @return string The input html of the button
*
*/
public static function renderBoolButton()
{
$args = func_get_args();
// check if there is additional button class
$additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time
// start the xml
$buttonXML = new SimpleXMLElement('<field/>');
// button attributes
$buttonAttributes = array(
'type' => 'radio',
'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button',
'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway
'class' => 'btn-group',
'filter' => 'INT',
'default' => isset($args[2]) ? (int) $args[2] : 0);
// load the haskey attributes
self::xmlAddAttributes($buttonXML, $buttonAttributes);
// set the button options
$buttonOptions = array(
'1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES',
'0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO');
// load the button options
self::xmlAddOptions($buttonXML, $buttonOptions);
// get the radio element
$button = JFormHelper::loadFieldType('radio');
// setup the properties
$name = self::htmlEscape($args[0]);
$additional = isset($args[1]) ? (string) $args[1] : '';
$value = $args[2];
$yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES';
$no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO';
// prepare the xml
$element = new SimpleXMLElement('<field name="'.$name.'" type="radio" class="btn-group"><option '.$additional.' value="0">'.$no.'</option><option '.$additional.' value="1">'.$yes.'</option></field>');
// run
$button->setup($element, $value);
$button->setup($buttonXML, $buttonAttributes['default']);
return $button->input;
}###HELPER_UIKIT### ###HELPER_CREATEUSER###
/**
* Get a variable
*
* @param string $table The table from which to get the variable
* @param string $where The value where
* @param string $whereString The target/field string where/name
* @param string $what The return field
* @param string $operator The operator between $whereString/field and $where/value
* @param string $main The component in which the table is found
*
* @return mix string/int/float
*
*/
public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
{
if(!$where)
@ -355,6 +481,20 @@ abstract class ###Component###Helper
return false;
}
/**
* Get array of variables
*
* @param string $table The table from which to get the variables
* @param string $where The value where
* @param string $whereString The target/field string where/name
* @param string $what The return field
* @param string $operator The operator between $whereString/field and $where/value
* @param string $main The component in which the table is found
* @param bool $unique The switch to return a unique array
*
* @return array
*
*/
public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true)
{
if(!$where)

View File

@ -43,7 +43,7 @@ class JFormField###Type### extends JFormFieldList
*
* @var string
*/
public $type = '###type###'; ###ADD_BUTTON###
public $type = '###type###';###ADD_BUTTON###
/**
* Method to get a list of options for a list input.

View File

@ -26,22 +26,17 @@ defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
namespace Joomla\CMS\Form\Rule;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Form\FormRule;
use Joomla\Registry\Registry;
// import Joomla formrule library
jimport('joomla.form.formrule');
/**
* Form Rule class for the Joomla Framework.
* Form Rule (###Name###) class for the Joomla Platform.
*/
class JFormRule###Name### extends JFormRule
{
/**
* The regular expression.
*
* @access protected
* @var string
* @since 2.5
*/
protected $regex = '^[^_]+$';
class JFormRule###Name### extends FormRule
{###VALIDATION_RULE_METHODS###
}

View File

@ -265,7 +265,7 @@ class ###Component###Table###View### extends JTable
}
}
// check if there are any view values remaining
if (count($_result))
if (count( (array) $_result))
{
$_result = json_encode($_result);
$_result = array($_result);

View File

@ -99,4 +99,4 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>###VIEWS_FOOTER_SCRIPT###

View File

@ -61,6 +61,21 @@
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
<!-- Language Field. Type: Lang. (custom) -->
<field
type="lang"
name="language"
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
class="list_class"
multiple="false"
default="0"
required="true"
button="true"
/>
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
<field
type="number"
@ -74,8 +89,8 @@
max="100"
step="10"
/>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
<field
type="list"
@ -92,8 +107,8 @@
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Api Field. Type: User. (joomla) -->
<field
type="user"
@ -152,8 +167,8 @@
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<field name="autorTitle"
type="spacer"
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
@ -572,8 +587,105 @@
/>
</fieldset>
<fieldset
name="cronjob_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_CRONJOB">
name="development_method_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD">
<!-- Development_method Field. Type: Radio. (joomla) -->
<field
type="radio"
name="development_method"
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_EXPANSION</option>
</field>
<!-- Note_development_method_default Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_default" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_default" showon="development_method:1" />
<!-- Note_development_method_expansion Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_expansion" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_expansion" showon="development_method:2" />
<!-- Expansion Field. Type: Subform. (joomla) -->
<field
type="subform"
name="expansion"
label="COM_COMPONENTBUILDER_CONFIG_EXPANSION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
description="COM_COMPONENTBUILDER_CONFIG_EXPANSION_DESCRIPTION"
icon="list"
max="50"
min="1"
showon="development_method:2">
<form hidden="true" name="list_expansion_modal" repeat="true">
<!-- Component Field. Type: Component. (custom) -->
<field
type="component"
name="component"
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Backup Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="backup"
label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION"
class="inputbox"
/>
<!-- Repository Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="repository"
label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION"
class="inputbox"
/>
<!-- Placeholders Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="placeholders"
label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION"
class="inputbox"
/>
</form>
</field>
<!-- Return_options_build Field. Type: Radio. (joomla) -->
<field
type="radio"
name="return_options_build"
label="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="2"
showon="development_method:2">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DISPLAY_MESSAGE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN</option>
</field>
<!-- Expansioncronjob_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="expansioncronjob_note" label="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_DESCRIPTION" heading="h4" class="expansioncronjob_note" showon="development_method:2" />
</fieldset>
<fieldset
name="auto_backup_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP">
<!-- Backupcronjob_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="backupcronjob_note" label="COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_DESCRIPTION" heading="h4" class="backupcronjob_note" />

View File

@ -117,6 +117,7 @@ class ComponentbuilderController extends JControllerLegacy
'custom_code' => 'custom_codes',
'library' => 'libraries',
'snippet' => 'snippets',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'fieldtype' => 'fieldtypes',
'language_translation' => 'language_translations',

View File

@ -53,6 +53,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getButtonID', 'ajax');
$this->registerTask('getAjaxDisplay', 'ajax');
$this->registerTask('getLinked', 'ajax');
$this->registerTask('checkAliasField', 'ajax');
$this->registerTask('templateDetails', 'ajax');
$this->registerTask('getLayoutDetails', 'ajax');
$this->registerTask('dbTableColumns', 'ajax');
@ -60,7 +61,11 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getDynamicValues', 'ajax');
$this->registerTask('checkFunctionName', 'ajax');
$this->registerTask('usedin', 'ajax');
$this->registerTask('getExistingValidationRuleCode', 'ajax');
$this->registerTask('getValidationRulesTable', 'ajax');
$this->registerTask('checkRuleName', 'ajax');
$this->registerTask('fieldOptions', 'ajax');
$this->registerTask('getFieldPropertyDesc', 'ajax');
$this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax');
$this->registerTask('getSnippets', 'ajax');
@ -349,9 +354,10 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($typeValue && $user->id != 0)
$sizeValue = $jinput->get('size', NULL, 'INT');
if($typeValue && $sizeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getButton($typeValue);
$result = $this->getModel('ajax')->getButton($typeValue, $sizeValue);
}
else
{
@ -497,6 +503,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'checkAliasField':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'INT');
if($typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkAliasField($typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'templateDetails':
try
{
@ -771,6 +815,121 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getExistingValidationRuleCode':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$nameValue = $jinput->get('name', NULL, 'WORD');
if($nameValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getExistingValidationRuleCode($nameValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getValidationRulesTable':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getValidationRulesTable($idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'checkRuleName':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$nameValue = $jinput->get('name', NULL, 'STRING');
$idValue = $jinput->get('id', NULL, 'INT');
if($nameValue && $idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkRuleName($nameValue, $idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'fieldOptions':
try
{
@ -809,6 +968,45 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getFieldPropertyDesc':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$propertyValue = $jinput->get('property', NULL, 'WORD');
$fieldtypeValue = $jinput->get('fieldtype', NULL, 'ALNUM');
if($propertyValue && $fieldtypeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getFieldPropertyDesc($propertyValue, $fieldtypeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'snippetDetails':
try
{

View File

@ -66,17 +66,18 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
if($user->authorise('core.admin', 'com_componentbuilder'))
{
// get the post values
$jinput = JFactory::getApplication()->input;
$componentId = $jinput->post->get('component', 0, 'INT');
$version = $jinput->post->get('version', 0, 'INT');
$addBackup = $jinput->post->get('backup', 0, 'INT');
$addRepo = $jinput->post->get('repository', 0, 'INT');
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
$jinput = JFactory::getApplication()->input;
$componentId = $jinput->post->get('component', 0, 'INT');
$version = $jinput->post->get('version', 0, 'INT');
$addBackup = $jinput->post->get('backup', 0, 'INT');
$addRepo = $jinput->post->get('repository', 0, 'INT');
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
$minify = $jinput->post->get('minify', 2, 'INT');
// include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
$model = $this->getModel('compiler');
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr))
$model = $this->getModel('compiler');
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr, $minify))
{
$cache = JFactory::getCache('mod_menu');
$cache->clean();
@ -88,8 +89,8 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
}
$app = JFactory::getApplication();
$redirect_url = $app->getUserState('com_componentbuilder.redirect_url');
$message = $app->getUserState('com_componentbuilder.message');
$redirect_url = $app->getUserState('com_componentbuilder.redirect_url');
$message = $app->getUserState('com_componentbuilder.message');
if (empty($redirect_url) && $componentId > 0)
{
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
@ -193,7 +194,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$lang->load($extension, $base_dir, $language_tag, $reload);
$message = '('.$fileName.'.zip) file was also removed from tmp!';
$this->setRedirect($redirect_url,$message,'message');
return $model->install($fileName.'.zip');;
return $model->install($fileName.'.zip');
}
}
$this->setRedirect($redirect_url,$message,'error');

View File

@ -111,8 +111,6 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
public function smartImport()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
@ -400,6 +398,56 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
return;
}
public function cloner()
{
// Get the model
$model = $this->getModel('Joomla_components');
// check if export is allowed for this user.
$model->user = JFactory::getUser();
if ($model->user->authorise('joomla_component.cloner', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// check if there is any selections
if (!ComponentbuilderHelper::checkArray($pks))
{
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
// only one component allowed at this time
elseif (count( (array) $pks) !== 1)
{
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
// set the active type
$model->activeType = 'clone';
// clone the component and the views and the fields... everything linked to the component.
if ($model->cloner($pks))
{
// clone was successful
$message = JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message);
return;
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_CLONE_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
protected function getApiUser()
{
// admin area does not have API user, only front-end (so we fallback on login user)

View File

@ -107,5 +107,31 @@ class ComponentbuilderControllerLanguages extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=languages', false), $message, 'error');
return;
}
}
public function buildLanguages()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
if($user->authorise('core.create', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('languages');
if ($model->buildLanguages())
{
// set success message
$message = '<h1>'.JText::_('COM_COMPONENTBUILDER_IMPORT_SUCCESS').'</h1>';
$message .= '<p>'.JText::_('COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED').'</p>';
// set redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=languages', false);
$this->setRedirect($redirect_url, $message);
}
}
// set redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=languages', false);
$this->setRedirect($redirect_url);
return false;
}
}

View File

@ -0,0 +1,326 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rule.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
/**
* Validation_rule Controller
*/
class ComponentbuilderControllerValidation_rule extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'Validation_rules'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Access check.
$access = JFactory::getUser()->authorise('validation_rule.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return JFactory::getUser()->authorise('validation_rule.create', $this->option);
}
/**
* 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.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('validation_rule.access', 'com_componentbuilder.validation_rule.' . (int) $recordId) && $user->authorise('validation_rule.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('validation_rule.edit', 'com_componentbuilder.validation_rule.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('validation_rule.edit.own', 'com_componentbuilder.validation_rule.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('validation_rule.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('validation_rule.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 12.2
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
$tmpl = $this->input->get('tmpl');
$layout = $this->input->get('layout', 'edit', 'string');
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// Setup redirect info.
$append = '';
if ($refid)
{
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
}
elseif ($ref)
{
$append .= '&ref='.(string)$ref;
}
if ($tmpl)
{
$append .= '&tmpl=' . $tmpl;
}
if ($layout)
{
$append .= '&layout=' . $layout;
}
if ($recordId)
{
$append .= '&' . $urlVar . '=' . $recordId;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Validation_rule', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
$cancel = parent::cancel($key);
if ($cancel)
{
if ($this->refid)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
}
else
{
// Redirect to the items screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referal details
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
if ($this->ref || $this->refid)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
if ($this->refid && $saved)
{
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref && $saved)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* 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.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,111 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage validation_rules.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');
/**
* Validation_rules Controller
*/
class ComponentbuilderControllerValidation_rules extends JControllerAdmin
{
protected $text_prefix = 'COM_COMPONENTBUILDER_VALIDATION_RULES';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Validation_rule', $prefix = 'ComponentbuilderModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('validation_rule.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Validation_rules');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Validation_rules_'.$date->format('jS_F_Y'),'Validation rules exported ('.$date->format('jS F, Y').')','validation rules');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('validation_rule.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Validation_rules');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('validation_rule_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'validation_rules');
$session->set('dataType_VDM_IMPORTINTO', 'validation_rule');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return;
}
}

View File

@ -72,12 +72,12 @@ class Compiler extends Infusion
$comConfig = JFactory::getConfig();
$this->tempPath = $comConfig->get('tmp_path');
// set some folder paths in relation to distribution
if ($config['addBackup'])
if ($config['backup'])
{
$this->backupPath = $this->params->get('backup_folder_path', $this->tempPath) . '/' . $this->componentBackupName . '.zip';
$this->dynamicIntegration = true;
}
if ($config['addRepo'])
if ($config['repository'])
{
$this->repoPath = $this->params->get('git_folder_path', null);
}
@ -170,7 +170,7 @@ class Compiler extends Infusion
foreach ($mismatch as $string)
{
$constant = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
$this->app->enqueueMessage(JText::sprintf('The <b>Joomla.JText._(\'%s\')</b> language constant for (%s) does not have a corresponding JText::Script() decalaration.', $constant, $string), 'Warning');
$this->app->enqueueMessage(JText::sprintf('The <b>Joomla.JText._(\'%s\')</b> language constant for <b>%s</b> does not have a corresponding <code>JText::script(\'%s\')</code> decalaration, please add it.', $constant, $string, $string), 'Warning');
}
$this->app->enqueueMessage('<hr />', 'Warning');
}
@ -548,7 +548,7 @@ class Compiler extends Infusion
$lineBites[$lineNumber] = (int) mb_strlen($lineContent, '8bit');
if (!$found)
{
$bites = (int) bcadd($lineBites[$lineNumber], $bites);
$bites = (int) $this->bcmath('add', $lineBites[$lineNumber], $bites);
}
if ($found && !$foundEnd)
{
@ -684,12 +684,12 @@ class Compiler extends Infusion
// Add the data
fwrite($fpFile, $data);
// truncate file at the end of the data that was added
$remove = bcadd($position, mb_strlen($data, '8bit'));
$remove = $this->bcmath('add', $position, mb_strlen($data, '8bit'));
ftruncate($fpFile, $remove);
// check if this was a replacement of data
if ($replace)
{
$position = bcadd($position, $replace);
$position = $this->bcmath('add', $position, $replace);
}
// move to the position of the data that should remain below the new data
fseek($fpTemp, $position);

View File

@ -204,7 +204,14 @@ class Get
*
* @var array
*/
public $languages = array('en-GB' => array());
public $languages = array();
/**
* The Main Languages
*
* @var string
*/
public $langTag = 'en-GB';
/**
* The Multi Languages bucket
@ -250,7 +257,8 @@ class Get
'Joomla' . '.JText._(',
'JText:' . ':script(',
'JText:' . ':_(',
'JText:' . ':sprintf('
'JText:' . ':sprintf(',
'JustTEXT:' . ':_('
);
/**
@ -414,6 +422,13 @@ class Get
*/
public $sqlTweak = array();
/**
* The validation rules that should be added
*
* @var array
*/
public $validationRules = array();
/**
* The admin views data array
*
@ -428,6 +443,13 @@ class Get
*/
private $_fieldData = array();
/**
* The custom alias builder
*
* @var array
*/
public $customAliasBuilder = array();
/**
* The field builder type
*
@ -592,6 +614,13 @@ class Get
*/
public $libraries = array();
/**
* Is minify Enabled
*
* @var int
*/
public $minify = 0;
/**
* Is Tidy Enabled
*
@ -616,10 +645,16 @@ class Get
{
// load application
$this->app = JFactory::getApplication();
// check if we have Tidy enabled
$this->tidy = extension_loaded('Tidy');
// Set the params
$this->params = JComponentHelper::getParams('com_componentbuilder');
// set the minfy switch of the JavaScript
$this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0);
// set the global language
$this->langTag = $this->params->get('language', $this->langTag);
// setup the main language array
$this->languages[$this->langTag] = array();
// check if we have Tidy enabled
$this->tidy = extension_loaded('Tidy');
// set the field type builder
$this->fieldBuilderType = $this->params->get('compiler_field_builder_type', 2);
// check the field builder type logic
@ -633,7 +668,7 @@ class Get
// load the compiler path
$this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
// set the component ID
$this->componentID = (int) $config['componentId'];
$this->componentID = (int) $config['component'];
// set this components code name
if ($name_code = ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'name_code'))
{
@ -643,10 +678,10 @@ class Get
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
// set if placeholders should be added to customcode
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false;
$this->addPlaceholders = ((int) $config['addPlaceholders'] == 0) ? false : (((int) $config['addPlaceholders'] == 1) ? true : $global);
$this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
// set if line numbers should be added to comments
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'debug_linenr') == 1) ? true : false;
$this->debugLinenr = ((int) $config['debugLinenr'] == 0) ? false : (((int) $config['debugLinenr'] == 1) ? true : $global);
$this->debugLinenr = ((int) $config['debuglinenr'] == 0) ? false : (((int) $config['debuglinenr'] == 1) ? true : $global);
// set the current user
$this->user = JFactory::getUser();
// Get a db connection.
@ -912,17 +947,19 @@ class Get
// build the admin_views settings
$component->admin_views = array_map(function($array)
{
$array = array_map(function($value)
{
$array = array_map(function($value) {
if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) && strval($value) === strval(intval($value)))
{
return (int) $value;
}
return $value;
}, $array);
// has become a lacacy issue, can't remove this
$array['view'] = $array['adminview'];
$array['settings'] = $this->getAdminViewData($array['view']);
// check if we must add to site
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
{
$this->siteEditView[$array['adminview']] = true;
$this->lang = 'both';
}
if (isset($array['port']) && $array['port'] && !$this->addEximport)
{
$this->addEximport = true;
@ -931,14 +968,14 @@ class Get
{
$this->setTagHistory = true;
}
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
{
$this->siteEditView[$array['adminview']] = true;
}
// has become a lacacy issue, can't remove this
$array['view'] = $array['adminview'];
// get the admin settings/data
$array['settings'] = $this->getAdminViewData($array['view']);
return $array;
}, array_values($component->addadmin_views));
}
// set the site_view data
$component->addsite_views = (isset($component->addsite_views) && ComponentbuilderHelper::checkJson($component->addsite_views)) ? json_decode($component->addsite_views, true) : null;
if (ComponentbuilderHelper::checkArray($component->addsite_views))
@ -1420,7 +1457,7 @@ class Get
$view->fields = array_map(function($field) use($name_single, $name_list)
{
// set hash
static $hash = 1;
static $hash = 123467890; // (TODO) I found this making duplicates
// load hash
$field['hash'] = md5($field['field'] . $hash);
// increment hash
@ -1603,6 +1640,10 @@ class Get
unset($view->addlinked_views);
// set the lang target
$this->lang = 'admin';
if (isset($this->siteEditView[$id]))
{
$this->lang = 'both';
}
// add_javascript
$addArrayJ = array('javascript_view_file', 'javascript_view_footer', 'javascript_views_file', 'javascript_views_footer');
foreach ($addArrayJ as $scripter)
@ -1741,6 +1782,33 @@ class Get
$this->addAjax = true;
}
}
// activate alias builder
if (!isset($this->customAliasBuilder[$name_single]) && isset($view->alias_builder_type) && 2 == $view->alias_builder_type
&& isset($view->alias_builder) && ComponentbuilderHelper::checkJson($view->alias_builder))
{
// get the aliasFields
$alias_fields = (array) json_decode($view->alias_builder, true);
// get the active fields
$alias_fields = (array) array_filter($view->fields, function($field) use($alias_fields) {
// check if field is in view fields
if (in_array($field['field'], $alias_fields))
{
return true;
}
return false;
});
// check if all is well
if (ComponentbuilderHelper::checkArray($alias_fields))
{
// load the field names
$this->customAliasBuilder[$name_single] = (array) array_map(function ($field) use($name_list) {
return $this->getFieldName($field, $name_list);
},$alias_fields
);
}
}
// unset
unset($view->alias_builder);
// add_sql
if ($view->add_sql == 1)
{
@ -2048,7 +2116,7 @@ class Get
// Create a new query object.
$query = $this->db->getQuery(true);
// Order it by the ordering field.
// Select all the values in the field
$query->select('a.*');
$query->select($this->db->quoteName(array('c.name', 'c.properties'), array('type_name', 'properties')));
$query->from('#__componentbuilder_field AS a');
@ -2083,6 +2151,36 @@ class Get
// load the values form params
$field->xml = $this->setDynamicValues(json_decode($field->xml));
// check if we have validate (validation rule set)
$validationRule = ComponentbuilderHelper::getBetween($field->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($validationRule))
{
// make sure it is lowercase
$validationRule = ComponentbuilderHelper::safeString($validationRule);
// make sure it is not already set
if (!isset($this->validationRules[$validationRule]))
{
// get joomla core validation names
if ($coreValidationRules = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
// make sure this rule is not a core validation rule
if (!in_array($validationRule, (array) $coreValidationRules))
{
// get the class methods for this rule if it exists
if ($this->validationRules[$validationRule] = ComponentbuilderHelper::getVar('validation_rule', $validationRule, 'name','php'))
{
// open and set the validation rule
$this->validationRules[$validationRule] = $this->setDynamicValues(base64_decode($this->validationRules[$validationRule]));
}
else
{
// set the notice that this validation rule is custom and was not found (TODO)
}
}
}
}
}
// load the type values form type params
$field->properties = (isset($field->properties) && ComponentbuilderHelper::checkJson($field->properties)) ? json_decode($field->properties, true) : null;
if (ComponentbuilderHelper::checkArray($field->properties))
@ -2186,16 +2284,16 @@ class Get
{
$this->customScriptBuilder['views_footer'] = array();
}
if (!isset($this->customScriptBuilder['views_footer'][$name_list]))
if (!isset($this->customScriptBuilder['views_footer'][$name_single]))
{
$this->customScriptBuilder['views_footer'][$name_list] = '';
$this->customScriptBuilder['views_footer'][$name_single] = '';
}
if (!isset($this->_fieldData[$id]->javascript_views_footer_decoded))
{
$this->_fieldData[$id]->javascript_views_footer = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
$this->_fieldData[$id]->javascript_views_footer_decoded = true;
}
$this->customScriptBuilder['views_footer'][$name_list] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer;
$this->customScriptBuilder['views_footer'][$name_single] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer;
if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
{
@ -3492,11 +3590,11 @@ class Get
/**
* Set Language Place Holders
*
*
* @param string $content The content
*
* @return string The content with the updated Language place holder
*
*
*/
public function setLangStrings($content)
{
@ -3515,11 +3613,17 @@ class Get
{
// insure string is not broken
$content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content);
// first get the Joomla.JText._()
// reset some buckets
$langHolders = array();
$langCheck = array();
$langOnly = array();
$jsTEXT = array();
$scTEXT = array();
// first get the Joomla .JText._()
if (in_array('Joomla' . '.JText._(', $langStringTargets))
{
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla" . ".JText._('", "'");
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla.' . 'JText._("', '"');
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla' . '.JText._("', '"');
// combine into one array
$jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT);
// we need to add a check to insure these JavaScript lang matchup
@ -3545,50 +3649,89 @@ class Get
$this->langMatch = ComponentbuilderHelper::mergeArrays(array($scTEXT, $this->langMatch));
}
}
// now do the little trick for JustTEXT: :_('Just uppercase text');
if (in_array('JustTEXT:' . ':_(', $langStringTargets))
{
$langOnly[] = ComponentbuilderHelper::getAllBetween($content, "JustTEXT:" . ":_('", "')");
$langOnly[] = ComponentbuilderHelper::getAllBetween($content, 'JustTEXT:' . ':_("', '")');
}
// set language data
foreach ($langStringTargets as $langStringTarget)
{
// need some special treatment here
if ($langStringTarget === 'Joomla' . '.JText._(' || $langStringTarget === 'JText:' . ':script(')
if ($langStringTarget === 'Joomla' . '.JText._(' ||
$langStringTarget === 'JText:' . ':script(' ||
$langStringTarget === 'JustTEXT:' . ':_(')
{
continue;
}
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . "'", "'");
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . '"', '"');
}
$langArray = ComponentbuilderHelper::mergeArrays($langCheck);
if (ComponentbuilderHelper::checkArray($langArray)) //<-- not really needed hmmm
// the normal loading of the language strings
$langCheck = ComponentbuilderHelper::mergeArrays($langCheck);
if (ComponentbuilderHelper::checkArray($langCheck)) //<-- not really needed hmmm
{
foreach ($langArray as $string)
foreach ($langCheck as $string)
{
// this is there to insure we dont break already added Language strings
if (ComponentbuilderHelper::safeString($string, 'U') === $string)
if ($keyLang = $this->setLang($string))
{
continue;
}
// only load if string is not already set
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
if (!isset($this->langContent[$this->lang][$keyLang]))
{
$this->langContent[$this->lang][$keyLang] = trim($string);
}
// load the language targets
foreach ($langStringTargets as $langStringTarget)
{
$langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'";
$langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"';
// load the language targets
foreach ($langStringTargets as $langStringTarget)
{
$langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'";
$langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"';
}
}
}
// only continue if we have value to replace
if (isset($langHolders) && ComponentbuilderHelper::checkArray($langHolders))
}
// the uppercase loading only (for arrays and other tricks)
if (ComponentbuilderHelper::checkArray($langOnly))
{
$langOnly = ComponentbuilderHelper::mergeArrays($langOnly);
foreach ($langOnly as $string)
{
$content = $this->setPlaceholders($content, $langHolders);
if ($keyLang = $this->setLang($string))
{
// load the language targets
$langHolders["JustTEXT:" . ":_('" . $string . "')"] = "'" . $keyLang . "'";
$langHolders['JustTEXT:' . ':_("' . $string . '")'] = '"' . $keyLang . '"';
}
}
}
// only continue if we have value to replace
if (ComponentbuilderHelper::checkArray($langHolders))
{
$content = $this->setPlaceholders($content, $langHolders);
}
}
return $content;
}
/**
* Set the language String
*
* @param string $string The plan text string (English)
*
* @return string The key language string (all uppercase)
*
*/
public function setLang($string)
{
// this is there to insure we dont break already added Language strings
if (ComponentbuilderHelper::safeString($string, 'U') === $string)
{
return false;
}
// only load if string is not already set
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
if (!isset($this->langContent[$this->lang][$keyLang]))
{
$this->langContent[$this->lang][$keyLang] = trim($string);
}
return $keyLang;
}
/**
* Set Data Selection of the dynamic get
*
@ -4385,8 +4528,8 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
if (ComponentbuilderHelper::checkArray($values))
{
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.entranslation', 'a.components', 'a.published')));
$query->where($this->db->quoteName('a.entranslation') . ' IN (' . implode(',', array_map(function($a)
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.source', 'a.components', 'a.published')));
$query->where($this->db->quoteName('a.source') . ' IN (' . implode(',', array_map(function($a)
{
return $this->db->quote($a);
}, $values)) . ')');
@ -4394,7 +4537,7 @@ class Get
$this->db->execute();
if ($this->db->getNumRows())
{
return $this->db->loadAssocList('entranslation');
return $this->db->loadAssocList('source');
}
}
return false;
@ -4412,7 +4555,7 @@ class Get
$counterInsert = 0;
$counterUpdate = 0;
$today = JFactory::getDate()->toSql();
foreach ($this->languages['en-GB'] as $area => $placeholders)
foreach ($this->languages[$this->langTag] as $area => $placeholders)
{
foreach ($placeholders as $placeholder => $string)
{
@ -4499,7 +4642,7 @@ class Get
// add the new lang placeholder to the db
$this->newLangStrings[$counterInsert] = array();
$this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components'
$this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'entranslation'
$this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'source'
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'published'
$this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created'
$this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by'
@ -4537,7 +4680,7 @@ class Get
$query = $this->db->getQuery(true);
$continue = false;
// Insert columns.
$columns = array('components', 'entranslation', 'published', 'created', 'created_by', 'version', 'access');
$columns = array('components', 'source', 'published', 'created', 'created_by', 'version', 'access');
// Prepare the insert query.
$query->insert($this->db->quoteName('#__componentbuilder_language_translation'));
$query->columns($this->db->quoteName($columns));
@ -4632,7 +4775,7 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.components')));
// get all string that are not linked to this component
$query->where($this->db->quoteName('a.entranslation') . ' NOT IN (' . implode(',', array_map(function($a)
$query->where($this->db->quoteName('a.source') . ' NOT IN (' . implode(',', array_map(function($a)
{
return $this->db->quote($a);
}, $values)) . ')');
@ -4983,6 +5126,7 @@ class Get
{
$path = $file;
}
// now we go line by line
foreach (new SplFileObject($file) as $lineNumber => $lineContent)
{
// we musk keep last few lines to dynamic find target entry later
@ -5263,7 +5407,7 @@ class Get
}
/**
* search for the system id in the line given
* set the start replace placeholder
*
* @param int $id The comment id
* @param int $commentType The comment type
@ -5294,6 +5438,7 @@ class Get
*
* @param string $lineContent The file path to search
* @param string $placeholders The values to search for
* @param int $commentType The comment type
*
* @return array on success
*
@ -5319,7 +5464,7 @@ class Get
}
/**
* Reverse Engineer the dynamic placeholders (hmmmm)
* Reverse Engineer the dynamic placeholders (TODO hmmmm this is not ideal)
*
* @param string $string The string to revers
* @param int $id The custom code id
@ -5352,13 +5497,13 @@ class Get
// get targets to search for
$langStringTargets = array_filter(
$this->langStringTargets, function($get) use($string)
{
if (strpos($string, $get) !== false)
{
return true;
}
return false;
});
if (strpos($string, $get) !== false)
{
return true;
}
return false;
});
// check if we should continue
if (ComponentbuilderHelper::checkArray($langStringTargets))
{
@ -5413,13 +5558,12 @@ class Get
* @param string $data The actual data
* @param array $placeholder The placeholders
* @param int $action The action to use
* ===================================================
*
* THE ACTION OPTIONS ARE
* ===================================================
* 1 -> Just replace (default)
* 2 -> Check if data string has placeholders
* 3 -> Remove placeholders not in data string
* ===================================================
*
* @param int $langSwitch The lang switch
*
* @return string
@ -5476,7 +5620,7 @@ class Get
}
/**
* return the placeholders for insered and replaced code
* return the placeholders for inserted and replaced code
*
* @param int $type The type of placement
* @param int $id The code id in the system
@ -5588,4 +5732,46 @@ class Get
return false;
}
/**
* bc math wrapper (very basic not for accounting)
*
* @param string $type The type bc math
* @param int $val1 The first value
* @param int $val2 The second value
*
* @return int
*
*/
public function bcmath($type, $val1, $val2)
{
// build function name
$function = 'bc'.$type;
// use the bcmath function of available
if (function_exists($function))
{
return $function($val1, $val2);
}
// if function does not exist we use +-*/ operators (since it realy not that serious)
switch($type)
{
// Multiply two numbers
case 'mul':
return round($val1 * $val2);
break;
// Divide of two numbers
case 'div':
return round($val1 / $val2);
break;
// Adding two numbers
case 'add':
return round($val1 + $val2);
break;
// Subtract one number from the other
case 'add':
return round($val1 - $val2);
break;
}
return false;
}
}

View File

@ -338,9 +338,9 @@ class Structure extends Get
// run global updater
ComponentbuilderHelper::runGlobalUpdater();
// set the Joomla version
$this->joomlaVersion = $config['joomlaVersion'];
$this->joomlaVersion = $config['version'];
// set the template path
$this->templatePath = $this->compilerPath . '/joomla_' . $config['joomlaVersion'];
$this->templatePath = $this->compilerPath . '/joomla_' . $config['version'];
// set some default names
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion;
$this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
@ -1369,6 +1369,8 @@ class Structure extends Get
// set new file to object
$versionData->move->static->$key_pointer = new stdClass();
$versionData->move->static->$key_pointer->naam = $custom['file'];
// update the dynamic component name placholders in file names
$custom['path'] = $this->setPlaceholders($custom['path'], $this->placeholders);
// get the path info
$pathInfo = pathinfo($custom['path']);
if (isset($pathInfo['extension']) && $pathInfo['extension'])

View File

@ -755,8 +755,8 @@ class Fields extends Structure
$XML = new simpleXMLElement('<a/>');
$fieldSetXML = $XML->addChild('fieldset');
$fieldSetXML->addAttribute('name', 'details');
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields.");
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields.");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)");
// if id is not set
if (!isset($this->fieldsNames[$view_name_single]['id']))
{
@ -770,7 +770,7 @@ class Fields extends Structure
'default' => 0
);
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -787,9 +787,9 @@ class Fields extends Structure
'filter' => 'user_utc'
);
$attributes = array_merge($attributes, $readOnlyXML);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -803,9 +803,9 @@ class Fields extends Structure
'description' => $langView . '_CREATED_BY_DESC',
);
$attributes = array_merge($attributes, $readOnlyXML);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -818,9 +818,9 @@ class Fields extends Structure
'label' => 'JSTATUS'
);
$attributes = array_merge($attributes, $readOnlyXML);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value)
@ -844,9 +844,9 @@ class Fields extends Structure
'format' => '%Y-%m-%d %H:%M:%S',
'filter' => 'user_utc'
);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -862,9 +862,9 @@ class Fields extends Structure
'readonly' => 'true',
'filter' => 'unset'
);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -880,9 +880,9 @@ class Fields extends Structure
'required' => "false"
);
$attributes = array_merge($attributes, $readOnlyXML);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -900,9 +900,9 @@ class Fields extends Structure
'required' => "false"
);
$attributes = array_merge($attributes, $readOnlyXML);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -919,9 +919,9 @@ class Fields extends Structure
'readonly' => "true",
'filter' => 'unset'
);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -937,34 +937,34 @@ class Fields extends Structure
'rows' => 3,
'cols' => 30
);
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
// metadesc
$attributes['name'] = 'metadesc';
$attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL';
$attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC';
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)");
$fieldXML = $fieldSetXML->addChild('field');
$this->xmlAddAttributes($fieldXML, $attributes);
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
}
// load the dynamic fields now
if (count($dynamicFieldsXML))
{
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields.");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields.");
foreach ($dynamicFieldsXML as $dynamicfield)
{
$this->xmlAppend($fieldSetXML, $dynamicfield);
ComponentbuilderHelper::xmlAppend($fieldSetXML, $dynamicfield);
}
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
{
$this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields");
ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields");
$fieldsXML = $fieldSetXML->addChild('fields');
$fieldsXML->addAttribute('name', 'metadata');
$fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
@ -972,7 +972,7 @@ class Fields extends Structure
$fieldsFieldSetXML->addAttribute('name', 'vdmmetadata');
$fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
// robots
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
$robots = $fieldsFieldSetXML->addChild('field');
$attributes = array(
'name' => 'robots',
@ -980,7 +980,7 @@ class Fields extends Structure
'label' => 'JFIELD_METADATA_ROBOTS_LABEL',
'description' => 'JFIELD_METADATA_ROBOTS_DESC'
);
$this->xmlAddAttributes($robots, $attributes);
ComponentbuilderHelper::xmlAddAttributes($robots, $attributes);
// count the static field created
$this->fieldCount++;
$options = array(
@ -997,7 +997,7 @@ class Fields extends Structure
$option[] = $text;
}
// author
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
$author = $fieldsFieldSetXML->addChild('field');
$attributes = array(
'name' => 'author',
@ -1006,11 +1006,11 @@ class Fields extends Structure
'description' => 'JFIELD_METADATA_AUTHOR_DESC',
'size' => 20
);
$this->xmlAddAttributes($author, $attributes);
ComponentbuilderHelper::xmlAddAttributes($author, $attributes);
// count the static field created
$this->fieldCount++;
// rights
$this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
$rights = $fieldsFieldSetXML->addChild('field');
$attributes = array(
'name' => 'rights',
@ -1022,7 +1022,7 @@ class Fields extends Structure
'cols' => 30,
'rows' => 2
);
$this->xmlAddAttributes($rights, $attributes);
ComponentbuilderHelper::xmlAddAttributes($rights, $attributes);
// count the static field created
$this->fieldCount++;
}
@ -1581,7 +1581,7 @@ class Fields extends Structure
}
elseif ($property === 'option')
{
$this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set.");
ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set.");
if (strpos($value, ',') !== false)
{
// mulitpal options
@ -1644,7 +1644,7 @@ class Fields extends Structure
}
if (!$field->fieldXML->count())
{
$this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings.");
ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings.");
}
}
elseif ($setType === 'plain')
@ -1733,12 +1733,12 @@ class Fields extends Structure
if ($this->defaultField($r_typeName, 'option'))
{
// now add to the field set
$this->xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif ($this->defaultField($r_typeName, 'plain'))
{
// now add to the field set
$this->xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
@ -1746,7 +1746,7 @@ class Fields extends Structure
$custom = $r_fieldValues['custom'];
unset($r_fieldValues['custom']);
// now add to the field set
$this->xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
// add to lang array
@ -1794,7 +1794,7 @@ class Fields extends Structure
'name' => 'list_' . $fieldAttributes['name'] . '_modal',
'repeat' => 'true'
);
$this->xmlAddAttributes($form, $attributes);
ComponentbuilderHelper::xmlAddAttributes($form, $attributes);
if (strpos($fieldAttributes['fields'], ',') !== false)
{
@ -1830,12 +1830,12 @@ class Fields extends Structure
if ($this->defaultField($r_typeName, 'option'))
{
// now add to the field set
$this->xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif ($this->defaultField($r_typeName, 'plain'))
{
// now add to the field set
$this->xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
@ -1843,7 +1843,7 @@ class Fields extends Structure
$custom = $r_fieldValues['custom'];
unset($r_fieldValues['custom']);
// now add to the field set
$this->xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
// add to lang array
@ -2013,7 +2013,18 @@ class Fields extends Structure
// set the decoding methods
if (in_array($set, $decode))
{
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => $set, 'type' => $type);
if (isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]) &&
isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']))
{
if (!in_array($set, $this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']))
{
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode'][] = $set;
}
}
else
{
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => array($set), 'type' => $type);
}
}
// set the uikit checker
if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $textareas))
@ -2083,6 +2094,15 @@ class Fields extends Structure
// get the actual field name
$xmlValue = $this->setPlaceholders($name, $placeholders);
}
elseif ($property['name'] === 'validate')
{
// check if we have validate (validation rule set)
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($xmlValue))
{
$xmlValue = ComponentbuilderHelper::safeString($xmlValue);
}
}
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
{
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
@ -2151,6 +2171,15 @@ class Fields extends Structure
{
// dont load the button to repeatable
$xmlValue = 'false';
// do not add button
$fieldAttributes['custom']['add_button'] = 'false';
}
elseif ($property['name'] === 'button' && $setCustom)
{
// dont load the button to repeatable
$xmlValue = (string) ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'button="', '"'));
// add to custom values
$fieldAttributes['custom']['add_button'] = (ComponentbuilderHelper::checkString($xmlValue) || 1 == $xmlValue) ? $xmlValue: 'false';
}
elseif ($property['name'] === 'required' && $repeatable)
{
@ -2290,6 +2319,16 @@ class Fields extends Structure
{
$fieldAttributes['display'] = $display;
}
// make sure validation is set if found (even it not part of field properties)
if (!isset($fieldAttributes['validate']))
{
// check if we have validate (validation rule set)
$validationRule = ComponentbuilderHelper::getBetween($field['settings']->xml, 'validate="', '"');
if (ComponentbuilderHelper::checkString($validationRule))
{
$fieldAttributes['validate'] = ComponentbuilderHelper::safeString($validationRule);
}
}
}
}
return $fieldAttributes;
@ -2315,12 +2354,19 @@ class Fields extends Structure
*/
public function setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false)
{
if ($typeName === 'tag')
// dbSwitch
$dbSwitch = true;
if (isset($field['list']) && $field['list'] == 2)
{
// do not add this field to the database
$dbSwitch = false;
}
elseif ($typeName === 'tag')
{
// set tags for this view but don't load to DB
$this->tagsBuilder[$view_name_single] = $view_name_single;
}
else
elseif (isset($field['settings']->datatype))
{
// insure default not none if number type
$intKeys = array('INT', 'TINYINT', 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE');
@ -2374,12 +2420,12 @@ class Fields extends Structure
$this->historyBuilder[$view_name_single] = $view_name_single;
}
// set Alias (only one title per view)
if (isset($field['alias']) && $field['alias'])
if ($dbSwitch && isset($field['alias']) && $field['alias'] && !isset($this->aliasBuilder[$view_name_single]))
{
$this->aliasBuilder[$view_name_single] = $name;
}
// set Titles (only one title per view)
if (isset($field['title']) && $field['title'])
if ($dbSwitch && isset($field['title']) && $field['title'] && !isset($this->titleBuilder[$view_name_single]))
{
$this->titleBuilder[$view_name_single] = $name;
}
@ -2439,7 +2485,7 @@ class Fields extends Structure
$this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"';
}
// set all int fields of this view
if ($field['settings']->datatype === 'INT' || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT')
if ($dbSwitch && isset($field['settings']->datatype) && ($field['settings']->datatype === 'INT' || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT'))
{
if (!isset($this->intFieldsBuilder[$view_name_single]))
{
@ -2465,7 +2511,7 @@ class Fields extends Structure
}
// TODO we may need to add a switch instead (since now it uses the first editor field)
// set the main(biggest) text field of this view
if ($typeName === 'editor')
if ($dbSwitch && $typeName === 'editor')
{
if (!isset($this->maintextBuilder[$view_name_single]) || !ComponentbuilderHelper::checkString($this->maintextBuilder[$view_name_single]))
{
@ -2497,7 +2543,7 @@ class Fields extends Structure
$this->setScriptMediaSwitch[$typeName] = $typeName;
}
// setup gategory for this view
if ($typeName === 'category')
if ($dbSwitch && $typeName === 'category')
{
if (isset($this->catOtherName[$view_name_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$view_name_list]))
{
@ -2514,13 +2560,14 @@ class Fields extends Structure
$this->catCodeBuilder[$view_name_single] = array('code' => $name, 'views' => $otherViews, 'view' => $otherView);
}
// setup checkbox for this view
if ($typeName === 'checkbox' || (ComponentbuilderHelper::checkArray($custom) && isset($custom['extends']) && $custom['extends'] === 'checkboxes'))
if ($dbSwitch && ($typeName === 'checkbox' || (ComponentbuilderHelper::checkArray($custom) && isset($custom['extends']) && $custom['extends'] === 'checkboxes')))
{
$this->checkboxBuilder[$view_name_single][] = $name;
}
// setup checkboxes and other json items for this view
if (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag')
if ($dbSwitch && (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag'))
{
$subformJsonSwitch = true;
switch ($field['settings']->store)
{
case 1:
@ -2558,6 +2605,8 @@ class Fields extends Structure
$this->jsonItemBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
// no londer add the json again (already added)
$subformJsonSwitch = false;
break;
}
// just a heads-up for usergroups set to multiple
@ -2579,14 +2628,23 @@ class Fields extends Structure
}
}
// if subform the values must revert to array
// subform house keeping
if ('subform' === $typeName)
{
// the values must revert to array
$this->jsonItemBuilderArray[$view_name_single][] = $name;
// should the json builder still be added
if ($subformJsonSwitch)
{
// and insure the if is converted to json
$this->jsonItemBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
}
}
}
// build the data for the export & import methods $typeName === 'repeatable' ||
if (($typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options))
if ($dbSwitch && (($typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options)))
{
$this->getItemsMethodEximportStringFixBuilder[$view_name_single][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store);
}
@ -2598,18 +2656,18 @@ class Fields extends Structure
$this->selectionTranslationFixBuilder[$view_name_list][$name] = $options;
}
// build the sort values
if ((isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
$this->sortBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options);
}
// build the search values
if (isset($field['search']) && $field['search'] == 1)
if ($dbSwitch && isset($field['search']) && $field['search'] == 1)
{
$_list = (isset($field['list'])) ? $field['list'] : 0;
$this->searchBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list);
}
// build the filter values
if ((isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
$this->filterBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $view_name_single, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options);
}
@ -2628,6 +2686,16 @@ class Fields extends Structure
$this->setLayoutBuilder($view_name_single, $tabName, $name, $field);
}
/**
* set Custom Field Type File
*
* @param array $data The field complete data set
* @param string $view_name_list The list view code name
* @param string $view_name_single The single view code name
*
* @return void
*
*/
public function setCustomFieldTypeFile($data, $view_name_list, $view_name_single)
{
// make sure it is not already been build or if it is prime
@ -2681,11 +2749,12 @@ class Fields extends Structure
{
$phpCode = 'return null;';
}
// catch empty stuff
if (!ComponentbuilderHelper::checkString($phpCode))
{
$phpCode = 'return null;';
}
// some house cleaning for users
if ($data['custom']['extends'] === 'user')
{
// now load the php xclude script
@ -2742,10 +2811,203 @@ class Fields extends Structure
// ###type### <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' . $data['type']]['###type###'] = $data['custom']['type'];
// ###type### <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' . $data['type']]['###ADD_BUTTON###'] = $this->setAddButttonToListField($data['custom']['view'], $data['custom']['views']);
$this->fileContentDynamic['customfield_' . $data['type']]['###ADD_BUTTON###'] = $this->setAddButtonToListField($data['custom']);
}
}
/**
* set Add Button To List Field (getInput tweak)
*
* @param array $fieldData The field custom data
*
* @return string of getInput class on success empty string otherwise
*
*/
protected function setAddButtonToListField($fieldData)
{
// make sure hte view values are set
if (isset($fieldData['add_button']) && ($fieldData['add_button'] === 'true' || 1 == $fieldData['add_button']) &&
isset($fieldData['view']) && isset($fieldData['views']) &&
ComponentbuilderHelper::checkString($fieldData['view']) && ComponentbuilderHelper::checkString($fieldData['views']))
{
// check that the component value is set
if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component']))
{
$fieldData['component'] = "com_" . $this->fileContentStatic['###component###'];
}
// check that the componet has the com_ value in it
if (strpos($fieldData['component'], 'com_') === false || strpos($fieldData['component'], '=') !== false)
{
$fieldData['component'] = "com_" . $fieldData['component'];
}
// make sure the component is update if ### or [[[ component placeholder is used
if (strpos($fieldData['component'], '###') !== false || strpos($fieldData['component'], '[[[') !== false ) // should not be needed... but
{
$fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders);
}
// get core permissions
$coreLoad = false;
// add ref tags
$refLoad = true;
if (isset($this->permissionCore[$fieldData['view']]))
{
// get the core permission naming array
$core = $this->permissionCore[$fieldData['view']];
// set switch to activate easy update
$coreLoad = true;
// since the view is local to the component use this component name
$component = "com_" . $this->fileContentStatic['###component###'];
}
else
{
// fall back on the field component
$component = $fieldData['component'];
}
// check if we should add ref tags
if ($fieldData['component'] !== $component)
{
// do not add ref tags
$refLoad = false;
}
// start building the add buttons/s
$addButton = array();
$addButton[] = PHP_EOL . PHP_EOL . "\t/**";
$addButton[] = "\t * Override to add new button";
$addButton[] = "\t *";
$addButton[] = "\t * @return string The field input markup.";
$addButton[] = "\t *";
$addButton[] = "\t * @since 3.2";
$addButton[] = "\t */";
$addButton[] = "\tprotected function getInput()";
$addButton[] = "\t{";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " see if we should add buttons";
$addButton[] = "\t\t\$setButton = \$this->getAttribute('button');";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " get html";
$addButton[] = "\t\t\$html = parent::getInput();";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " if true set button";
$addButton[] = "\t\tif (\$setButton === 'true')";
$addButton[] = "\t\t{";
$addButton[] = "\t\t\t\$button = array();";
$addButton[] = "\t\t\t\$script = array();";
$addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the input from url";
$addButton[] = "\t\t\t\$app = JFactory::getApplication();";
$addButton[] = "\t\t\t\$jinput = \$app->input;";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the view name & id";
$addButton[] = "\t\t\t\$values = \$jinput->getArray(array(";
$addButton[] = "\t\t\t\t'id' => 'int',";
$addButton[] = "\t\t\t\t'view' => 'word'";
$addButton[] = "\t\t\t));";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if new item";
$addButton[] = "\t\t\t\$ref = '';";
$addButton[] = "\t\t\t\$refJ = '';";
if ($refLoad)
{
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " only load referal if not new item.";
$addButton[] = "\t\t\t\t\$ref = '&amp;ref=' . \$values['view'] . '&amp;refid=' . \$values['id'];";
$addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
$addButton[] = "\t\t\t}";
}
else
{
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " get the return value.";
$addButton[] = "\t\t\t\t\$_uri = (string) JUri::getInstance();";
$addButton[] = "\t\t\t\t\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " load return value.";
$addButton[] = "\t\t\t\t\$ref = '&amp;return=' . \$_return;";
$addButton[] = "\t\t\t\t\$refJ = '&return=' . \$_return;";
$addButton[] = "\t\t\t}";
}
$addButton[] = "\t\t\t\$user = JFactory::getUser();";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions.
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.create']]))
{
$addButton[] = "\t\t\tif (\$user->authorise('" . $core['core.create'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif (\$user->authorise('core.create', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build Create button";
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = "\t\t\t\t\thref=\"index.php?option=" . $fieldData['component'] . "&amp;view=" . $fieldData['view'] . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $fieldData['view'];
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build edit button";
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script";
$addButton[] = "\t\t\t\t\$script[] = \"";
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
$addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
$addButton[] = "\t\t\t\t\t\t\te.preventDefault();";
$addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {";
$addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int)
$addButton[] = "\t\t\t\t\t\t\t// hide the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();";
$addButton[] = "\t\t\t\t\t\t\t// show edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();";
$addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);";
$addButton[] = "\t\t\t\t\t\t} else {";
$addButton[] = "\t\t\t\t\t\t\t// show the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();";
$addButton[] = "\t\t\t\t\t\t\t// hide edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();";
$addButton[] = "\t\t\t\t\t\t}";
$addButton[] = "\t\t\t\t\t}\";";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if button was created for " . $fieldData['view'] . " field.";
$addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Load the needed script.";
$addButton[] = "\t\t\t\t\$document = JFactory::getDocument();";
$addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " return the button attached to input field.";
$addButton[] = "\t\t\t\treturn '<div class=\"input-append\">' .\$html . implode('',\$button).'</div>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t}";
$addButton[] = "\t\treturn \$html;";
$addButton[] = "\t}";
return implode(PHP_EOL, $addButton);
}
return '';
}
/**
* default Fields
*
@ -2798,78 +3060,6 @@ class Fields extends Structure
return false;
}
/**
* xmlComment
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param string $comment The comment to inject
*
* @return null
*
*/
public function xmlComment(&$xml, $comment)
{
$domXML = dom_import_simplexml($xml);
$domComment = new DOMComment($comment);
$nodeTarget = $domXML->ownerDocument->importNode($domComment, true);
$domXML->appendChild($nodeTarget);
$xml = simplexml_import_dom($domXML);
}
/**
* xmlAddAttributes
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param array $attributes The attributes to apply to the XML element
*
* @return null
*
*/
public function xmlAddAttributes(&$xml, $attributes = array())
{
foreach ($attributes as $key => $value)
{
$xml->addAttribute($key, $value);
}
}
/**
* xmlAppend
*
* @param SimpleXMLElement $xml The XML element reference in which to inject a comment
* @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement
*
* @return null
*
*/
public function xmlAppend(&$xml, $node)
{
if (!$node)
{
// element was not returned
return;
}
switch (get_class($node))
{
case 'stdClass':
if (property_exists($node, 'comment'))
{
$this->xmlComment($xml, $node->comment);
}
if (property_exists($node, 'fieldXML'))
{
$this->xmlAppend($xml, $node->fieldXML);
}
break;
case 'SimpleXMLElement':
$domXML = dom_import_simplexml($xml);
$domNode = dom_import_simplexml($node);
$domXML->appendChild($domXML->ownerDocument->importNode($domNode, true));
$xml = simplexml_import_dom($domXML);
break;
}
}
/**
* xmlPrettyPrint
*

View File

@ -1270,7 +1270,7 @@ class Interpretation extends Fields
$method[] = "\t\t\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_SITE;";
$method[] = "\t\t\$language_tag = 'en-GB';";
$method[] = "\t\t\$language_tag = '".$this->langTag."';";
$method[] = "\t\t\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " load the user regestration model";
@ -1351,7 +1351,7 @@ class Interpretation extends Fields
$method[] = "\t\t\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_ADMINISTRATOR;";
$method[] = "\t\t\$language_tag = 'en-GB';";
$method[] = "\t\t\$language_tag = '".$this->langTag."';";
$method[] = "\t\t\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t// load the user model";
@ -1686,37 +1686,43 @@ class Interpretation extends Fields
$fieldDecode = '';
foreach ($checker as $field => $array)
{
if (strpos($get['selection']['select'], $field) !== false)
if (strpos($get['selection']['select'], $field) !== false && ComponentbuilderHelper::checkArray($array['decode']))
{
if ('json' === $array['decode'])
// insure it is unique
$array['decode'] = (array) array_unique(array_reverse((array) $array['decode']));
// now loop the array
foreach ($array['decode'] as $decode)
{
$if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{";
// json_decode
$decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);";
}
elseif ('base64' === $array['decode'])
{
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ")))" . PHP_EOL . "\t" . $tab . "\t{";
// base64_decode
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
}
elseif (strpos($array['decode'], '_encryption') !== false)
{
foreach ($this->cryptionTypes as $cryptionType)
if ('json' === $decode)
{
if ($cryptionType . '_encryption' === $array['decode'])
$if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{";
// json_decode
$decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);";
}
elseif ('base64' === $decode)
{
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ")))" . PHP_EOL . "\t" . $tab . "\t{";
// base64_decode
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
}
elseif (strpos($decode, '_encryption') !== false)
{
foreach ($this->cryptionTypes as $cryptionType)
{
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$" . $cryptionType . "key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{";
// set decryption
$decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
$this->siteDecrypt[$cryptionType][$code] = true;
if ($cryptionType . '_encryption' === $decode)
{
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$" . $cryptionType . "key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{";
// set decryption
$decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
$this->siteDecrypt[$cryptionType][$code] = true;
}
}
}
}
// build decoder string
$fieldDecode .= $if . PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " Decode " . $field;
$fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}";
// build decoder string
$fieldDecode .= $if . PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " Decode " . $field;
$fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}";
}
}
}
return $fieldDecode;
@ -2821,10 +2827,25 @@ class Interpretation extends Fields
return $method;
}
/**
* get the a script from the custom script builder
*
* @param string $first The first key
* @param string $second The second key
* @param string $prefix The prefix to add in front of the script if found
* @param string/bool $note The switch/note to add to the script
* @param bool $unset The switch to unset the value if found
* @param string/bool $default The switch/string to use as default return if script not found
* @param string $sufix The sufix to add after the script if found
*
* @return mix The string/script if found or the default value if not found
*
*/
public function getCustomScriptBuilder($first, $second, $prefix = '', $note = null, $unset = null, $default = null, $sufix = '')
{
// check if there is any custom script
// default is to return an empty string
$script = '';
// check if there is any custom script
if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second]))
{
// add not if set
@ -2832,6 +2853,7 @@ class Interpretation extends Fields
{
$script .= $note;
}
// load the actual script
$script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix;
// clear some memory
if ($unset)
@ -3087,6 +3109,17 @@ class Interpretation extends Fields
public function setPrepareDocument(&$view)
{
// fix just incase we missed it somewhere
$tmp = $this->lang;
if ('site' === $this->target)
{
$this->lang = 'site';
}
else
{
$this->lang = 'admin';
}
// ensure correct target is set
$TARGET = ComponentbuilderHelper::safeString($this->target, 'U');
@ -3132,6 +3165,9 @@ class Interpretation extends Fields
// set a JavaScript file if needed
$this->fileContentDynamic[$view['settings']->code]['###' . $TARGET . '_LIBRARIES_LOADER###'] .= $this->setJavaScriptFile($view, $TARGET);
// fix just incase we missed it somewhere
$this->lang = $tmp;
}
public function setGetModules($view, $TARGET)
@ -3297,12 +3333,13 @@ class Interpretation extends Fields
{
foreach ($view['settings']->custom_buttons as $custom_button)
{
// Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// load the button
if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site'))
{
// Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// add cpanel button TODO does not work well on site with permissions
if ($custom_button['target'] == 2)
{
@ -3320,10 +3357,6 @@ class Interpretation extends Fields
// load the list button
elseif (3 == $type && $custom_button['target'] != 1)
{
// Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// add cpanel button TODO does not work well on site with permissions
if (isset($custom_button['type']) && $custom_button['type'] == 2)
{
@ -4219,6 +4252,39 @@ class Interpretation extends Fields
public function setMethodGetItem(&$view)
{
$script = '';
// get the component name
$Component = $this->fileContentStatic['###Component###'];
// go from base64 to string
if (isset($this->base64Builder[$view]) && ComponentbuilderHelper::checkArray($this->base64Builder[$view]))
{
foreach ($this->base64Builder[$view] as $baseString)
{
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . "))"; // TODO && base64_encode(base64_decode(\$item->".$baseString.", true)) === \$item->".$baseString.")";
$script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " base64 Decode " . $baseString . ".";
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = base64_decode(\$item->" . $baseString . ");";
$script .= PHP_EOL . "\t\t\t}";
}
}
// decryption
foreach ($this->cryptionTypes as $cryptionType)
{
if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
{
$script .= PHP_EOL . PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
{
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . ") && \$" . $cryptionType . "key && !is_numeric(\$item->" . $baseString . ") && \$item->" . $baseString . " === base64_encode(base64_decode(\$item->" . $baseString . ", true)))";
$script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $cryptionType . " decrypt data " . $baseString . ".";
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = rtrim(\$" . $cryptionType . "->decryptString(\$item->" . $baseString . "), " . '"\0"' . ");";
$script .= PHP_EOL . "\t\t\t}";
}
}
}
// go from json to array
if (isset($this->jsonItemBuilder[$view]) && ComponentbuilderHelper::checkArray($this->jsonItemBuilder[$view]))
{
@ -4254,39 +4320,6 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t\t}";
}
}
// go from base64 to string
if (isset($this->base64Builder[$view]) && ComponentbuilderHelper::checkArray($this->base64Builder[$view]))
{
foreach ($this->base64Builder[$view] as $baseString)
{
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . "))"; // TODO && base64_encode(base64_decode(\$item->".$baseString.", true)) === \$item->".$baseString.")";
$script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " base64 Decode " . $baseString . ".";
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = base64_decode(\$item->" . $baseString . ");";
$script .= PHP_EOL . "\t\t\t}";
}
}
// get the component name
$Component = $this->fileContentStatic['###Component###'];
// decryption
foreach ($this->cryptionTypes as $cryptionType)
{
if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
{
$script .= PHP_EOL . PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
{
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . ") && \$" . $cryptionType . "key && !is_numeric(\$item->" . $baseString . ") && \$item->" . $baseString . " === base64_encode(base64_decode(\$item->" . $baseString . ", true)))";
$script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $cryptionType . " decrypt data " . $baseString . ".";
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = rtrim(\$" . $cryptionType . "->decryptString(\$item->" . $baseString . "), " . '"\0"' . ");";
$script .= PHP_EOL . "\t\t\t}";
}
}
}
// add custom php to getitem method
$script .= $this->getCustomScriptBuilder('php_getitem', $view, PHP_EOL . PHP_EOL);
@ -5064,8 +5097,6 @@ class Interpretation extends Fields
public function setBatchMove($viewName_single)
{
// set needed defaults
$title = false;
$alias = false;
$category = false;
$batchmove = array();
$VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U');
@ -5083,16 +5114,6 @@ class Interpretation extends Fields
{
$category = $this->catCodeBuilder[$viewName_single]['code'];
}
// only load alias if set in this view
if (array_key_exists($viewName_single, $this->aliasBuilder))
{
$alias = $this->aliasBuilder[$viewName_single];
}
// only load title if set in this view
if (array_key_exists($viewName_single, $this->titleBuilder))
{
$title = $this->titleBuilder[$viewName_single];
}
// prepare custom script
$customScript = $this->getCustomScriptBuilder('php_batchmove', $viewName_single, PHP_EOL . PHP_EOL, null, true);
@ -5252,6 +5273,7 @@ class Interpretation extends Fields
{
// set needed defaults
$title = false;
$titles = array();
$alias = false;
$category = false;
$batchcopy = array();
@ -5277,9 +5299,26 @@ class Interpretation extends Fields
$alias = $this->aliasBuilder[$viewName_single];
}
// only load title if set in this view
if (array_key_exists($viewName_single, $this->titleBuilder))
if (isset($this->customAliasBuilder[$viewName_single]))
{
$title = $this->titleBuilder[$viewName_single];
$titles = array_values($this->customAliasBuilder[$viewName_single]);
$title = true;
}
elseif (array_key_exists($viewName_single, $this->titleBuilder))
{
$titles = array($this->titleBuilder[$viewName_single]);
$title = true;
}
// se the dynamic title
if ($title)
{
// reset the bucket
$titleData = array();
// load the dynamic title builder
foreach ($titles as $_title)
{
$titleData[] = "\$this->table->" . $_title;
}
}
// prepare custom script
$customScript = $this->getCustomScriptBuilder('php_batchcopy', $viewName_single, PHP_EOL . PHP_EOL, null, true);
@ -5400,7 +5439,7 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\t\tcontinue;";
$batchcopy[] = "\t\t\t\t}";
$batchcopy[] = "\t\t\t}";
if ($category && $alias === 'alias' && $title === 'title')
if ($category && $alias === 'alias' && ($title && count($titles) == 1 && in_array('title', $titles)))
{
$batchcopy[] = PHP_EOL . "\t\t\tif (isset(\$values['" . $category . "']))";
$batchcopy[] = "\t\t\t{";
@ -5411,27 +5450,31 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\tstatic::generateTitle((int) \$this->table->" . $category . ", \$this->table);";
$batchcopy[] = "\t\t\t}";
}
elseif ($category && $alias && $title)
elseif ($category && $alias && ($title && count($titles) == 1))
{
$batchcopy[] = PHP_EOL . "\t\t\tif (isset(\$values['" . $category . "']))";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$values['" . $category . "'], \$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$values['" . $category . "'], \$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
$batchcopy[] = "\t\t\telse";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$this->table->" . $category . ", \$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->generateNewTitle(\$this->table->" . $category . ", \$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
}
elseif (!$category && $alias && ($title && count($titles) == 1))
{
$batchcopy[] = "\t\t\tlist(\$this->table->" . implode('', $titles) . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", \$this->table->" . implode('', $titles) . ");";
}
elseif (!$category && $alias && $title)
{
$batchcopy[] = "\t\t\tlist(\$this->table->" . $title . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", \$this->table->" . $title . ");";
$batchcopy[] = "\t\t\tlist(" . implode(', ', $titleData) . ", \$this->table->" . $alias . ") = \$this->_generateNewTitle(\$this->table->" . $alias . ", array(" . implode(', ', $titleData) . "));";
}
elseif (!$category && !$alias && $title && $title != 'user' && $title != 'jobnumber') // TODO [jobnumber] just for one project (not ideal)
elseif (!$category && !$alias && ($title && count($titles) == 1 && !in_array('user', $titles) && !in_array('jobnumber', $titles))) // TODO [jobnumber] just for one project (not ideal)
{
$batchcopy[] = PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Only for strings";
$batchcopy[] = "\t\t\tif (" . $Helper . "::checkString(\$this->table->" . $title . ") && !is_numeric(\$this->table->" . $title . "))";
$batchcopy[] = "\t\t\tif (" . $Helper . "::checkString(\$this->table->" . implode('', $titles). ") && !is_numeric(\$this->table->" . implode('', $titles) . "))";
$batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\t\$this->table->" . $title . " = \$this->generateUniqe('" . $title . "',\$this->table->" . $title . ");";
$batchcopy[] = "\t\t\t\t\$this->table->" . implode('', $titles) . " = \$this->generateUniqe('" . implode('', $titles) . "',\$this->table->" . implode('', $titles) . ");";
$batchcopy[] = "\t\t\t}";
}
@ -5503,35 +5546,65 @@ class Interpretation extends Fields
{
$fixUniqe = array();
// only load this if these two items are set
if (array_key_exists($viewName_single, $this->aliasBuilder) && array_key_exists($viewName_single, $this->titleBuilder))
if (array_key_exists($viewName_single, $this->aliasBuilder) &&
(array_key_exists($viewName_single, $this->titleBuilder) || isset($this->customAliasBuilder[$viewName_single])))
{
// set needed defaults
$setCategory = false;
$alias = $this->aliasBuilder[$viewName_single];
$title = $this->titleBuilder[$viewName_single];
$VIEW = ComponentbuilderHelper::safeString($viewName_single, 'U');
if (array_key_exists($viewName_single, $this->catCodeBuilder))
{
$category = $this->catCodeBuilder[$viewName_single]['code'];
$setCategory = true;
}
// set the title stuff
if (isset($this->customAliasBuilder[$viewName_single]))
{
$titles = array_values($this->customAliasBuilder[$viewName_single]);
if (isset($this->titleBuilder[$viewName_single]))
{
// $titles[] = $this->titleBuilder[$viewName_single]; // TODO this may be unexpected
}
}
else
{
$titles = array($this->titleBuilder[$viewName_single]);
}
// start building the fix
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the " . $title . " for save as copy";
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the " . implode(', ',$titles) . " for save as copy";
$fixUniqe[] = "\t\tif (\$input->get('task') === 'save2copy')";
$fixUniqe[] = "\t\t{";
$fixUniqe[] = "\t\t\t\$origTable = clone \$this->getTable();";
$fixUniqe[] = "\t\t\t\$origTable->load(\$input->getInt('id'));";
$fixUniqe[] = PHP_EOL . "\t\t\tif (\$data['" . $title . "'] == \$origTable->" . $title . ")";
$fixUniqe[] = "\t\t\t{";
if ($setCategory)
// reset the buckets
$ifStatment = array();
$titleVars = array();
$titleData = array();
$titleUpdate = array();
// load the dynamic title builder
foreach ($titles as $title)
{
$fixUniqe[] = "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);";
$ifStatment[] = "\$data['" . $title . "'] == \$origTable->" . $title;
$titleVars[] = "\$" . $title;
$titleData[] = "\$data['" . $title . "']";
$titleUpdate[] = "\t\t\t\t\$data['" . $title . "'] = \$" . $title . ";";
}
$fixUniqe[] = PHP_EOL . "\t\t\tif (" . implode(' || ', $ifStatment) . ")";
$fixUniqe[] = "\t\t\t{";
if ($setCategory && count($titles) == 1)
{
$fixUniqe[] = "\t\t\t\tlist(" . implode('',$titleVars) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode('',$titleData) . ");";
}
elseif (count($titles) == 1)
{
$fixUniqe[] = "\t\t\t\tlist(" . implode(', ',$titleVars) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], " . implode('',$titleData) . ");";
}
else
{
$fixUniqe[] = "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\tlist(" . implode(', ',$titleVars) . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], array(" . implode(', ',$titleData) . "));";
}
$fixUniqe[] = "\t\t\t\t\$data['" . $title . "'] = \$" . $title . ";";
$fixUniqe[] = implode("\n", $titleUpdate);
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
$fixUniqe[] = "\t\t\t}";
$fixUniqe[] = "\t\t\telse";
@ -5546,24 +5619,25 @@ class Interpretation extends Fields
$fixUniqe[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Automatic handling of " . $alias . " for empty fields";
$fixUniqe[] = "\t\tif (in_array(\$input->get('task'), array('apply', 'save', 'save2new')) && (int) \$input->get('id') == 0)";
$fixUniqe[] = "\t\t{";
$fixUniqe[] = "\t\t\tif (\$data['" . $alias . "'] == null)";
$fixUniqe[] = "\t\t\tif (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))";
$fixUniqe[] = "\t\t\t{";
$fixUniqe[] = "\t\t\t\tif (JFactory::getConfig()->get('unicodeslugs') == 1)";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(\$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode(' . " " . ', $titleData) . ");";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = "\t\t\t\telse";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(\$data['" . $title . "']);";
$fixUniqe[] = "\t\t\t\t\t\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(". implode(' . " " . ', $titleData) .");";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\t\$table = JTable::getInstance('" . $viewName_single . "', '" . $this->fileContentStatic['###component###'] . "Table');";
if ($setCategory)
if ($setCategory && count($titles) == 1)
{
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(" . implode('',$titleVars) . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], " . implode('',$titleData) . ");";
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
}
else
{
@ -5571,9 +5645,8 @@ class Interpretation extends Fields
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);";
$fixUniqe[] = PHP_EOL . "\t\t\t\t\$data['" . $alias . "'] = \$this->_generateNewTitle(\$data['" . $alias . "']);";
}
$fixUniqe[] = "\t\t\t\t\$data['" . $alias . "'] = \$" . $alias . ";";
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (isset(\$msg))";
$fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\tJFactory::getApplication()->enqueueMessage(\$msg, 'warning');";
@ -5602,28 +5675,56 @@ class Interpretation extends Fields
public function setGenerateNewTitle($viewName_single)
{
// if category is added to this view then do nothing
if (array_key_exists($viewName_single, $this->aliasBuilder) && array_key_exists($viewName_single, $this->titleBuilder))
if (array_key_exists($viewName_single, $this->aliasBuilder) &&
(array_key_exists($viewName_single, $this->titleBuilder) || isset($this->customAliasBuilder[$viewName_single])))
{
// get component name
$Component = $this->fileContentStatic['###Component###'];
// rest the new function
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* Method to change the title & alias.";
$newFunction[] = "\t* Method to change the title/s & alias.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @param string \$alias The alias.";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t* @param string \$alias The alias.";
$newFunction[] = "\t* @param string/array \$title The title.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return array Contains the modified title and alias.";
$newFunction[] = "\t* @return array/string Contains the modified title/s and/or alias.";
$newFunction[] = "\t*";
$newFunction[] = "\t*/";
$newFunction[] = "\tprotected function _generateNewTitle(\$alias, \$title)";
$newFunction[] = "\tprotected function _generateNewTitle(\$alias, \$title = null)";
$newFunction[] = "\t{";
$newFunction[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the title & alias";
$newFunction[] = PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Alter the title/s & alias";
$newFunction[] = "\t\t\$table = \$this->getTable();";
$newFunction[] = PHP_EOL . "\t\twhile (\$table->load(array('alias' => \$alias)))";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$title = JString::increment(\$title);";
$newFunction[] = "\t\t\t//" . $this->setLine(__LINE__) . " Check if this is an array of titles";
$newFunction[] = "\t\t\tif (".$Component."Helper::checkArray(\$title))";
$newFunction[] = "\t\t\t{";
$newFunction[] = "\t\t\t\tforeach(\$title as \$nr => &\$_title)";
$newFunction[] = "\t\t\t\t{";
$newFunction[] = "\t\t\t\t\t\$_title = JString::increment(\$_title);";
$newFunction[] = "\t\t\t\t}";
$newFunction[] = "\t\t\t}";
$newFunction[] = "\t\t\t//" . $this->setLine(__LINE__) . " Make sure we have a title";
$newFunction[] = "\t\t\telseif (\$title)";
$newFunction[] = "\t\t\t{";
$newFunction[] = "\t\t\t\t\$title = JString::increment(\$title);";
$newFunction[] = "\t\t\t}";
$newFunction[] = "\t\t\t\$alias = JString::increment(\$alias, 'dash');";
$newFunction[] = "\t\t}";
$newFunction[] = PHP_EOL . "\t\treturn array(\$title, \$alias);";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " Check if this is an array of titles";
$newFunction[] = "\t\tif (".$Component."Helper::checkArray(\$title))";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$title[] = \$alias;";
$newFunction[] = "\t\t\treturn \$title;";
$newFunction[] = "\t\t}";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " Make sure we have a title";
$newFunction[] = "\t\telseif (\$title)";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\treturn array(\$title, \$alias);";
$newFunction[] = "\t\t}";
$newFunction[] = "\t\t//" . $this->setLine(__LINE__) . " We only had an alias";
$newFunction[] = "\t\treturn \$alias;";
$newFunction[] = "\t}";
return implode(PHP_EOL, $newFunction);
}
@ -5631,9 +5732,9 @@ class Interpretation extends Fields
{
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* Method to change the title & alias.";
$newFunction[] = "\t* Method to change the title";
$newFunction[] = "\t*";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t* @param string \$title The title.";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return array Contains the modified title and alias.";
$newFunction[] = "\t*";
@ -5997,7 +6098,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['admin']);
// load to global languages
$this->languages['en-GB']['admin'] = $this->langContent['admin'];
$this->languages[$this->langTag]['admin'] = $this->langContent['admin'];
// remove tmp array
unset($this->langContent['admin']);
@ -6050,7 +6151,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['site']);
// load to global languages
$this->languages['en-GB']['site'] = $this->langContent['site'];
$this->languages[$this->langTag]['site'] = $this->langContent['site'];
// remove tmp array
unset($this->langContent['site']);
@ -6078,7 +6179,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['sitesys']);
// load to global languages
$this->languages['en-GB']['sitesys'] = $this->langContent['sitesys'];
$this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys'];
// remove tmp array
unset($this->langContent['sitesys']);
@ -6101,7 +6202,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['adminsys']);
// load to global languages
$this->languages['en-GB']['adminsys'] = $this->langContent['adminsys'];
$this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys'];
// remove tmp array
unset($this->langContent['adminsys']);
@ -8608,136 +8709,6 @@ class Interpretation extends Fields
}
}
public function setAddButttonToListField($targetView, $targetViews)
{
$addButton = array();
$addButton[] = PHP_EOL . "\t/**";
$addButton[] = "\t * Override to add new button";
$addButton[] = "\t *";
$addButton[] = "\t * @return string The field input markup.";
$addButton[] = "\t *";
$addButton[] = "\t * @since 3.2";
$addButton[] = "\t */";
$addButton[] = "\tprotected function getInput()";
$addButton[] = "\t{";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " see if we should add buttons";
$addButton[] = "\t\t\$setButton = \$this->getAttribute('button');";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " get html";
$addButton[] = "\t\t\$html = parent::getInput();";
$addButton[] = "\t\t//" . $this->setLine(__LINE__) . " if true set button";
$addButton[] = "\t\tif (\$setButton === 'true')";
$addButton[] = "\t\t{";
$addButton[] = "\t\t\t\$button = array();";
$addButton[] = "\t\t\t\$script = array();";
$addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the input from url";
$addButton[] = "\t\t\t\$app = JFactory::getApplication();";
$addButton[] = "\t\t\t\$jinput = \$app->input;";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " get the view name & id";
$addButton[] = "\t\t\t\$values = \$jinput->getArray(array(";
$addButton[] = "\t\t\t\t'id' => 'int',";
$addButton[] = "\t\t\t\t'view' => 'word'";
$addButton[] = "\t\t\t));";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if new item";
$addButton[] = "\t\t\t\$ref = '';";
$addButton[] = "\t\t\t\$refJ = '';";
$addButton[] = "\t\t\tif (!is_null(\$values['id']) && strlen(\$values['view']))";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " only load referal if not new item.";
$addButton[] = "\t\t\t\t\$ref = '&amp;ref=' . \$values['view'] . '&amp;refid=' . \$values['id'];";
$addButton[] = "\t\t\t\t\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t\$user = JFactory::getUser();";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $targetView;
// get core permissions
$coreLoad = false;
if (isset($this->permissionCore[$targetView]))
{
$core = $this->permissionCore[$targetView];
$coreLoad = true;
}
// check if the item has permissions.
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($targetView, $this->permissionBuilder['global'][$core['core.create']]))
{
$addButton[] = "\t\t\tif (\$user->authorise('" . $core['core.create'] . "', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif (\$user->authorise('core.create', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build Create button";
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = "\t\t\t\t\thref=\"index.php?option=com_" . $this->fileContentStatic['###component###'] . "&amp;view=" . $targetView . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " only add if user allowed to edit " . $targetView;
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($targetView, $this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = "\t\t\tif ((\$buttonName === '" . $targetView . "' || \$buttonName === '" . $targetViews . "') && \$user->authorise('" . $core['core.edit'] . "', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif ((\$buttonName === '" . $targetView . "' || \$buttonName === '" . $targetViews . "') && \$user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build edit button";
$addButton[] = "\t\t\t\t\$buttonNamee = trim(\$buttonName);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script";
$addButton[] = "\t\t\t\t\$script[] = \"";
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
$addButton[] = "\t\t\t\t\t\tjQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
$addButton[] = "\t\t\t\t\t\t\te.preventDefault();";
$addButton[] = "\t\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\t\tvar \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = "\t\t\t\t\t\t\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = "\t\t\t\t\t});";
$addButton[] = "\t\t\t\t\tfunction \".\$buttonName.\"Button(value) {";
$addButton[] = "\t\t\t\t\t\tif (value > 0) {"; // TODO not ideal since value may not be an (int)
$addButton[] = "\t\t\t\t\t\t\t// hide the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').hide();";
$addButton[] = "\t\t\t\t\t\t\t// show edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').show();";
$addButton[] = "\t\t\t\t\t\t\tvar url = 'index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $targetViews . "&task=" . $targetView . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').attr('href', url);";
$addButton[] = "\t\t\t\t\t\t} else {";
$addButton[] = "\t\t\t\t\t\t\t// show the create button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Create').show();";
$addButton[] = "\t\t\t\t\t\t\t// hide edit button";
$addButton[] = "\t\t\t\t\t\t\tjQuery('#\".\$buttonName.\"Edit').hide();";
$addButton[] = "\t\t\t\t\t\t}";
$addButton[] = "\t\t\t\t\t}\";";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t\t//" . $this->setLine(__LINE__) . " check if button was created for " . $targetView . " field.";
$addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Load the needed script.";
$addButton[] = "\t\t\t\t\$document = JFactory::getDocument();";
$addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " return the button attached to input field.";
$addButton[] = "\t\t\t\treturn '<div class=\"input-append\">' .\$html . implode('',\$button).'</div>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t}";
$addButton[] = "\t\treturn \$html;";
$addButton[] = "\t}";
return implode(PHP_EOL, $addButton);
}
public function setFilterQuery($viewName_list)
{
if (isset($this->filterBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->filterBuilder[$viewName_list]))
@ -9114,7 +9085,7 @@ class Interpretation extends Fields
}
}
// minfy the script
if ($this->params->get('minify') && isset($fileScript) && ComponentbuilderHelper::checkString($fileScript))
if ($this->minify && isset($fileScript) && ComponentbuilderHelper::checkString($fileScript))
{
// minify the fielScript javscript
$minifier = new JS;
@ -9122,7 +9093,7 @@ class Interpretation extends Fields
$fileScript = $minifier->minify();
}
// minfy the script
if ($this->params->get('minify') && isset($footerScript) && ComponentbuilderHelper::checkString($footerScript))
if ($this->minify && isset($footerScript) && ComponentbuilderHelper::checkString($footerScript))
{
// minify the footerScript javscript
$minifier = new JS;
@ -9618,7 +9589,7 @@ class Interpretation extends Fields
{
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
{
$optionsArray = explode(PHP_EOL, $options);
$optionsArray = array_map('trim', (array) explode(PHP_EOL, $options));
if (!ComponentbuilderHelper::checkArray($optionsArray))
{
$optionsArray[] = $optionsArray;
@ -9627,7 +9598,7 @@ class Interpretation extends Fields
{
if (strpos($option, '|') !== false)
{
list($option) = explode('|', $option);
list($option) = array_map('trim', (array) explode('|', $option));
}
if ($option != 'dynamic_list')
{
@ -9644,7 +9615,7 @@ class Interpretation extends Fields
{
if (strpos($keywords, ',') !== false)
{
$keywords = explode(',', $keywords);
$keywords = array_map('trim', (array) explode(',', $keywords));
foreach ($keywords as $keyword)
{
$buket['keywords'][] = trim($keyword);
@ -13083,12 +13054,6 @@ class Interpretation extends Fields
$tabCode = ComponentbuilderHelper::safeString($tab) . '_custom_config';
$tabUpper = ComponentbuilderHelper::safeString($tab, 'U');
$tabLower = ComponentbuilderHelper::safeString($tab);
// setup lang
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
// start field set
$this->configFieldSets[] = "\t<fieldset";
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
// remove display targeted fields
$bucket = array();
foreach ($tabFields as $tabField)
@ -13100,10 +13065,20 @@ class Interpretation extends Fields
$bucket[] = str_replace('display="config"', '', $tabField);
}
}
// set the fields
$this->configFieldSets[] = implode("", $bucket);
// close field set
$this->configFieldSets[] = "\t</fieldset>";
// only add the tab if it has values
if (ComponentbuilderHelper::checkArray($bucket))
{
// setup lang
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
// start field set
$this->configFieldSets[] = "\t<fieldset";
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
// set the fields
$this->configFieldSets[] = implode("", $bucket);
// close field set
$this->configFieldSets[] = "\t</fieldset>";
}
// remove after loading
unset($this->configFieldSetsCustomField[$tab]);
}

View File

@ -299,14 +299,12 @@ class Infusion extends Interpretation
// ###AJAXTOKE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###AJAXTOKE###'] = $this->setAjaxToke($viewName_single);
if (isset($this->customScriptBuilder['php_document'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_document'][$viewName_single]))
// ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
if ($phpDocument = $this->getCustomScriptBuilder('php_document', $viewName_single, PHP_EOL, null, true, false))
{
// ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
$this->customScriptBuilder['php_document'][$viewName_single] = str_replace('$document->', '$this->document->', $this->customScriptBuilder['php_document'][$viewName_single]);
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = PHP_EOL . $this->setPlaceholders(
$this->customScriptBuilder['php_document'][$viewName_single], $this->placeholders);
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = str_replace('$document->', '$this->document->', $phpDocument);
// clear some memory
unset($this->customScriptBuilder['php_document'][$viewName_single]);
unset($phpDocument);
}
else
{
@ -361,18 +359,9 @@ class Infusion extends Interpretation
// ###POSTSAVEHOOK### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###POSTSAVEHOOK###'] = $this->getCustomScriptBuilder('php_postsavehook', $viewName_single, PHP_EOL, null, true, PHP_EOL . "\t\treturn;", PHP_EOL . PHP_EOL . "\t\treturn;");
if (isset($this->customScriptBuilder['css_view'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['css_view'][$viewName_single]))
{
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_view'][$viewName_single], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder['css_view'][$viewName_single]);
}
else
{
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = '';
}
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->getCustomScriptBuilder('css_view', $viewName_single, '', null, true);
// add css to front end
if (isset($view['edit_create_site_view']) && $view['edit_create_site_view'])
{
@ -489,17 +478,30 @@ class Infusion extends Interpretation
// ###JVIEWLISTCANDO### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###JVIEWLISTCANDO###'] = $this->setJviewListCanDo($viewName_single, $viewName_list);
if (isset($this->customScriptBuilder['css_views'][$viewName_list]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['css_views'][$viewName_list]))
// ###VIEWSCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = $this->getCustomScriptBuilder('css_views', $viewName_list, '', null, true);
// ###VIEWS_FOOTER_SCRIPT### <<<DYNAMIC>>>
$scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__) . ' ' . $viewName_list.' footer script';
if ($footerScript = $this->getCustomScriptBuilder('views_footer', $viewName_single, '', $scriptNote, true, false, PHP_EOL))
{
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_views'][$viewName_list], $this->placeholders);
// only minfy if no php is added to the footer script
if ($this->minify && strpos($footerScript, '<?php') === false)
{
// minfy the script
$minifier = new JS;
$minifier->add($footerScript);
$footerScript = $minifier->minify();
// clear some memory
unset($minifier);
}
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = PHP_EOL . '<script type="text/javascript">' . $footerScript . "</script>";
// clear some memory
unset($this->customScriptBuilder['css_views'][$viewName_list]);
unset($footerScript);
}
else
{
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = '';
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = '';
}
}
@ -617,86 +619,31 @@ class Infusion extends Interpretation
if ($view['settings']->main_get->gettype == 1)
{
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]))
{
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]);
}
else
{
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = '';
}
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
// ###CUSTOM_ADMIN_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_ITEM###'] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]))
{
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]);
}
else
{
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = '';
}
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
}
elseif ($view['settings']->main_get->gettype == 2)
{
// ###CUSTOM_ADMIN_GET_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]))
{
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]);
}
else
{
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = '';
}
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = $this->getCustomScriptBuilder($this->target . '_php_getlistquery', $view['settings']->code, PHP_EOL, null, true);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]))
{
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]);
}
else
{
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = '';
}
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
// ###CUSTOM_ADMIN_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]))
{
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]);
}
else
{
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = '';
}
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
}
// ###CUSTOM_ADMIN_CUSTOM_METHODS### <<<DYNAMIC>>>
@ -815,6 +762,21 @@ class Infusion extends Interpretation
// set the module
$this->fileContentDynamic['ajax']['###AJAX_SITE_MODEL_METHODS###'] = $this->setAjaxModelMethods('site');
}
// build the validation rules
if (isset($this->validationRules) && ComponentbuilderHelper::checkArray($this->validationRules))
{
foreach ($this->validationRules as $rule => $_php)
{
// setup rule file
$target = array('admin' => 'a_rule_zi');
$this->buildDynamique($target, 'rule', $rule);
// set the JFormRule Name
$this->fileContentDynamic['a_rule_zi_'.$rule]['###Name###'] = ucfirst($rule);
// set the JFormRule PHP
$this->fileContentDynamic['a_rule_zi_'.$rule]['###VALIDATION_RULE_METHODS###'] = PHP_EOL . $_php;
}
}
// run the second run if needed
if (isset($this->secondRunAdmin) && ComponentbuilderHelper::checkArray($this->secondRunAdmin))
@ -893,36 +855,15 @@ class Infusion extends Interpretation
{
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 1);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]))
{
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]);
}
else
{
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = '';
}
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
// ###SITE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEM###'] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]))
{
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]);
}
else
{
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = '';
}
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
}
elseif ($view['settings']->main_get->gettype == 2)
{
@ -931,36 +872,14 @@ class Infusion extends Interpretation
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]))
{
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]);
}
else
{
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = '';
}
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
// ###SITE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]))
{
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code], $this->placeholders);
// clear some memory
unset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]);
}
else
{
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = '';
}
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
}
// add to lang array
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
@ -1147,8 +1066,7 @@ class Infusion extends Interpretation
}
/**
* Build the lang values and insert to fiel
*
* Build the language values and insert into file
*
* @return boolean on success
*
@ -1160,26 +1078,26 @@ class Infusion extends Interpretation
// check the admin lang is set
if ($this->setLangAdmin())
{
$values[] = array_values($this->languages['en-GB']['admin']);
$mainLangLoader['admin'] = count($this->languages['en-GB']['admin']);
$values[] = array_values($this->languages[$this->langTag]['admin']);
$mainLangLoader['admin'] = count($this->languages[$this->langTag]['admin']);
}
// check the admin system lang is set
if ($this->setLangAdminSys())
{
$values[] = array_values($this->languages['en-GB']['adminsys']);
$mainLangLoader['adminsys'] = count($this->languages['en-GB']['adminsys']);
$values[] = array_values($this->languages[$this->langTag]['adminsys']);
$mainLangLoader['adminsys'] = count($this->languages[$this->langTag]['adminsys']);
}
// check the site lang is set
if (!$this->removeSiteFolder && $this->setLangSite())
{
$values[] = array_values($this->languages['en-GB']['site']);
$mainLangLoader['site'] = count($this->languages['en-GB']['site']);
$values[] = array_values($this->languages[$this->langTag]['site']);
$mainLangLoader['site'] = count($this->languages[$this->langTag]['site']);
}
// check the site system lang is set
if (!$this->removeSiteFolder && $this->setLangSiteSys())
{
$values[] = array_values($this->languages['en-GB']['sitesys']);
$mainLangLoader['sitesys'] = count($this->languages['en-GB']['sitesys']);
$values[] = array_values($this->languages[$this->langTag]['sitesys']);
$mainLangLoader['sitesys'] = count($this->languages[$this->langTag]['sitesys']);
}
$values = array_unique(ComponentbuilderHelper::mergeArrays($values));
// get the other lang strings if there is any
@ -1196,14 +1114,16 @@ class Infusion extends Interpretation
$langXML = array();
foreach ($this->languages as $tag => $areas)
{
// trim the tag
$tag = trim($tag);
foreach ($areas as $area => $languageStrings)
{
// only log messages for none en-GB translations
if ('en-GB' !== $tag)
// only log messages for none $this->langTag translations
if ($this->langTag !== $tag)
{
$langStringNr = count($languageStrings);
$langStringSum = bcmul($langStringNr, 100);
$percentage = bcdiv($langStringSum, $mainLangLoader[$area]);
$langStringSum = $this->bcmath('mul', $langStringNr, 100);
$percentage = $this->bcmath('div', $langStringSum, $mainLangLoader[$area]);
$stringNAme = ($langStringNr == 1) ? '(string ' . $tag . ' translated)' : '(strings ' . $tag . ' translated)';
// force load if debug lines are added
if (!$this->debugLinenr)
@ -1212,12 +1132,12 @@ class Infusion extends Interpretation
if ($percentage < $this->percentageLanguageAdd)
{
// dont add
$this->langNot[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total en-GB strings) only <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
$this->langNot[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total '.$this->langTag.' strings) only <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
continue;
}
}
// show if it was added as well
$this->langSet[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total en-GB strings) and <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
$this->langSet[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total '.$this->langTag.' strings) and <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
}
// set naming convention
$p = 'admin';
@ -1249,15 +1169,13 @@ class Infusion extends Interpretation
// count the file created
$this->fileCount++;
// add content to it
$lang = '';
foreach ($languageStrings as $place => $string)
{
$lang .= $place . '="' . $string . '"' . PHP_EOL;
}
$lang = array_map(function ($langstring, $placeholder) {
return $placeholder . '="' . $langstring . '"';
}, $languageStrings, array_keys($languageStrings));
// add to language file
$this->writeFile($path . '/' . $fileName, $lang);
$this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang));
// set the line counter
$this->lineCount = $this->lineCount + substr_count($lang, PHP_EOL);
$this->lineCount = $this->lineCount + count((array)$lang);
// build xml strings
if (!isset($langXML[$p]))
{
@ -1289,5 +1207,4 @@ class Infusion extends Interpretation
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -277,13 +277,13 @@ class Builder extends Mapping
protected function setFieldXML(&$field, $fieldId)
{
// load the field settings
$settings = array();
$settings['name'] = $field['name'];
$settings['description'] = 'The '.strtolower($field['label']) . ' is set here.';
$settings['message'] = "Error! Please add some ".strtolower($field['label'])." here.";
$settings['label'] = $field['label'];
$settings['default'] = ($field['default'] == 'Other') ? $field['defaultOther'] : $field['default'];
$settings['hint'] = $field['label'] .' Here!';
$settings = array();
$settings['name'] = $field['name'];
$settings['description'] = 'The '.strtolower($field['label']) . ' is set here.';
$settings['message'] = "Error! Please add some ".strtolower($field['label'])." here.";
$settings['label'] = $field['label'];
$settings['default'] = ($field['default'] == 'Other') ? $field['defaultOther'] : $field['default'];
$settings['hint'] = $field['label'] .' Here!';
// okay set the xml field values
if ($fieldOptions = ComponentbuilderHelper::getFieldOptions($fieldId, 'id', $settings))
{

View File

@ -1,13 +1,17 @@
COM_COMPONENTBUILDER="Component Builder"
COM_COMPONENTBUILDER_ABOVE_TABS="Above Tabs"
COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS="Accepts an email address satisfies a basic syntax check in the pattern of &quot;x@y.zz&quot;, with no invalid characters."
COM_COMPONENTBUILDER_ACCEPTS_ONLY_EMPTY_VALUES_CONVERTED_TO_ZERO_AND_STRINGS_IN_THE_FORM_RGB_OR_RRGGBB_WHERE_R_G_AND_B_ARE_HEX_VALUES="Accepts only empty values (converted to '#000000') and strings in the form '#RGB' or '#RRGGBB' where R, G, and B are hex values."
COM_COMPONENTBUILDER_ACCEPTS_ONLY_THE_VALUES_ZERO_ONE_TRUE_OR_FALSE_CASEINSENSITIVE="Accepts only the values '0', '1', 'true' or 'false' (case-insensitive)."
COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools"
COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!"
COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)"
COM_COMPONENTBUILDER_ADD_ACCESS="Add Access"
COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging."
COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT="Add to Backup Folder &amp; Sales Server &lt;small&gt;(if set)&lt;/small&gt;"
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder &amp; Sales Server <small>(if set)</small>"
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
@ -89,6 +93,7 @@ COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED="%s Admins Fields unfeatur
COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED_1="%s Admin Fields unfeatured."
COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED="%s Admins Fields unpublished."
COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields unpublished."
COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR="Admin Behaviour"
COM_COMPONENTBUILDER_ADMIN_FIELDS="Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ABOVE_TABS="Above Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS="Addfields"
@ -164,6 +169,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_DESC="The user that created this Ad
COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_DESC="The date this Admin Fields was created."
COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_ADMIN_FIELDS_DEFAULT="Default"
COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT="Editing the Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_EDITING="Editing"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ERROR_UNIQUE_ALIAS="Another Admin Fields has the same alias."
@ -179,14 +185,15 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_IN_TAB="Left in Tab"
COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_OF_TABS="Left of Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_DESCRIPTION="Select if the field is to be used as a link to a single record, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_LABEL="Link"
COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_DESCRIPTION="Select if this field should show in the list view."
COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_LABEL="Admin List"
COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_DESCRIPTION="behaviour"
COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_LABEL="Admin"
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_DESC="The last user that modified this Admin Fields."
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields was modified."
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE="None"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB="None DB"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)<br />For more help <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>please watch this tutorial</a>."
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views."
COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering"
@ -203,6 +210,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_OF_TABS="Right of Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields to customise the alias."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_DESCRIPTION="Select if the field is to be searchable in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_LABEL="Searchable"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_LIST_VIEW="Show in list view"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_DESCRIPTION="Select if the field should be sortable in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable"
COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status"
@ -214,7 +222,6 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_LABEL="Title"
COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised."
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_ADMIN_LIST="Admin List"
COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View"
COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views"
COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access"
@ -345,6 +352,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_DESCRIPTION="Select an admin view"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_LABEL="View"
COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT="Ajax Input"
COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT_LABEL="Ajax Input"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER="Alias Builder"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_DESCRIPTION="Select the field/s you would like to use to build the alias."
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_LABEL="Alias Builder"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE="Alias Builder Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION="How should the alias be build for this view"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARRAY="ARRAY"
@ -428,6 +441,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION="Add your CSS here! [Do not
COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT="// CSS for the edit view"
COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL="CSS"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUBE="Cube"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM="Custom"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON="Custom Button"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTONS="Custom Buttons"
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL="Custom Buttons"
@ -593,11 +607,15 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NO="No"
COM_COMPONENTBUILDER_ADMIN_VIEW_NONE="None"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION="<p>The scripts that are automatic added to the input fields below is identical to the default import scripts used. Adapt them to your own custom needs.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL="Advanced notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION="The custom behaviour allows you to select what field/s must be used to build the alias."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL="Custom Alias Behaviour"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION="The default behaviour uses the title field to build that alias, and if no title field is found uses the date."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL="Default Alias Behaviour"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="<p>Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Shortcut Buttons<hr /><div id='jform_create_edit_buttons'></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="<hr /><h4>Linked Fields <span id='header_admin_fields_buttons'></span></h4><div id='display_admin_fields'>Display of the fields will load here!</div><hr /><h4>Field Conditions <span id='header_admin_fields_conditions_buttons'></span></h4><div id='display_admin_fields_conditions'>Display of the fields conditions will load here!</div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><div class='note_create_edit_notice_p'><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields &amp; Conditions"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
@ -876,6 +894,7 @@ COM_COMPONENTBUILDER_ALL="All"
COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time."
COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.<br />Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import <a %s >please let us know</a>."
COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED="All the languages found in Joomla were successfully imported."
COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?"
COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add"
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b>"
@ -902,9 +921,10 @@ COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE
COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First"
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries"
COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method"
COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: <b>%s</b>"
COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION="<b>Custom files</b> not move to correct location!"
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="<b>Best to not continue!</b><br />This package <b>FAILED</b> checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!"
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME="<b>Best to not continue!</b><br />We could not load the checksum for this package, and so no validation was possible. This may be due to your network, or a change to that package name."
COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION="<b>Custom files</b> not moved to correct location!"
COM_COMPONENTBUILDER_BEHIND="Behind"
COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Behind means your <b>local snippet</b> (with the same name, library and type) has a <b>older modified date</b> then the community snippet (with the same name, library and type)."
COM_COMPONENTBUILDER_BETA_RELEASE="Beta Release"
@ -912,7 +932,7 @@ COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_
COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB="<b>Field type</b> id:%s mismatch in <b>%s</b>."
COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB="<b>Field type</b> not set for <b>%s</b>."
COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="<b>Get the key from</b> <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVE_TO_CORRECT_LOCATION="<b>Images</b> not move to correct location!"
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION="<b>Images</b> not moved to correct location!"
COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="<b>Multiple Field (repeatable mode)</b> id:%s mismatch in <b>field:%s</b>, and was <em>removed</em> from the field."
COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="<b>%s</b>->%s in <b>%s</b> has id mismatch. So the <b>%s</b> was removed!"
COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
@ -920,6 +940,7 @@ COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="<b>%s</b> <em>component details<
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
COM_COMPONENTBUILDER_BUILD="Build"
COM_COMPONENTBUILDER_BUILDIN="Build-in"
COM_COMPONENTBUILDER_BULK="Bulk"
COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets"
@ -929,9 +950,12 @@ COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_SNIPPETS="Bulk Update All Availab
COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_SNIPPETS="Bulk Update All Diverged Snippets"
COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_SNIPPETS="Bulk Update All Out Dated Snippets"
COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time."
COM_COMPONENTBUILDER_CANCEL="Cancel"
COM_COMPONENTBUILDER_CHAIN="Chain"
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp"
COM_COMPONENTBUILDER_CLONE="Clone"
COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!"
COM_COMPONENTBUILDER_CLOSE_NEW="Close & New"
COM_COMPONENTBUILDER_COMPANY="Company"
COM_COMPONENTBUILDER_COMPANY_NAME="Company Name"
@ -2017,12 +2041,12 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_DESCRIPTION="<p
<b>JPATH_BASE</b><br />
// The path to the cache folder.<br />
<b>JPATH_CACHE</b><br />
// The path to the administration folder of the current component being executed.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br />
// The path to the site folder of the current component being executed.<br />
<b>JPATH_COMPONENT_SITE</b><br />
// The path to the current component being executed.<br />
<b>JPATH_COMPONENT</b><br />
// The path to the administration folder of JCB component.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
// The path to the site folder of JCB component.<br />
<b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
// The path to the JCB component.<br />
<b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
// The path to folder containing the configuration.php file.<br />
<b>JPATH_CONFIGURATION</b><br />
// The path to the installation folder.<br />
@ -2194,6 +2218,7 @@ COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author o
COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_LABEL="Author Email"
COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component."
COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_LABEL="Author Name"
COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP="Auto Backup"
COM_COMPONENTBUILDER_CONFIG_AUTO_LOAD="Auto"
COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_DESCRIPTION="You can run a cronjob that will backup all your components as they are mapped in JCB.<br /><br /><b>USE THE FOLLOWING:</b> <span id='cronjob-backup'>loading...<span class='loading-dots' ></span></span><br /><br />Please note that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677
<script type='text/javascript'>
@ -2244,10 +2269,11 @@ function getCronPath(getType, token){
} else {
jQuery('#cronjob-'+getType).html('<span style=\'color: red;\'>Error loading path!</span>');
}
})
});
}
</script>"
COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL="Backup JCB Mapped Components"
COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_DESCRIPTION="Enter the email where the <b>backup key</b> should be send. It will only send an email if a key change is detected, and not on every backup."
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_HINT="Email Address Here"
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_LABEL="Email (backup key)"
@ -2256,6 +2282,7 @@ COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_HINT="/home/user/backup"
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_LABEL="Backup Folder Path"
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_MESSAGE="Error! Please add folder path here."
COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL="Add to Backup Folder &amp; Sales Server <small>(if set)</small>"
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_DESCRIPTION="Enter Package Name Here"
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT="JCB_Backup_[YEAR]_[MONTH]_[DAY]"
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_LABEL="Package Name"
@ -2279,7 +2306,8 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set t
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CONFIG_CRONJOB="CronJob"
COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to."
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_HINT="/home/user/fullbackup"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path"
@ -2292,6 +2320,11 @@ COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_MESSAGE="Error! Please add folder path here."
COM_COMPONENTBUILDER_CONFIG_DEFAULT="Default"
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD="Development Method"
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION="Select what development method you would like to use."
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_LABEL="Development Method"
COM_COMPONENTBUILDER_CONFIG_DISPLAY_MESSAGE="Display Message"
COM_COMPONENTBUILDER_CONFIG_DKIM="DKIM"
COM_COMPONENTBUILDER_CONFIG_DKIM_DESCRIPTION="Set this option to Yes if you want to sign your emails using DKIM."
COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_DESCRIPTION="Set the domain. Eg. domain.com"
@ -2336,6 +2369,38 @@ COM_COMPONENTBUILDER_CONFIG_EVERY_TEN_HOURS="Every 10 Hours"
COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_MINUTES="Every 30 Minutes"
COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS="Every 30 Seconds"
COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK="Every Week"
COM_COMPONENTBUILDER_CONFIG_EXPANSION="Expansion"
COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_DESCRIPTION="You must run a cronjob that will trigger the expansion events for JCB.<br /><br /><b>USE THE FOLLOWING:</b> <span id='cronjob-expand'>loading...<span class='loading-dots' ></span></span><br /><br />Please note that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677
<script type='text/javascript'>
jQuery(document).ready(function($) {
// get token from the form
$('form :input').each(function(index, elm){
if (elm.name.length == 32 && elm.type == 'hidden')
{
value = $(elm).val();
if (1 == value)
{
token = elm.name;
}
}
});
// nice little dot trick :)
var x=0;
setInterval(function() {
var dots = '';
x++;
for (var y=0; y < x%11; y++) {
dots+='.';
}
jQuery('.loading-dots').text(dots);
} , 500);
// now get the Cron Path
getCronPath('expand', token);
});
</script>"
COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_LABEL="Expansion Cronjob"
COM_COMPONENTBUILDER_CONFIG_EXPANSION_DESCRIPTION="Properties for this field"
COM_COMPONENTBUILDER_CONFIG_EXPANSION_LABEL="Expansion"
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_DESCRIPTION="Enter link where your JCB package key can be bought."
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys"
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
@ -2377,6 +2442,7 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language"
COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder"
COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails."
COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer"
@ -2394,6 +2460,10 @@ COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_DESCRIPTION="The compiler
COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_LABEL="Moving The Compiler Folder"
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_DESCRIPTION="The custom folder is where all files and folders that you would like to include in your components are stored, the default location is [administrator/components/com_componentbuilder/custom]. You can move this folder by adding your own path here. Remember to move the content of the default custom folder to this new location."
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_LABEL="Moving The Custom Folder"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION="<p>This method is basically the way JCB has always worked by default.</p><p>You have a compiler area, once you have made changes you go to the compiler view and compile your component. Then you have the option to install and/or distribute the Joomla install package.</p><p>This can also be called the manual development method.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL="Default Development Method"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION="<p>This method adds auto expansion to the current Joomla automatically.</p><p>Below you setup the behaviour of a selected set of components that will be <b>auto build and installed</b>. So you do not need to manually compile and install those components any more, the system does all that automatically for you.</p><p>So your experience is that you change the field, view or something else in JCB and then the component in Joomla moments later reflect those changed automatically. The latency of the workflow is based on your <b>cronjob frequency</b> and the <b>size</b> of your component. You can pause the build in a few ways, one by actually <b>checking out/opening</b> the Joomla Component view of the component in JCB, or changing the state to unpublish, archive or trashed, or simply remove if from the list below.</p><p>This can also be called the automatic development method.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL="Expansion Development Method"
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_DESCRIPTION="<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p>
<script>
jQuery(document).ready(function()
@ -2424,18 +2494,27 @@ function vdm_dkim() {
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_LABEL="Server Configuration"
COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_DESCRIPTION="You must set the folder where all the components should be deployed for git. You will have to still do your git commit and other git commands yourself. Each component will create their own folder inside this git folder."
COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_LABEL="Adding git to your compiler method"
COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION="<p>Here you can select the main/global language that you are using to build components. This is the language you use for field label, descriptions. view names and well everything language related across the whole JCB build interface.</p><p><b>You should not change this global language option once you have set it</b> as this will cause major confusion, that will cause languages to get mixed-up very badly.</p><p>Also make sure that if you import a JCB package from other developers that they use the same language as you selected here.</p><p>At this time best practice is to use <b>en-GB</b> since this has been the default language since the start of the project and will remain VDM's default for years to come, and if you import our JCB packages all the source language strings are in en-GB. English GB is also the source/main language for Joomla.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL="Global Language Source"
COM_COMPONENTBUILDER_CONFIG_OFF="Off"
COM_COMPONENTBUILDER_CONFIG_ON="On"
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN="Only Boolean"
COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra"
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_DESCRIPTION="<code>[YEAR]</code> <code>[MONTH]</code> <code>[DAY]</code> <code>[HOUR]</code> <code>[MINUTE]</code>"
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeholders"
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation."
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL="Add Language if %? ready."
COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail"
COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER="Remote Server"
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_DESCRIPTION="Text displayed in the header &quot;Reply To:&quot; field when replying to the site email. Usually the the person that receives the response. (leave blank for none)"
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_HINT="Reply Name Here"
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply to Name"
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION="Should the component be moved to your local repository folder?"
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL="Add to Repository Folder"
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION="Should the system return the build info/messages, or simply 1 for success and 0 for failure."
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL="Return Options for Build"
COM_COMPONENTBUILDER_CONFIG_SENDMAIL="Sendmail"
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_DESCRIPTION="Enter the path to the sendmail program directory on your host server."
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_HINT="/usr/sbin/sendmail"
@ -3188,9 +3267,9 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category &nbsp;For<br />Fieldtypes"
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPE_ADD="Add&nbsp;Fieldtype<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add&nbsp;Field<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_GETSNIPPETS="Get Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENT_ADD="Add&nbsp;Help Document<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENTS="Joomla Components<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_JOOMLA_COMPONENT_ADD="Add&nbsp;Joomla Component<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_LANGUAGE_TRANSLATIONS="Language Translations<br /><br />"
@ -3202,18 +3281,20 @@ COM_COMPONENTBUILDER_DASHBOARD_SERVERS="Servers<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEWS="Site Views<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add&nbsp;Site View<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SNIPPETS="Snippets<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_SNIPPET_ADD="Add&nbsp;Snippet<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATES="Templates<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_TEMPLATE_ADD="Add&nbsp;Template<br /><br />"
COM_COMPONENTBUILDER_DASHBOARD_VALIDATION_RULES="Validation Rules<br /><br />"
COM_COMPONENTBUILDER_DATE="Date"
COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS="Debug (line numbers)"
COM_COMPONENTBUILDER_DEFAULT="Default"
COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)"
COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View"
COM_COMPONENTBUILDER_DESCRIPTION="Description"
COM_COMPONENTBUILDER_DETAILS="Details"
COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA="Display switch for dynamic placement in relation to the use of the field in menu and global configuration options. So the (config) option will only add the field to the global configuration area, (menu) will add the field only to the menu area."
COM_COMPONENTBUILDER_DIVERGED="Diverged"
COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your <b>local snippet</b> (with the same name, library and type) has a <b>diverged</b> from the community snippet (with the same name, library and type) in that it does not have the same <b>creation</b> or <b>modified date</b>."
COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install"
COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install."
COM_COMPONENTBUILDER_DOWNLOAD="download"
COM_COMPONENTBUILDER_DO_NOT_ADD="Do not add"
COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get"
@ -3557,13 +3638,15 @@ COM_COMPONENTBUILDER_ERROR_THE_SNIPPET_IS_FAULTY_AND_COULD_NOT_BE_SAVED="Error!
COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_ACCESS_TO_THE_SNIPPETS="Error! You do not have access to the snippets."
COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_PERMISSION_TO_CREATE_THE_SNIPPET="Error! You do not have permission to create the snippet."
COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components"
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data."
COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed"
COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!"
COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES="Export JCB Packages"
COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL="Extra properties like (listclass, escape, display, validate)<br /><small>Here you can set the extra properties for this field</small>"
COM_COMPONENTBUILDER_FIELD="Field"
COM_COMPONENTBUILDER_FIELDS="Fields"
COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access"
@ -3764,11 +3847,11 @@ COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE="Error! Please add other dat
COM_COMPONENTBUILDER_FIELD_DATATYPE="Datatype"
COM_COMPONENTBUILDER_FIELD_DATATYPE_DESCRIPTION="The data type for mysql"
COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL="Data Type"
COM_COMPONENTBUILDER_FIELD_DATA_BASE="Data Base"
COM_COMPONENTBUILDER_FIELD_DATE="DATE"
COM_COMPONENTBUILDER_FIELD_DATETIME="DATETIME"
COM_COMPONENTBUILDER_FIELD_DECIMAL="DECIMAL"
COM_COMPONENTBUILDER_FIELD_DEFAULT="Default"
COM_COMPONENTBUILDER_FIELD_DETAILS="Details"
COM_COMPONENTBUILDER_FIELD_DOUBLE="DOUBLE"
COM_COMPONENTBUILDER_FIELD_EDIT="Editing the Field"
COM_COMPONENTBUILDER_FIELD_ELEVEN="11"
@ -3810,33 +3893,99 @@ COM_COMPONENTBUILDER_FIELD_NEW="A New Field"
COM_COMPONENTBUILDER_FIELD_NO="No"
COM_COMPONENTBUILDER_FIELD_NONE="None"
COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set"
COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_DESCRIPTION="<p>Set the database column for this field here. The column will have the same name as the field. Please take care to select these settings in the correct relationship. The nature of this area is to give you as much freedom/power as you would like, but with that comes responsibility.</p><p>You therefore need to insure that you know what the correct values should be. A great way to learn, is to look at the Joomla core components fields and the corresponding mySql columns.</p>"
COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_LABEL="Database Settings"
COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'>
<div class='span6'>
<h1>Filter Information</h1>
<b>The available values for the filter attribute are:</b><br />
<p>
<code>INT</code> - An integer,<br />
<code>UINT</code> - An unsigned integer,<br />
<code>FLOAT</code> - A floating point number,<br />
<code>BOOLEAN</code> - A boolean value,<br />
<code>WORD</code> - A string containing A-Z or underscores only (not case sensitive),<br />
<code>ALNUM</code> - A string containing A-Z or 0-9 only (not case sensitive),<br />
<code>CMD</code> - A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive),<br />
<code>BASE64</code> - A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive),<br />
<code>STRING</code> - A fully decoded and sanitized string (default),<br />
<code>HTML</code> - A sanitized string,<br />
<code>ARRAY</code> - An array,<br />
<code>PATH</code> - A sanitized file path,<br />
<code>USERNAME</code> - Do not use (use an application specific filter),<br />
<code>RAW</code> - The raw string is returned with no filtering,<br />
<code>unknown</code> - An unknown filter will act like STRING. If the input is an array it will return an array of fully decoded and sanitized strings.
</p>
</div>
<div class='span6'>
<h1>Linked To</h1>
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div>
<div class='span4'>
<h1>Filter Information</h1>
<!-- The available values for the filter attribute are: -->
<table class='uk-table uk-table-hover uk-table-striped uk-table-condensed'>
<caption>The available values for the filter attribute are:</caption>
<thead>
<tr>
<th class='uk-text-right'>Filter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class='uk-text-right'><code>INT</code></td>
<td>An integer</td>
</tr>
<tr>
<td class='uk-text-right'><code>UINT</code></td>
<td>An unsigned integer</td>
</tr>
<tr>
<td class='uk-text-right'><code>FLOAT</code></td>
<td>A floating point number</td>
</tr>
<tr>
<td class='uk-text-right'><code>BOOLEAN</code></td>
<td>A boolean value</td>
</tr>
<tr>
<td class='uk-text-right'><code>WORD</code></td>
<td>A string containing A-Z or underscores only (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>ALNUM</code></td>
<td>A string containing A-Z or 0-9 only (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>CMD</code></td>
<td>A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>BASE64</code></td>
<td>A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive)</td>
</tr>
<tr>
<td class='uk-text-right'><code>STRING</code></td>
<td>A fully decoded and sanitized string (default)</td>
</tr>
<tr>
<td class='uk-text-right'><code>HTML</code></td>
<td>A sanitized string</td>
</tr>
<tr>
<td class='uk-text-right'><code>ARRAY</code></td>
<td>An array</td>
</tr>
<tr>
<td class='uk-text-right'><code>PATH</code></td>
<td>A sanitized file path</td>
</tr>
<tr>
<td class='uk-text-right'><code>USERNAME</code></td>
<td>Do not use (use an application specific filter)</td>
</tr>
<tr>
<td class='uk-text-right'><code>RAW</code></td>
<td>The raw string is returned with no filtering</td>
</tr>
<tr>
<td class='uk-text-right'><code>unknown</code></td>
<td>An unknown filter will act like STRING. If the input is an array it will return an array of fully decoded and sanitized strings.</td>
</tr>
</tbody>
</table>
</div>
<div class='span5'>
<h1>Validation Rules <span id='validation_rules_header'></span></h1>
<!-- The available validation rules for the validate attribute are: -->
<div id='display_validation_rules'>Searching the system.<span class='loading-dots'></span></div>
</div>
<div class='span3'>
<h1>Linked To</h1>
<!-- Places across JCB where this field is linked. -->
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div>
</div>"
COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_DESCRIPTION="This field does not require any database settings to function correctly."
COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_LABEL="No Database Require"
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION="Please select a field type that you would like to build."
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL="Building a field"
COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br />
<a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br />
<a href='http://docs.whmcs.com/Licensing_Addon/' target='_blank'>http://docs.whmcs.com/Licensing_Addon/</a></p>"
@ -3855,6 +4004,8 @@ COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions"
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias."
COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts"
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES="Set Properties"
COM_COMPONENTBUILDER_FIELD_SEVEN="7"
COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64"
COM_COMPONENTBUILDER_FIELD_STATUS="Status"
@ -3867,24 +4018,27 @@ COM_COMPONENTBUILDER_FIELD_TIME="TIME"
COM_COMPONENTBUILDER_FIELD_TINYINT="TINYINT"
COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE="255"
COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT="2048"
COM_COMPONENTBUILDER_FIELD_TYPE_INFO="Type Info"
COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY="UNIQUE KEY"
COM_COMPONENTBUILDER_FIELD_VARCHAR="VARCHAR"
COM_COMPONENTBUILDER_FIELD_VERSION_DESC="A count of the number of times this Field has been revised."
COM_COMPONENTBUILDER_FIELD_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION="WHMCS-key Encryption"
COM_COMPONENTBUILDER_FIELD_XML="Xml"
COM_COMPONENTBUILDER_FIELD_XML_DESCRIPTION="Text Area"
COM_COMPONENTBUILDER_FIELD_XML_HINT="Field XML Go Here"
COM_COMPONENTBUILDER_FIELD_XML_LABEL="XML field definition (Please set the field details here to fit your needs)"
COM_COMPONENTBUILDER_FIELD_YES="Yes"
COM_COMPONENTBUILDER_FIELD_ZERO="0"
COM_COMPONENTBUILDER_FILE="File"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_S="File <b>%s</b> was not move to (%s)!"
COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED="File <b>%s</b> could not be unlocked!"
COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB="File <b>%s</b> was not moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File <b>%s</b> was successfully unlocked!"
COM_COMPONENTBUILDER_FILTER="Filter"
COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_S="Folder <b>%s</b> was not move to (%s)!"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder <b>%s</b> was not moved to <b>%s</b>"
COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE="Force Local Update"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab"
COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: <b>%s</b>"
COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries"
COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets"
@ -3896,6 +4050,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List"
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_DESC="The compiler"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
@ -3905,6 +4061,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Vi
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu"
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="Get the key from <b>%s</b> for <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
@ -3912,6 +4070,7 @@ COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the
COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version"
COM_COMPONENTBUILDER_GLOBAL="Global"
COM_COMPONENTBUILDER_GREAT_THIS_FUNCTION_NAME_WILL_WORK="Great, this function name will work!"
COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK="Great, this validation rule name (%s) will work!"
COM_COMPONENTBUILDER_HAS_METADATA="Has Metadata"
COM_COMPONENTBUILDER_HELP_DOCUMENT="Help Document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS="Help Documents"
@ -3923,8 +4082,6 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD="Help Documents Dashboard Add"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE="Help Documents Delete"
@ -4030,7 +4187,6 @@ COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to broken package!"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to key error, or broken package!"
COM_COMPONENTBUILDER_ICON="Icon"
COM_COMPONENTBUILDER_IMPORT_COMPONENTS="Import Components"
COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue"
COM_COMPONENTBUILDER_IMPORT_DATA="Import Data"
COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data."
@ -4043,6 +4199,7 @@ COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD="Upload"
COM_COMPONENTBUILDER_IMPORT_FROM_URL="URL"
COM_COMPONENTBUILDER_IMPORT_GET_BOTTON="Get File"
COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN="-- Ignore This Column --"
COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES="Import JCB Packages"
COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS="Link File to Table Columns"
COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE="Does not have a valid file type."
COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL="Please enter a url."
@ -4075,6 +4232,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SERVERS="Select the file to import d
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SITE_VIEWS="Select the file to import data to site_views."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import data to snippets."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES="Select the file to import data to validation_rules."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL="Enter file URL"
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful."
COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns"
@ -4214,6 +4372,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL="MySQL"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_DESCRIPTION="To build the component fields and back-end views dynamically using a mySQL table file."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME="Companyname"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here"
@ -4278,8 +4438,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_DESCRIPTION="Enter link wh
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_MESSAGE="Error! Please add link here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Export Components Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export components button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY="Export Key"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_DESCRIPTION="The key used to lock the data during export."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT="Export Key Here"
@ -4295,8 +4455,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT="Javascript"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_HINT="// JavaScript for the entire back-end"
@ -4602,6 +4762,8 @@ COM_COMPONENTBUILDER_LANGUAGES_N_ITEMS_UNPUBLISHED="%s Languages unpublished."
COM_COMPONENTBUILDER_LANGUAGES_N_ITEMS_UNPUBLISHED_1="%s Language unpublished."
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu"
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to update the submenu of the language"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button."
COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_DESC="The user that created this Language."
COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_LANGUAGE_CREATED_DATE_DESC="The date this Language was created."
@ -4683,10 +4845,6 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_DESC="The date this Langu
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS="Details"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT="Editing the Language Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION="Entranslation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_HINT="Automatically generated!"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL="English String"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_MESSAGE="Error! Please English translated string here."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Language Translation has the same alias."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID="Id"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE="Language"
@ -4700,6 +4858,10 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION="Permissions"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Language Translation to customise the alias."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE="Source"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_HINT="Automatically generated!"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL="Source String"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE="Error! Please source translated string here."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
@ -4766,6 +4928,7 @@ COM_COMPONENTBUILDER_LAYOUT_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_LAYOUT_ALIAS_MESSAGE="Error! Please add name in code here."
COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS="Layout Code Snippets"
COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_DESC="The user that created this Layout."
COM_COMPONENTBUILDER_LAYOUT_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_LAYOUT_CREATED_DATE_DESC="The date this Layout was created."
@ -5076,12 +5239,12 @@ COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_CONSTANT_PATHS_DESCRIPTION=
<b>JPATH_BASE</b><br />
// The path to the cache folder.<br />
<b>JPATH_CACHE</b><br />
// The path to the administration folder of the current component being executed.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br />
// The path to the site folder of the current component being executed.<br />
<b>JPATH_COMPONENT_SITE</b><br />
// The path to the current component being executed.<br />
<b>JPATH_COMPONENT</b><br />
// The path to the administration folder of JCB component.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
// The path to the site folder of JCB component.<br />
<b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
// The path to the JCB component.<br />
<b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
// The path to folder containing the configuration.php file.<br />
<b>JPATH_CONFIGURATION</b><br />
// The path to the installation folder.<br />
@ -5217,37 +5380,49 @@ COM_COMPONENTBUILDER_LOCAL="Local"
COM_COMPONENTBUILDER_LOCAL_GET="Local (get)"
COM_COMPONENTBUILDER_LOCAL_SNIPPET="Local snippet"
COM_COMPONENTBUILDER_MAIN_MENU="Main Menu"
COM_COMPONENTBUILDER_MATCH_BEHAVIOR="Match Behavior"
COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour"
COM_COMPONENTBUILDER_MATCH_FIELD="Match Field"
COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options"
COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)"
COM_COMPONENTBUILDER_MERGE="Merge"
COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT="Minify JavaScript"
COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)"
COM_COMPONENTBUILDER_NAME="Name"
COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)"
COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)"
COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet"
COM_COMPONENTBUILDER_NEED_HELP="Need help?"
COM_COMPONENTBUILDER_NEW="New"
COM_COMPONENTBUILDER_NEW_ISSUE="New Issue"
COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_SNIPPET_AS_NEW="New means that we could not find a local snippet with the same name, library and type, and so have marked this snippet as new."
COM_COMPONENTBUILDER_NEW_NOTICE="New Notice"
COM_COMPONENTBUILDER_NO="No"
COM_COMPONENTBUILDER_NONE_DB="None DB"
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN="No component was selected, please make a selection of one component and try again!"
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)"
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested."
COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND="No description found."
COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
COM_COMPONENTBUILDER_NO_FOUND="No Found"
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found"
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
COM_COMPONENTBUILDER_NO_LANGUAGES_UPDATE_SERVER_FOUND="No Languages Update server found."
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match"
COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found"
COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here."
COM_COMPONENTBUILDER_NO_TYPE="No Type"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN="Only one component can be cloned at a time, please select one and try again!"
COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the <b>None DB</b> option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database."
COM_COMPONENTBUILDER_ON_GITHUB="on Github"
COM_COMPONENTBUILDER_OPEN="Open"
COM_COMPONENTBUILDER_OPENED="opened"
@ -5261,6 +5436,7 @@ COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
COM_COMPONENTBUILDER_PACKAGE="Package"
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
@ -5268,21 +5444,30 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>"
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: <code>%s</code> <br />%s %s"
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB where this %s is linked."
COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)"
COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package <b>has no</b> checksum validation!"
COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile."
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later"
COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties<br /><small>Here you can set the properties for this field.</small>"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name"
COM_COMPONENTBUILDER_PROPERTY_VALUE="Property Value"
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_QUITE="Quite"
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
COM_COMPONENTBUILDER_RENAME="Rename"
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: <b>%s</b>"
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type=&quot;list&quot;: that is, that the element is a select list."
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933."
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named &quot;field&quot;, eg:%s"
COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets"
COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
@ -5292,9 +5477,11 @@ COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved."
COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another."
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
COM_COMPONENTBUILDER_SEARCHABLE="Searchable"
COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info"
COM_COMPONENTBUILDER_SELECTION="selection"
COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_SELECT_A_PROPERTY="Select a property"
COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_OR_LESS_INFORMATION_DURING_IMPORT="Select if the import should be showing more or less information during import."
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import"
@ -5445,12 +5632,18 @@ COM_COMPONENTBUILDER_SERVER_USERNAME_LABEL="Username<br /><small>(encrypted fiel
COM_COMPONENTBUILDER_SERVER_USERNAME_MESSAGE="Error! Please add the username here."
COM_COMPONENTBUILDER_SERVER_VERSION_DESC="A count of the number of times this Server has been revised."
COM_COMPONENTBUILDER_SERVER_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD="Set a class value for the list view of this field."
COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets"
COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?"
COM_COMPONENTBUILDER_SHOULD_THE_JAVASCRIPT_BE_MINIFIED_IN_THE_COMPONENT="Should the JavaScript be minified in the component."
COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW="Should this field be escaped in the list view."
COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import."
COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported."
COM_COMPONENTBUILDER_SHOULD_WE_MERGE_THE_COMPONENTS_WITH_SIMILAR_LOCAL_COMPONENTS_MERGING_THE_COMPONENTS_USE_TO_BE_THE_DEFAULT_BEHAVIOUR_BUT_NOW_YOU_CAN_IMPORT_THE_COMPONENTS_AND_FORCE_IT_NOT_TO_MERGE_THE_FOLLOWING_AREAS_VALIDATION_RULE_FIELDTYPE_SNIPPET_LANGUAGE_LANGUAGE_TRANSLATION_BMUST_AND_WILL_STILLB_MERGE_EVEN_OF_YOUR_SELECTION_IS_BNOB_BECAUSE_OF_THE_SINGULAR_NATURE_OF_THOSE_AREAS="Should we merge the component/s with similar local component/s. Merging the component/s use to be the default behaviour, but now you can import the component/s and force it not to merge. The following areas (validation_rule, fieldtype, snippet, language, language_translation) <b>must and will still</b> merge even of your selection is <b>No</b>, because of the singular nature of those areas."
COM_COMPONENTBUILDER_SHOW="Show"
COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW="Show in list view"
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."
COM_COMPONENTBUILDER_SITE_VIEW="Site View"
@ -5927,8 +6120,6 @@ COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC="Allows users in this group to use
COM_COMPONENTBUILDER_SNIPPETS_COULD_NOT_BE_UPDATEDSAVED="Snippets could not be updated/saved"
COM_COMPONENTBUILDER_SNIPPETS_CREATE="Snippets Create"
COM_COMPONENTBUILDER_SNIPPETS_CREATE_DESC="Allows the users in this group to create create snippets"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD="Snippets Dashboard Add"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST="Snippets Dashboard List"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DELETE="Snippets Delete"
@ -6109,7 +6300,11 @@ COM_COMPONENTBUILDER_SNIPPET_USAGE_HINT="Add Usage Here"
COM_COMPONENTBUILDER_SNIPPET_USAGE_LABEL="Usage"
COM_COMPONENTBUILDER_SNIPPET_VERSION_DESC="A count of the number of times this Snippet has been revised."
COM_COMPONENTBUILDER_SNIPPET_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB="Some <b>Custom files</b> were moved to <b>%s</b>"
COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB="Some <b>Images</b> were moved to <b>%s</b>"
COM_COMPONENTBUILDER_SORRY_THIS_FUNCTION_NAME_IS_ALREADY_IN_USE="Sorry this function name is already in use!"
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME="Sorry this validation rule name (%s) already exist as part of the Joomla core! No need to create it, if you are adapting it give it your own unique name."
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM="Sorry this validation rule name (%s) already exist in your system!"
COM_COMPONENTBUILDER_SORTABLE="Sortable"
COM_COMPONENTBUILDER_SUBMENU="Submenu"
COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views"
@ -6131,13 +6326,14 @@ COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers"
COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved."
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
COM_COMPONENTBUILDER_S_NOT_LINKED="%s Not Linked"
COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please wait! The component is being compiled"
COM_COMPONENTBUILDER_TAB="Tab"
COM_COMPONENTBUILDER_TARGET_BEHAVIOR="Target Behavior"
COM_COMPONENTBUILDER_TARGET_BEHAVIOUR="Target Behaviour"
COM_COMPONENTBUILDER_TARGET_FIELDS="Target Field/s"
COM_COMPONENTBUILDER_TARGET_PATH="Target Path"
COM_COMPONENTBUILDER_TARGET_RELATION="Target Relation"
@ -6195,6 +6391,7 @@ COM_COMPONENTBUILDER_TEMPLATE_ALIAS_DESCRIPTION="Add Name in Code Here"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_HINT="codename"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL="Name in Code"
COM_COMPONENTBUILDER_TEMPLATE_ALIAS_MESSAGE="Error! Please add name in code here."
COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS="Template Code Snippets"
COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_DESC="The user that created this Template."
COM_COMPONENTBUILDER_TEMPLATE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_TEMPLATE_CREATED_DATE_DESC="The date this Template was created."
@ -6263,13 +6460,19 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new sn
COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time"
COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time"
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the [Get Package] button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The <b>None DB</b> option will remove this field from being saved in the database."
COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>phpseclib\NET\SFTP</b> library\class is not available! This library\class should have been added to your <b>libraries/vdm_io/vendor</b> folder. Please contact your system administrator for more info"
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> path on <b>%s</b> server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> server."
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>%s</b> library\class is not available! This library\class should have been added to your <b>libraries/vdm_io/vendor</b> folder. Please contact your system administrator for more info!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The <b>%s</b> library can not be deleted, or things will break."
COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW="The <b>Show in list view</b> option will Add this field to the admin list view."
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"
@ -6279,6 +6482,7 @@ COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders"
COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks"
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL="The Component with all linked admin views, fields linked to admin views, custom admin views, site views, templates and layouts were cloned successful!"
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
@ -6299,9 +6503,12 @@ COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Succ
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> checksum validation! Please validate this checksum: <b>%s</b> to be the same as the one found @ <a %s %s</a>"
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
COM_COMPONENTBUILDER_TITLE="Title"
COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads"
COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE="To add simply copy and past the snippet into your code."
COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED="To add validation to a field if validation is not part of field type properties loaded above. So if you have validation set as a field property this extra property will not be needed."
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the <b>JCB Global Options</b>, go to the <b>Company</b> tab and add the correct company details there."
COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_TO_SHARE_THESE_SNIPPETS_WITH_THE_REST_OF_THE_JCB_COMMUNITY="To share these snippets with the rest of the JCB community,"
@ -6313,6 +6520,8 @@ COM_COMPONENTBUILDER_TYPE="Type"
COM_COMPONENTBUILDER_TYPE_ASC="Type (Asc)"
COM_COMPONENTBUILDER_TYPE_DESC="Type (Desc)"
COM_COMPONENTBUILDER_TYPE_ERROR="Type Error"
COM_COMPONENTBUILDER_TYPE_NAME="Type - Name"
COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options"
COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_UPDATE="Update"
@ -6324,6 +6533,91 @@ COM_COMPONENTBUILDER_USED_IN="used in"
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_USE_KEY="Use Key"
COM_COMPONENTBUILDER_VALIDATE="Validate"
COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME="Validates that the value does NOT appear as a username on the system; that is, that it is a valid new username. Does not syntax check it as a valid name."
COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS="Validates that the value is a URL with a valid scheme (which can be restricted by the optional comma-separated field 'scheme'), and passes a basic syntax check. eg:%s"
COM_COMPONENTBUILDER_VALIDATION_RULE="Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_OPTIONS="Batch process the selected Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_TIP="All changes will be applied to all selected Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE="Validation Rules Create"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC="Allows the users in this group to create create validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST="Validation Rules Dashboard List"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE="Validation Rules Delete"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC="Allows the users in this group to delete delete validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT="Validation Rules Edit"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC="Allows the users in this group to edit the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN="Validation Rules Edit Own"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC="Allows the users in this group to edit edit own validation rules created by them"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE="Validation Rules Edit State"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION="Validation Rules Edit Version"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT="Validation Rules Export"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this group to export export validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_ARCHIVED="%s Validation Rules archived."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_ARCHIVED_1="%s Validation Rule archived."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_0="No Validation Rule successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_1="%d Validation Rule successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_CHECKED_IN_MORE="%d Validation Rules successfully checked in."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_DELETED="%s Validation Rules deleted."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_DELETED_1="%s Validation Rule deleted."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_FEATURED="%s Validation Rules featured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_FEATURED_1="%s Validation Rule featured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_PUBLISHED="%s Validation Rules published."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_PUBLISHED_1="%s Validation Rule published."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_TRASHED="%s Validation Rules trashed."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_TRASHED_1="%s Validation Rule trashed."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNFEATURED="%s Validation Rules unfeatured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNFEATURED_1="%s Validation Rule unfeatured."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNPUBLISHED="%s Validation Rules unpublished."
COM_COMPONENTBUILDER_VALIDATION_RULES_N_ITEMS_UNPUBLISHED_1="%s Validation Rule unpublished."
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_DESC="The user that created this Validation Rule."
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_DESC="The date this Validation Rule was created."
COM_COMPONENTBUILDER_VALIDATION_RULE_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_VALIDATION_RULE_EDIT="Editing the Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ERROR_UNIQUE_ALIAS="Another Validation Rule has the same alias."
COM_COMPONENTBUILDER_VALIDATION_RULE_EXTENDS_FORMRULE="Extends FormRule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ID="Id"
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT="Inherit"
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_DESCRIPTION="Select an existing validation rule that you would like to adapt."
COM_COMPONENTBUILDER_VALIDATION_RULE_INHERIT_LABEL="Existing Validation Rules"
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_DESC="The last user that modified this Validation Rule."
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_DESC="The date this Validation Rule was modified."
COM_COMPONENTBUILDER_VALIDATION_RULE_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME="Name"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Validation rule name already taken, please try again."
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_DESCRIPTION="The name for this validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_LABEL="Name"
COM_COMPONENTBUILDER_VALIDATION_RULE_NEW="A New Validation Rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_VALIDATION_RULE_PERMISSION="Permissions"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP="Php"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_HINT="// PHP class methods and fields can be added here"
COM_COMPONENTBUILDER_VALIDATION_RULE_PHP_LABEL="PHP <small>(class methods)</small>"
COM_COMPONENTBUILDER_VALIDATION_RULE_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_VALIDATION_RULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Validation Rule to customise the alias."
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION="Short Description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_DESCRIPTION="Enter short description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_HINT="Your Short Description Here"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_LABEL="Short Description"
COM_COMPONENTBUILDER_VALIDATION_RULE_SHORT_DESCRIPTION_MESSAGE="Error! Please add some short description here."
COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS="Status"
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC="A count of the number of times this Validation Rule has been revised."
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_VALUE="Value"
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_VERSION="Version"
@ -6342,22 +6636,27 @@ COM_COMPONENTBUILDER_WEBSITE="Website"
COM_COMPONENTBUILDER_WEBSITE_S="Website: %s"
COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates."
COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move <b>%s</b>!"
COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved <b>%s</b>!"
COM_COMPONENTBUILDER_YES="Yes"
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key.<br />Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically."
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically. Unless they have this key above, so do keep it safe."
COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component <b>zip</b> package you would like to import.<br /><small>Please note that smart component import only works with the following format: <b>(.zip)</b></small>"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_SHARE_THE_SNIPPETS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to share the snippets, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then 50 %s is considered bad practice."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S="You have %s %s. Adding more then 50 %s is considered bad practice. Your %s page load in JCB will slowdown. You should consider decoupling some of these %s."
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME="You must add an unique function name."
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME="You must add an unique validation rule name."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE="You must first link an admin or a custom admin view to this component, then you can select it here"
COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!"
COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details."
COM_COMPONENTBUILDER_YOU_SHOULD_ONLY_CONTINUE_THIS_IMPORT_IF_YOU_HAVE_BACKUP_YOUR_COMPONENTS_AND_INSURED_THAT_THE_PACKAGE_OWNER_IS_REPUTABLE="You should only continue this import if you have backup your components, and insured that the package owner is reputable."
COM_COMPONENTBUILDER_YOU_WILL_NEED_TO_KNOW_HOW_S_WORKS_BASIC_YOU_WILL_ALSO_NEED_A_S_ACCOUNT_AND_KNOW_HOW_TO_MAKE_A_PULL_REQUEST_ON_GITHUB="you will need to know how %s works (basic). You will also need a %s account and know how to make a pull request on github."
COM_COMPONENTBUILDER_ZIPPED_FILE_LOCATION="Zipped File Location"
COM_COMPONENTBUILDER__ADD_YOUR_PHP_SCRIPT_HERE="// Add your php script here"
COM_COMPONENTBUILDER__SELECT_COMPONENT_="- Select Component -"
COM_COMPONENTBUILDER__SELECT_PACKAGE_="- Select Package -"
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S=", since you don't have permission to create %s!"
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!"
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_EDIT_S=", since you don't have permission to edit %s!"

View File

@ -412,6 +412,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List"
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access"
@ -420,6 +422,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Vi
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu"
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to update the submenu of the Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access"
@ -428,8 +432,6 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE="Help Documents Create"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_CREATE_DESC="Allows the users in this group to create create help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD="Help Documents Dashboard Add"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST="Help Documents Dashboard List"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the help document"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_DELETE="Help Documents Delete"
@ -478,10 +480,12 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU="Joomla Components Submenu"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC="Allows the users in this group to update the submenu of the joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Export Components Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export components button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages"
COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use"
@ -504,6 +508,8 @@ COM_COMPONENTBUILDER_LANGUAGES_IMPORT="Languages Import"
COM_COMPONENTBUILDER_LANGUAGES_IMPORT_DESC="Allows the users in this group to import import languages"
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu"
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to update the submenu of the language"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS="Language Translations Access"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC="Allows the users in this group to access access language translations"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE="Language Translations Batch Use"
@ -634,6 +640,7 @@ COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries"
COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_MENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access"
COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers"
COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use"
@ -696,8 +703,6 @@ COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE="Snippets Batch Use"
COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch snippets"
COM_COMPONENTBUILDER_SNIPPETS_CREATE="Snippets Create"
COM_COMPONENTBUILDER_SNIPPETS_CREATE_DESC="Allows the users in this group to create create snippets"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD="Snippets Dashboard Add"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_ADD_DESC="Allows the users in this group to update the dashboard add of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST="Snippets Dashboard List"
COM_COMPONENTBUILDER_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the snippet"
COM_COMPONENTBUILDER_SNIPPETS_DELETE="Snippets Delete"
@ -766,3 +771,27 @@ COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE="Validation Rules Create"
COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC="Allows the users in this group to create create validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST="Validation Rules Dashboard List"
COM_COMPONENTBUILDER_VALIDATION_RULES_DASHBOARD_LIST_DESC="Allows the users in this group to update the dashboard list of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE="Validation Rules Delete"
COM_COMPONENTBUILDER_VALIDATION_RULES_DELETE_DESC="Allows the users in this group to delete delete validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT="Validation Rules Edit"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_DESC="Allows the users in this group to edit the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN="Validation Rules Edit Own"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_OWN_DESC="Allows the users in this group to edit edit own validation rules created by them"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE="Validation Rules Edit State"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_STATE_DESC="Allows the users in this group to update the state of the validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION="Validation Rules Edit Version"
COM_COMPONENTBUILDER_VALIDATION_RULES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT="Validation Rules Export"
COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this group to export export validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to update the submenu of the validation rule"

View File

@ -30,7 +30,11 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_create_edit_notice'
'note_create_edit_notice',
'alias_builder_type',
'note_alias_builder_custom',
'note_alias_builder_default',
'alias_builder'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,49 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage data_base_fullwidth.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_no_database_settings_needed',
'note_database_settings_needed'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -13,7 +13,7 @@
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php
@subpackage data_base_left.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@ -30,18 +30,11 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'fieldtype',
'name',
'catid',
'datatype',
'datalenght',
'datalenght_other',
'datadefault',
'datadefault_other',
'indexes',
'null_switch',
'store',
'note_whmcs_encryption'
'datadefault_other'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,57 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage data_base_right.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'indexes',
'null_switch',
'store',
'note_whmcs_encryption'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,43 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage set_properties_above.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'fieldtype',
'name',
'catid'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -13,7 +13,7 @@
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage details_fullwidth.php
@subpackage set_properties_fullwidth.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'xml',
'note_select_field_type',
'note_filter_information'
);

View File

@ -13,7 +13,7 @@
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage details_under.php
@subpackage set_properties_under.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved

View File

@ -0,0 +1,49 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage type_info_fullwidth.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'helpnote',
'xml'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -61,10 +61,10 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
</th>
<th data-breakpoints="all" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?>
@ -104,6 +104,9 @@ $can = ComponentbuilderHelper::getActions('field');
<td>
<?php echo JText::_($item->null_switch); ?>
</td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap">
<?php if ($user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $displayData->escape($item->category_title); ?></a>
@ -111,9 +114,6 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo $displayData->escape($item->category_title); ?>
<?php endif; ?>
</td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>">

View File

@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'entranslation',
'source',
'translation',
'components'
);

View File

@ -0,0 +1,41 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_above.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'inherit'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,48 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_fullwidth.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'php'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -13,7 +13,7 @@
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage details_right.php
@subpackage extends_formrule_left.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'helpnote'
'name'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,54 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage extends_formrule_right.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'short_description'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,58 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,60 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -879,9 +879,9 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -869,9 +869,9 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -100,6 +100,210 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->html_import_view))
{
// base64 Decode html_import_view.
$item->html_import_view = base64_decode($item->html_import_view);
}
if (!empty($item->php_import_save))
{
// base64 Decode php_import_save.
$item->php_import_save = base64_decode($item->php_import_save);
}
if (!empty($item->php_import_headers))
{
// base64 Decode php_import_headers.
$item->php_import_headers = base64_decode($item->php_import_headers);
}
if (!empty($item->php_getitem))
{
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (!empty($item->php_getitems))
{
// base64 Decode php_getitems.
$item->php_getitems = base64_decode($item->php_getitems);
}
if (!empty($item->php_getitems_after_all))
{
// base64 Decode php_getitems_after_all.
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
}
if (!empty($item->css_view))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->php_getlistquery))
{
// base64 Decode php_getlistquery.
$item->php_getlistquery = base64_decode($item->php_getlistquery);
}
if (!empty($item->php_before_save))
{
// base64 Decode php_before_save.
$item->php_before_save = base64_decode($item->php_before_save);
}
if (!empty($item->css_views))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->php_save))
{
// base64 Decode php_save.
$item->php_save = base64_decode($item->php_save);
}
if (!empty($item->php_postsavehook))
{
// base64 Decode php_postsavehook.
$item->php_postsavehook = base64_decode($item->php_postsavehook);
}
if (!empty($item->javascript_view_file))
{
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
}
if (!empty($item->php_allowedit))
{
// base64 Decode php_allowedit.
$item->php_allowedit = base64_decode($item->php_allowedit);
}
if (!empty($item->php_batchcopy))
{
// base64 Decode php_batchcopy.
$item->php_batchcopy = base64_decode($item->php_batchcopy);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->php_batchmove))
{
// base64 Decode php_batchmove.
$item->php_batchmove = base64_decode($item->php_batchmove);
}
if (!empty($item->php_before_publish))
{
// base64 Decode php_before_publish.
$item->php_before_publish = base64_decode($item->php_before_publish);
}
if (!empty($item->javascript_views_file))
{
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
}
if (!empty($item->php_after_publish))
{
// base64 Decode php_after_publish.
$item->php_after_publish = base64_decode($item->php_after_publish);
}
if (!empty($item->php_before_delete))
{
// base64 Decode php_before_delete.
$item->php_before_delete = base64_decode($item->php_before_delete);
}
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->php_after_delete))
{
// base64 Decode php_after_delete.
$item->php_after_delete = base64_decode($item->php_after_delete);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->php_controller))
{
// base64 Decode php_controller.
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_model))
{
// base64 Decode php_model.
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->php_import_display))
{
// base64 Decode php_import_display.
$item->php_import_display = base64_decode($item->php_import_display);
}
if (!empty($item->php_model_list))
{
// base64 Decode php_model_list.
$item->php_model_list = base64_decode($item->php_model_list);
}
if (!empty($item->php_import))
{
// base64 Decode php_import.
$item->php_import = base64_decode($item->php_import);
}
if (!empty($item->php_import_setdata))
{
// base64 Decode php_import_setdata.
$item->php_import_setdata = base64_decode($item->php_import_setdata);
}
if (!empty($item->php_ajaxmethod))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_import_ext))
{
// base64 Decode php_import_ext.
$item->php_import_ext = base64_decode($item->php_import_ext);
}
if (!empty($item->addpermissions))
{
// Convert the addpermissions field to an array.
@ -132,6 +336,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->addtables = $addtables->toArray();
}
if (!empty($item->alias_builder))
{
// Convert the alias_builder field to an array.
$alias_builder = new Registry;
$alias_builder->loadString($item->alias_builder);
$item->alias_builder = $alias_builder->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
@ -148,210 +360,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->ajax_input = $ajax_input->toArray();
}
if (!empty($item->php_import_save))
{
// base64 Decode php_import_save.
$item->php_import_save = base64_decode($item->php_import_save);
}
if (!empty($item->html_import_view))
{
// base64 Decode html_import_view.
$item->html_import_view = base64_decode($item->html_import_view);
}
if (!empty($item->php_import_headers))
{
// base64 Decode php_import_headers.
$item->php_import_headers = base64_decode($item->php_import_headers);
}
if (!empty($item->css_view))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->php_getitems))
{
// base64 Decode php_getitems.
$item->php_getitems = base64_decode($item->php_getitems);
}
if (!empty($item->php_getitems_after_all))
{
// base64 Decode php_getitems_after_all.
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
}
if (!empty($item->css_views))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->php_getlistquery))
{
// base64 Decode php_getlistquery.
$item->php_getlistquery = base64_decode($item->php_getlistquery);
}
if (!empty($item->php_before_save))
{
// base64 Decode php_before_save.
$item->php_before_save = base64_decode($item->php_before_save);
}
if (!empty($item->javascript_view_file))
{
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
}
if (!empty($item->php_save))
{
// base64 Decode php_save.
$item->php_save = base64_decode($item->php_save);
}
if (!empty($item->php_postsavehook))
{
// base64 Decode php_postsavehook.
$item->php_postsavehook = base64_decode($item->php_postsavehook);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->php_allowedit))
{
// base64 Decode php_allowedit.
$item->php_allowedit = base64_decode($item->php_allowedit);
}
if (!empty($item->php_batchcopy))
{
// base64 Decode php_batchcopy.
$item->php_batchcopy = base64_decode($item->php_batchcopy);
}
if (!empty($item->javascript_views_file))
{
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
}
if (!empty($item->php_batchmove))
{
// base64 Decode php_batchmove.
$item->php_batchmove = base64_decode($item->php_batchmove);
}
if (!empty($item->php_before_publish))
{
// base64 Decode php_before_publish.
$item->php_before_publish = base64_decode($item->php_before_publish);
}
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->php_after_publish))
{
// base64 Decode php_after_publish.
$item->php_after_publish = base64_decode($item->php_after_publish);
}
if (!empty($item->php_before_delete))
{
// base64 Decode php_before_delete.
$item->php_before_delete = base64_decode($item->php_before_delete);
}
if (!empty($item->php_after_delete))
{
// base64 Decode php_after_delete.
$item->php_after_delete = base64_decode($item->php_after_delete);
}
if (!empty($item->php_controller))
{
// base64 Decode php_controller.
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->php_model))
{
// base64 Decode php_model.
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_model_list))
{
// base64 Decode php_model_list.
$item->php_model_list = base64_decode($item->php_model_list);
}
if (!empty($item->php_import_display))
{
// base64 Decode php_import_display.
$item->php_import_display = base64_decode($item->php_import_display);
}
if (!empty($item->php_ajaxmethod))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_import))
{
// base64 Decode php_import.
$item->php_import = base64_decode($item->php_import);
}
if (!empty($item->php_import_setdata))
{
// base64 Decode php_import_setdata.
$item->php_import_setdata = base64_decode($item->php_import_setdata);
}
if (!empty($item->php_import_ext))
{
// base64 Decode php_import_ext.
$item->php_import_ext = base64_decode($item->php_import_ext);
}
if (!empty($item->php_getitem))
{
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (empty($item->id))
{
@ -1236,6 +1244,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['addtables'] = '';
}
// Set the alias_builder items to data.
if (isset($data['alias_builder']) && is_array($data['alias_builder']))
{
$alias_builder = new JRegistry;
$alias_builder->loadArray($data['alias_builder']);
$data['alias_builder'] = (string) $alias_builder;
}
elseif (!isset($data['alias_builder']))
{
// Set the empty alias_builder to data
$data['alias_builder'] = '';
}
// Set the custom_button items to data.
if (isset($data['custom_button']) && is_array($data['custom_button']))
{
@ -1262,28 +1283,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['ajax_input'] = '';
}
// Set the php_import_save string to base64 string.
if (isset($data['php_import_save']))
{
$data['php_import_save'] = base64_encode($data['php_import_save']);
}
// Set the html_import_view string to base64 string.
if (isset($data['html_import_view']))
{
$data['html_import_view'] = base64_encode($data['html_import_view']);
}
// Set the php_import_save string to base64 string.
if (isset($data['php_import_save']))
{
$data['php_import_save'] = base64_encode($data['php_import_save']);
}
// Set the php_import_headers string to base64 string.
if (isset($data['php_import_headers']))
{
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
}
// Set the css_view string to base64 string.
if (isset($data['css_view']))
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['css_view'] = base64_encode($data['css_view']);
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the php_getitems string to base64 string.
@ -1298,10 +1319,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
}
// Set the css_views string to base64 string.
if (isset($data['css_views']))
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_views'] = base64_encode($data['css_views']);
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the php_getlistquery string to base64 string.
@ -1316,10 +1337,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_save'] = base64_encode($data['php_before_save']);
}
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
// Set the css_views string to base64 string.
if (isset($data['css_views']))
{
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the php_save string to base64 string.
@ -1334,10 +1355,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
}
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
}
// Set the php_allowedit string to base64 string.
@ -1352,10 +1373,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
}
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the php_batchmove string to base64 string.
@ -1370,10 +1391,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
}
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
}
// Set the php_after_publish string to base64 string.
@ -1388,22 +1409,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_before_delete'] = base64_encode($data['php_before_delete']);
}
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
// Set the php_after_delete string to base64 string.
if (isset($data['php_after_delete']))
{
$data['php_after_delete'] = base64_encode($data['php_after_delete']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
{
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the php_controller string to base64 string.
if (isset($data['php_controller']))
{
$data['php_controller'] = base64_encode($data['php_controller']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['php_document'] = base64_encode($data['php_document']);
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_model string to base64 string.
@ -1418,28 +1451,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_model_list string to base64 string.
if (isset($data['php_model_list']))
{
$data['php_model_list'] = base64_encode($data['php_model_list']);
}
// Set the php_import_display string to base64 string.
if (isset($data['php_import_display']))
{
$data['php_import_display'] = base64_encode($data['php_import_display']);
}
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
// Set the php_model_list string to base64 string.
if (isset($data['php_model_list']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
$data['php_model_list'] = base64_encode($data['php_model_list']);
}
// Set the php_import string to base64 string.
@ -1454,16 +1475,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import_setdata'] = base64_encode($data['php_import_setdata']);
}
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
}
// Set the php_import_ext string to base64 string.
if (isset($data['php_import_ext']))
{
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
}
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the Params Items to data

View File

@ -262,74 +262,74 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue;
}
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);

View File

@ -168,6 +168,19 @@ class ComponentbuilderModelAjax extends JModelList
}
$result['path'] = '<code>' . $path . '</code>';
}
elseif ('expand' === $type)
{
$result['error'] = '<span style="color: red;">' . JText::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . '</span>';
if ($this->hasCurl())
{
$path = '* * * * * curl -s "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
}
else
{
$path = '* * * * * wget "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
}
$result['path'] = '<code>' . $path . '</code>';
}
return $result;
}
@ -215,6 +228,7 @@ class ComponentbuilderModelAjax extends JModelList
'library_files_folders_urls' => 'libraries_files_folders_urls',
'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'component_admin_views' => 'components_admin_views' ,
'component_site_views' => 'components_site_views',
@ -227,7 +241,7 @@ class ComponentbuilderModelAjax extends JModelList
'component_files_folders' => 'components_files_folders',
'language' => true);
public function getButton($type)
public function getButton($type, $size)
{
if (isset($this->buttonArray[$type]))
{
@ -244,18 +258,27 @@ class ComponentbuilderModelAjax extends JModelList
// only load referal if not new item.
$ref = '&amp;ref=' . $values['a_view'] . '&amp;refid=' . $values['a_id'];
}
// build the button
$button = '<div class="control-group">
<div class="control-label">
<label>' . ucwords($type) . '</label>
</div>
<div class="controls">
<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&amp;view='.$type.'&amp;layout=edit'.$ref.'\' })" href="javascript:void(0)" >
<span class="icon-new icon-white"></span>
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
</a>
</div>
</div>';
// build url (A tag)
$startAtag = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&amp;view='.$type.'&amp;layout=edit'.$ref.'\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">';
// build the smaller button
if (2 == $size)
{
$button = $startAtag.'<span class="icon-new icon-white"></span> ' . JText::_('COM_COMPONENTBUILDER_CREATE') . '</a>';
}
else
// build the big button
{
$button = '<div class="control-group">
<div class="control-label">
<label>' . ucwords($type) . '</label>
</div>
<div class="controls"> '.$startAtag.'
<span class="icon-new icon-white"></span>
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
</a>
</div>
</div>';
}
// return the button attached to input field
return $button;
}
@ -307,7 +330,7 @@ class ComponentbuilderModelAjax extends JModelList
$button[] = '</div>';
$button[] = '<div class="controls">';
}
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" >';
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" title="'.$buttonText.'">';
if (1 == $size)
{
$button[] = '<span class="'.$icon.' icon-white"></span>';
@ -335,7 +358,36 @@ class ComponentbuilderModelAjax extends JModelList
return '';
}
public static function getDynamicScripts($type)
public function checkAliasField($type)
{
// get the view name & id
$values = $this->getViewID();
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray))
{
// get the fields
if ($fields = ComponentbuilderHelper::getVar('admin_fields', $values['a_id'], 'admin_view', 'addfields'))
{
// open the fields
if (ComponentbuilderHelper::checkJson($fields))
{
$fields = json_decode($fields, true);
if (ComponentbuilderHelper::checkArray($fields))
{
foreach($fields as $field)
{
if (isset($field['alias']) && $field['alias'] == 1)
{
return true;
}
}
}
}
}
}
return false;
}
public function getDynamicScripts($type)
{
// get from global helper
return ComponentbuilderHelper::getDynamicScripts($type);
@ -348,7 +400,7 @@ class ComponentbuilderModelAjax extends JModelList
'type' => 'setURLType',
// Admin View
'field' => 'setItemNames',
'list' => 'setYesNo',
'list' => 'setAdminBehaviour',
'title' => 'setYesNo',
'alias' => 'setYesNo',
'sort' => 'setYesNo',
@ -394,7 +446,7 @@ class ComponentbuilderModelAjax extends JModelList
'update' => JText::_('COM_COMPONENTBUILDER_UPDATE'),
// Admin View (fields)
'field' => JText::_('COM_COMPONENTBUILDER_FIELD'),
'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_LIST'),
'list' => JText::_('COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR'),
'order_list' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS'),
'title' => JText::_('COM_COMPONENTBUILDER_TITLE'),
'alias' => JText::_('COM_COMPONENTBUILDER_ALIAS'),
@ -408,10 +460,10 @@ class ComponentbuilderModelAjax extends JModelList
'order_edit' => JText::_('COM_COMPONENTBUILDER_ORDER_IN_EDIT'),
// Admin View (conditions)
'target_field' => JText::_('COM_COMPONENTBUILDER_TARGET_FIELDS'),
'target_behavior' => JText::_('COM_COMPONENTBUILDER_TARGET_BEHAVIOR'),
'target_behavior' => JText::_('COM_COMPONENTBUILDER_TARGET_BEHAVIOUR'),
'target_relation' => JText::_('COM_COMPONENTBUILDER_TARGET_RELATION'),
'match_field' => JText::_('COM_COMPONENTBUILDER_MATCH_FIELD'),
'match_behavior' => JText::_('COM_COMPONENTBUILDER_MATCH_BEHAVIOR'),
'match_behavior' => JText::_('COM_COMPONENTBUILDER_MATCH_BEHAVIOUR'),
'match_options' => JText::_('COM_COMPONENTBUILDER_MATCH_OPTIONS'),
// Joomla Component
'menu' => JText::_('COM_COMPONENTBUILDER_ADD_MENU'),
@ -831,7 +883,8 @@ class ComponentbuilderModelAjax extends JModelList
if ($this->canEdit($id, $view))
{
$edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref;
return ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil"></a>';
$title = ComponentbuilderHelper::safeString(JText::_('COM_COMPONENTBUILDER_EDIT').' '.$view, 'W');
return ' <a onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil" title="'.$title.'"></a>';
}
return '';
@ -849,6 +902,22 @@ class ComponentbuilderModelAjax extends JModelList
return $this->user->authorise($view.'.edit', 'com_componentbuilder.'.$view.'.' . (int) $id);
}
protected function setAdminBehaviour($header, $value)
{
switch ($value)
{
case 1:
return JText::_('COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW');
break;
case 2:
return JText::_('COM_COMPONENTBUILDER_NONE_DB');
break;
default:
return JText::_('COM_COMPONENTBUILDER_DEFAULT');
break;
}
}
protected $tabNames = array();
protected function setTabName($header, $value)
@ -1120,8 +1189,12 @@ class ComponentbuilderModelAjax extends JModelList
// get the linked to
if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id']))
{
// just return it for now as an unordered list
return '<div class="control-group"><ul class="uk-list uk-list-striped"><li>' .implode('</li><li>', $linked) . '</li></ul></div></div>';
// just return it for now a table
$table = '<div class="control-group"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::sprintf('COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED', ComponentbuilderHelper::safeString($values['a_view'], 'w')).'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_TYPE_NAME').'</th></tr></thead>';
$table .= '<tbody><tr><td>' .implode('</td></tr><tr><td>', $linked) . '</td></tr></tbody></table></div>';
return $table;
}
}
}
@ -1299,66 +1372,92 @@ class ComponentbuilderModelAjax extends JModelList
// Used in template
public function getTemplateDetails($id)
{
// set table
$table = false;
// Get a db connection.
$db = JFactory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.template','b.name')));
$query->select($db->quoteName(array('a.id','a.alias','a.template','b.name','a.dynamic_get')));
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
$query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$results = $db->loadObjectList();
$templateString = array('<h3>Template Code Snippets</h3><div class="row-fluid form-horizontal-desktop">');
$templateString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
}
foreach ($results as $result)
{
$templateString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code></div>";
$edit = ($button = $this->addEditLink($result->id, 'template', 'templates')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
$templateString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code> ".$edit."</td>";
}
$templateString[] = "</div><hr />";
return implode("\n",$templateString);
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_TEMPLATE_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$templateString)."</tr></tbody></table></div>";
}
return false;
return $table;
}
// Used in layout
public function getLayoutDetails($id)
{
// set table
$table = false;
// Get a db connection.
$db = JFactory::getDbo();
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name')));
$query->select($db->quoteName(array('a.id','a.alias','a.layout','b.getcustom','b.gettype','b.name','a.dynamic_get')));
$query->from($db->quoteName('#__componentbuilder_layout', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
$query->where($db->quoteName('a.published') . ' = 1');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$results = $db->loadObjectList();
$layoutString = array('<h3>Layout Code Snippets</h3><div class="row-fluid form-horizontal-desktop">');
$layoutString = array();
// get the view name & id
$values = $this->getViewID();
// check if we are in the correct view.
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
{
// set the return ref
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
}
foreach ($results as $result)
{
$edit = ($button = $this->addEditLink($result->id, 'layout', 'layouts')) ? $button : '';
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
switch ($result->gettype)
{
case 1:
// single
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code> ".$edit."</td>";
break;
case 2:
// list
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code> ".$edit."</td>";
break;
case 3:
case 4:
@ -1372,14 +1471,17 @@ class ComponentbuilderModelAjax extends JModelList
{
$varName = $result->getcustom;
}
$layoutString[] = "<div>dynamicGet: <b>".$result->name."</b><br /><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code></div>";
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code> ".$edit."</td>";
break;
}
}
$layoutString[] = "</div><hr />";
return implode("\n",$layoutString);
// build the table
$table = '<h2>'.JText::_('COM_COMPONENTBUILDER_LAYOUT_CODE_SNIPPETS').'</h2><div class="uk-scrollable-box"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::_('COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE').'</caption>';
$table .= '<thead><tr><th>'.JText::_('COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET').'</th><th>'.JText::_('COM_COMPONENTBUILDER_SNIPPET').'</th></thead>';
$table .= '<tbody><tr>'.implode("</tr><tr>",$layoutString)."</tr></tbody></table></div>";
}
return false;
return $table;
}
// Used in dynamic_get
@ -2029,15 +2131,405 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
// Used in field
public function getFieldOptions($id)
// Used in validation_rule
public function getExistingValidationRuleCode($name)
{
if ($field = ComponentbuilderHelper::getFieldOptions($id, 'id'))
// make sure we have all the exiting rule names
if ($names = ComponentbuilderHelper::getExistingValidationRuleNames())
{
// check that this is a valid rule file
if (ComponentbuilderHelper::checkArray($names) && in_array($name, $names))
{
// get the full path to rule file
$path = JPATH_LIBRARIES . '/src/Form/Rule/'.$name.'Rule.php';
// get all the code
if ($code = ComponentbuilderHelper::getFileContents($path))
{
// remove the class details and the ending }
$codeArray = (array) explode("FormRule\n{\n", $code);
if (isset($codeArray[1]))
{
return array('values' => rtrim(rtrim(rtrim($codeArray[1]),'}')));
}
}
}
}
return false;
}
public function checkRuleName($name, $id)
{
$name = ComponentbuilderHelper::safeString($name);
if ($found = ComponentbuilderHelper::getVar('validation_rule', $name, 'name', 'id'))
{
if ((int) $id !== (int) $found)
{
return array (
'message' => JText::sprintf('COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM', $name),
'status' => 'danger',
'timeout' => 6000);
}
}
// now check the existing once
if ($names = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
if (in_array($name, $names))
{
return array (
'message' => JText::sprintf('COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME', $name),
'status' => 'danger',
'timeout' => 10000);
}
}
return array (
'name' => $name,
'message' => JText::sprintf('COM_COMPONENTBUILDER_GREAT_THIS_VALIDATION_RULE_NAME_S_WILL_WORK', $name),
'status' => 'success',
'timeout' => 5000);
}
public function getValidationRulesTable($id)
{
// get all the validation rules
if ($rules = $this->getValidationRules())
{
// build table
$table = '<div class="control-group"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
$table .= '<caption>'.JText::sprintf('COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE').'</caption>';
$table .= '<thead><tr><th class="uk-text-right">'.JText::_('COM_COMPONENTBUILDER_VALIDATE').'</th><th>'.JText::_('COM_COMPONENTBUILDER_DESCRIPTION').'</th></tr></thead>';
$table .= '<tbody>';
foreach ($rules as $name => $decs)
{
// just load the values
$decs = (ComponentbuilderHelper::checkString($decs) && !is_numeric($decs)) ? $decs : '';
$table .= '<tr><td class="uk-text-right"><code>'.$name.'</code></td><td>'. $decs. '</td></tr>';
}
return $table.'</tbody></table></div>';
}
return false;
}
public function getValidationRules()
{
// custom rule names
$names = array();
// make sure we have all the exiting rule names
if (!$exitingNames = ComponentbuilderHelper::getExistingValidationRuleNames(true))
{
// stop (something is wrong)
return false;
}
// convert names to keys
$exitingNames = array_flip($exitingNames);
// load the descriptions (taken from https://docs.joomla.org/Server-side_form_validation)
$exitingNames["boolean"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_THE_VALUES_ZERO_ONE_TRUE_OR_FALSE_CASEINSENSITIVE");
$exitingNames["color"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_EMPTY_VALUES_CONVERTED_TO_ZERO_AND_STRINGS_IN_THE_FORM_RGB_OR_RRGGBB_WHERE_R_G_AND_B_ARE_HEX_VALUES");
$exitingNames["email"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS");
$exitingNames["equals"] = JText::sprintf("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS", '<br /><code>&lt;input<br />&nbsp;&nbsp;type="text"<br />&nbsp;&nbsp;name="email_check"<br />&nbsp;&nbsp;validate="equals"<br />&nbsp;&nbsp;field="email"<br />/&gt;</code>');
$exitingNames["options"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST");
$exitingNames["tel"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE");
$exitingNames["url"] = JText::sprintf("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS", '<br /><code>&lt;input<br />&nbsp;&nbsp;type="text"<br />&nbsp;&nbsp;name="link"<br />&nbsp;&nbsp;validate="url"<br />&nbsp;&nbsp;scheme="http,https,mailto"<br />/&gt;</code>');
$exitingNames["username"] = JText::_("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME");
// now get the custom created rules
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.name','a.short_description')));
$query->from($db->quoteName('#__componentbuilder_validation_rule','a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$names = $db->loadAssocList('name', 'short_description');
}
// merge the arrays
$rules = ComponentbuilderHelper::mergeArrays(array($exitingNames, $names));
// sort the array
ksort($rules);
// return the validation rules
return $rules;
}
// Used in field
// the current extras available
protected $extraFieldProperties = array(
'listclass' => 'COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD',
'escape' => 'COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW',
'display' => 'COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA',
'validate' => 'COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED');
public function getFieldOptions($fieldtype)
{
// get the xml
$xml = $this->getFieldXML($fieldtype);
// now get the field options
if ($field = ComponentbuilderHelper::getFieldOptions($fieldtype, 'id', null, $xml))
{
// get subform field properties object
$properties = $this->buildFieldOptionsSubform($field['subform'], $field['nameListOptions']);
// load the extra options
$extraValues = $this->getFieldExtraValues($xml, $field['nameListOptions']);
// set the nameListOption
$extraNameListOption = $this->extraFieldProperties;
array_walk($extraNameListOption, function (&$value, $key) {
$value = $key;
});
// get subform field object
$extras = $this->buildFieldOptionsSubform($extraValues, $extraNameListOption, 'extraproperties', 'COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL');
// load the html
$field['subform'] = '<div class="control-label prop_removal">'. $properties->label . '</div><div class="controls prop_removal">' . $properties->input . '</div>';
$field['extra'] = '<div class="control-label prop_removal">'. $extras->label . '</div><div class="controls prop_removal">' . $extras->input . '</div>';
// check if we have PHP values
if (ComponentbuilderHelper::checkArray($field['php']))
{
$field['textarea'] = array();
foreach($field['php'] as $name => $values)
{
$value = implode(PHP_EOL, $values['value']);
$textarea = $this->buildFieldTexteara($name, $values['desc'], $value, substr_count( $value, PHP_EOL ));
// load the html
$field['textarea'][] = '<div class="control-label prop_removal">'. $textarea->label . '</div><div class="controls prop_removal">' . $textarea->input . '</div><br />';
}
}
// remove some unneeded values
unset($field['values']);
// return found field options
return $field;
}
return false;
}
protected function getFieldExtraValues($xml, $options)
{
// get the value
$values = array();
// value to check since there are false and null values even 0 in the values returned
$confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB';
$nr = 0;
foreach ($this->extraFieldProperties as $extra => $desc)
{
if (!in_array($extra, $options))
{
$value = ComponentbuilderHelper::getValueFromXMLstring($xml, $extra, $confirmation);
if ($confirmation !== $value)
{
$values['extraproperties' . $nr] = array('name' => $extra, 'value' => $value, 'desc' => JText::_($desc));
$nr++;
}
}
}
// return only if extras founb
if (ComponentbuilderHelper::checkArray($values))
{
return $values;
}
return null;
}
protected function buildFieldTexteara($name, $desc, $default, $rows)
{
// get the textarea
$textarea = JFormHelper::loadFieldType('textarea', true);
// start building the name field XML
$textareaXML = new SimpleXMLElement('<field/>');
// textarea attributes
$textareaAttribute = array(
'type' => 'textarea',
'name' => 'property_'.$name,
'label' => $desc,
'rows' => (int) ($rows >= 3) ? $rows : $rows + 2,
'cols' => '15',
'class' => 'text_area span12',
'filter' => 'RAW',
'hint' => 'COM_COMPONENTBUILDER__ADD_YOUR_PHP_SCRIPT_HERE');
// load the textarea attributes
ComponentbuilderHelper::xmlAddAttributes($textareaXML, $textareaAttribute);
// setup subform with values
$textarea->setup($textareaXML, $default);
// return textarea object
return $textarea;
}
protected function buildFieldOptionsSubform($values, $nameListOptions = null, $name = 'properties', $label = 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL')
{
// get the subform
$subform = JFormHelper::loadFieldType('subform', true);
// start building the subform field XML
$subformXML = new SimpleXMLElement('<field/>');
// subform attributes
$subformAttribute = array(
'type' => 'subform',
'name' => $name,
'label' => $label,
'layout' => 'joomla.form.field.subform.repeatable-table',
'multiple' => 'true',
'icon' => 'list',
'max' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? (int) count($nameListOptions) : 4);
// load the subform attributes
ComponentbuilderHelper::xmlAddAttributes($subformXML, $subformAttribute);
// now add the subform child form
$childForm = $subformXML->addChild('form');
// child form attributes
$childFormAttribute = array(
'hidden' => 'true',
'name' => 'list_properties',
'repeat' => 'true');
// load the child form attributes
ComponentbuilderHelper::xmlAddAttributes($childForm, $childFormAttribute);
// start building the name field XML
$nameXML = new SimpleXMLElement('<field/>');
// subform attributes
$nameAttribute = array(
'type' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? 'list' : 'text',
'name' => 'name',
'label' => 'COM_COMPONENTBUILDER_PROPERTY',
'size' => '40',
'maxlength' => '150',
'class' => (ComponentbuilderHelper::checkArray($nameListOptions)) ? 'list_class field_list_name_options' : 'text_area',
'filter' => 'STRING');
// add the hint only if not name list and description if name list is an array
if (ComponentbuilderHelper::checkArray($nameListOptions))
{
$nameAttribute['description'] = 'COM_COMPONENTBUILDER_SELECTION';
$nameAttribute['multiple'] = 'false';
$nameAttribute['onchange'] = "getFieldPropertyDesc(this, '".$name."')";
}
else
{
$nameAttribute['hint'] = 'COM_COMPONENTBUILDER_PROPERTY_NAME';
}
// load the subform attributes
ComponentbuilderHelper::xmlAddAttributes($nameXML, $nameAttribute);
// add name list if found
if (ComponentbuilderHelper::checkArray($nameListOptions))
{
ComponentbuilderHelper::xmlAddOptions($nameXML, $nameListOptions);
}
// now add the fields to the child form
ComponentbuilderHelper::xmlAppend($childForm, $nameXML);
// start building the name field XML
$valueXML = new SimpleXMLElement('<field/>');
// subform attributes
$valueAttribute = array(
'type' => 'textarea',
'name' => 'value',
'label' => 'COM_COMPONENTBUILDER_VALUE',
'rows' => '1',
'cols' => '15',
'class' => 'text_area span12',
'filter' => 'STRING',
'hint' => 'COM_COMPONENTBUILDER_PROPERTY_VALUE');
// load the subform attributes
ComponentbuilderHelper::xmlAddAttributes($valueXML, $valueAttribute);
// now add the fields to the child form
ComponentbuilderHelper::xmlAppend($childForm, $valueXML);
// start building the desc field XML
$descXML = new SimpleXMLElement('<field/>');
// subform attributes
$descAttribute = array(
'type' => 'textarea',
'name' => 'desc',
'label' => 'COM_COMPONENTBUILDER_DESCRIPTION',
'rows' => '3',
'cols' => '25',
'readonly' => 'true',
'class' => 'text_area span12',
'filter' => 'WORD',
'hint' => 'COM_COMPONENTBUILDER_SELECT_A_PROPERTY');
// load the desc attributes
ComponentbuilderHelper::xmlAddAttributes($descXML, $descAttribute);
// now add the fields to the child form
ComponentbuilderHelper::xmlAppend($childForm, $descXML);
// setup subform with values
$subform->setup($subformXML, $values);
// return subfrom object
return $subform;
}
public function getFieldPropertyDesc($_property, $fieldtype)
{
if (is_numeric($fieldtype))
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('properties', 'short_description', 'description')));
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
$query->where($db->quoteName('id') . ' = '. (int) $fieldtype);
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// get the result
$result = $db->loadObject();
// get the xml
$xml = $this->getFieldXML($fieldtype);
// open the properties
$properties = json_decode($result->properties,true);
// value to check since there are false and null values even 0 in the values returned
$confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB';
// make sure we have an array
if (ComponentbuilderHelper::checkArray($properties))
{
foreach ($properties as $property)
{
if(isset($property['name']) && $_property === $property['name'])
{
// check if we should load the value
$value = ComponentbuilderHelper::getValueFromXMLstring($xml, $property['name'], $confirmation);
if ($confirmation === $value)
{
$value = (isset($property['example']) && ComponentbuilderHelper::checkString($property['example'])) ? $property['example'] : '';
}
// return the found values
return array('value' => $value, 'desc' => $property['description']);
}
}
}
}
}
elseif (isset($this->extraFieldProperties[$_property]))
{
return array('value' => '', 'desc' => JText::_($this->extraFieldProperties[$_property]));
}
return false;
}
protected function getFieldXML($fieldtype)
{
// reset xml to null
$xml = null;
// get the view name & id
$global = $this->getViewID();
// get the xml if this view already has it set
if (!is_null($global['a_id']) && $global['a_id'] > 0 && isset($global['a_view']) && 'field' === $global['a_view'])
{
// first check field type
$_fieldType = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'fieldtype');
// only continue if field type is the same
if ($fieldtype == $_fieldType)
{
$xmlDB = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'xml');
// check if it is a string
if (ComponentbuilderHelper::checkString($xmlDB))
{
$xml = json_decode($xmlDB);
}
}
}
return $xml;
}
// Used in get_snippets

View File

@ -151,7 +151,7 @@ class ComponentbuilderModelCompiler extends JModelList
}
public $compiler;
public function getComponents()
{
// Get a db connection.
@ -169,17 +169,18 @@ class ComponentbuilderModelCompiler extends JModelList
// return the result
return $db->loadObjectList();
}
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr)
{
$set['joomlaVersion'] = $version;
$set['componentId'] = $id;
$set['addBackup'] = $backup;
$set['addRepo'] = $repo;
$set['addPlaceholders'] = $addPlaceholders;
$set['debugLinenr'] = $debugLinenr;
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
{
$set['version'] = $version;
$set['component'] = $id;
$set['backup'] = $backup;
$set['repository'] = $repo;
$set['placeholders'] = $addPlaceholders;
$set['debuglinenr'] = $debugLinenr;
$set['minify'] = $minify;
// start up Compiler
$this->compiler = new Compiler($set);
$this->compiler = new Compiler($set);
if($this->compiler)
{
return true;

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -95,6 +95,12 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_dashboard_methods))
{
// base64 Decode php_dashboard_methods.
$item->php_dashboard_methods = base64_decode($item->php_dashboard_methods);
}
if (!empty($item->dashboard_tab))
{
// Convert the dashboard_tab field to an array.
@ -103,12 +109,6 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$item->dashboard_tab = $dashboard_tab->toArray();
}
if (!empty($item->php_dashboard_methods))
{
// base64 Decode php_dashboard_methods.
$item->php_dashboard_methods = base64_decode($item->php_dashboard_methods);
}
// update the fields
$objectUpdate = new stdClass();
$objectUpdate->id = (int) $item->id;
@ -892,9 +892,9 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -944,9 +944,9 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -43,12 +43,14 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$icons = array();
// view groups array
$viewGroups = array(
'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippet.add', 'png.snippets', 'png||getsnippets||index.php?option=com_componentbuilder&view=get_snippets', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_document.add', 'png.help_documents')
'main' => array('png.compiler', 'png.joomla_component.add', 'png.joomla_components', 'png.admin_view.add', 'png.admin_views', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layout.add', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtype.add', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents')
);
// view access array
$viewAccess = array(
'compiler.submenu' => 'compiler.submenu',
'compiler.dashboard_list' => 'compiler.dashboard_list',
'get_snippets.submenu' => 'get_snippets.submenu',
'get_snippets.dashboard_list' => 'get_snippets.dashboard_list',
'joomla_component.create' => 'joomla_component.create',
'joomla_components.access' => 'joomla_component.access',
'joomla_component.access' => 'joomla_component.access',
@ -101,7 +103,11 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'snippet.access' => 'snippet.access',
'snippets.submenu' => 'snippet.submenu',
'snippets.dashboard_list' => 'snippet.dashboard_list',
'snippet.dashboard_add' => 'snippet.dashboard_add',
'validation_rule.create' => 'validation_rule.create',
'validation_rules.access' => 'validation_rule.access',
'validation_rule.access' => 'validation_rule.access',
'validation_rules.submenu' => 'validation_rule.submenu',
'validation_rules.dashboard_list' => 'validation_rule.dashboard_list',
'field.create' => 'field.create',
'fields.access' => 'field.access',
'field.access' => 'field.access',
@ -133,7 +139,6 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'help_document.access' => 'help_document.access',
'help_documents.submenu' => 'help_document.submenu',
'help_documents.dashboard_list' => 'help_document.dashboard_list',
'help_document.dashboard_add' => 'help_document.dashboard_add',
'admin_fields.create' => 'admin_fields.create',
'admins_fields.access' => 'admin_fields.access',
'admin_fields.access' => 'admin_fields.access',

View File

@ -100,38 +100,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->ajax_input))
{
// Convert the ajax_input field to an array.
$ajax_input = new Registry;
$ajax_input->loadString($item->ajax_input);
$item->ajax_input = $ajax_input->toArray();
}
if (!empty($item->libraries))
{
// Convert the libraries field to an array.
$libraries = new Registry;
$libraries->loadString($item->libraries);
$item->libraries = $libraries->toArray();
}
if (!empty($item->custom_get))
{
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
$custom_button = new Registry;
$custom_button->loadString($item->custom_button);
$item->custom_button = $custom_button->toArray();
}
if (!empty($item->php_jview_display))
{
// base64 Decode php_jview_display.
@ -204,6 +172,38 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->ajax_input))
{
// Convert the ajax_input field to an array.
$ajax_input = new Registry;
$ajax_input->loadString($item->ajax_input);
$item->ajax_input = $ajax_input->toArray();
}
if (!empty($item->libraries))
{
// Convert the libraries field to an array.
$libraries = new Registry;
$libraries->loadString($item->libraries);
$item->libraries = $libraries->toArray();
}
if (!empty($item->custom_get))
{
// Convert the custom_get field to an array.
$custom_get = new Registry;
$custom_get->loadString($item->custom_get);
$item->custom_get = $custom_get->toArray();
}
if (!empty($item->custom_button))
{
// Convert the custom_button field to an array.
$custom_button = new Registry;
$custom_button->loadString($item->custom_button);
$item->custom_button = $custom_button->toArray();
}
if (empty($item->id))
{
@ -1140,9 +1140,9 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -876,9 +876,9 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -100,54 +100,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->filter))
{
// Convert the filter field to an array.
$filter = new Registry;
$filter->loadString($item->filter);
$item->filter = $filter->toArray();
}
if (!empty($item->where))
{
// Convert the where field to an array.
$where = new Registry;
$where->loadString($item->where);
$item->where = $where->toArray();
}
if (!empty($item->order))
{
// Convert the order field to an array.
$order = new Registry;
$order->loadString($item->order);
$item->order = $order->toArray();
}
if (!empty($item->global))
{
// Convert the global field to an array.
$global = new Registry;
$global->loadString($item->global);
$item->global = $global->toArray();
}
if (!empty($item->join_view_table))
{
// Convert the join_view_table field to an array.
$join_view_table = new Registry;
$join_view_table->loadString($item->join_view_table);
$item->join_view_table = $join_view_table->toArray();
}
if (!empty($item->join_db_table))
{
// Convert the join_db_table field to an array.
$join_db_table = new Registry;
$join_db_table->loadString($item->join_db_table);
$item->join_db_table = $join_db_table->toArray();
}
if (!empty($item->php_custom_get))
{
// base64 Decode php_custom_get.
@ -196,6 +148,54 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->php_calculation = base64_decode($item->php_calculation);
}
if (!empty($item->filter))
{
// Convert the filter field to an array.
$filter = new Registry;
$filter->loadString($item->filter);
$item->filter = $filter->toArray();
}
if (!empty($item->where))
{
// Convert the where field to an array.
$where = new Registry;
$where->loadString($item->where);
$item->where = $where->toArray();
}
if (!empty($item->order))
{
// Convert the order field to an array.
$order = new Registry;
$order->loadString($item->order);
$item->order = $order->toArray();
}
if (!empty($item->global))
{
// Convert the global field to an array.
$global = new Registry;
$global->loadString($item->global);
$item->global = $global->toArray();
}
if (!empty($item->join_view_table))
{
// Convert the join_view_table field to an array.
$join_view_table = new Registry;
$join_view_table->loadString($item->join_view_table);
$item->join_view_table = $join_view_table->toArray();
}
if (!empty($item->join_db_table))
{
// Convert the join_db_table field to an array.
$join_db_table = new Registry;
$join_db_table->loadString($item->join_db_table);
$item->join_db_table = $join_db_table->toArray();
}
if (empty($item->id))
{
@ -1146,9 +1146,9 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -100,10 +100,10 @@ class ComponentbuilderModelField extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->xml))
if (!empty($item->css_views))
{
// JSON Decode xml.
$item->xml = json_decode($item->xml);
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->css_view))
@ -112,12 +112,6 @@ class ComponentbuilderModelField extends JModelAdmin
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->css_views))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
@ -130,6 +124,12 @@ class ComponentbuilderModelField extends JModelAdmin
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->xml))
{
// JSON Decode xml.
$item->xml = json_decode($item->xml);
}
if (empty($item->id))
{
@ -889,24 +889,89 @@ class ComponentbuilderModelField extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// get the properties
$properties = $input->get('properties', null, 'ARRAY');
// get the extra properties
$extraproperties = $input->get('extraproperties', null, 'ARRAY');
// get the type phpx property
$typephpx = $input->get('property_type_phpx', null, 'RAW');
// get the type php property
$typephp = $input->get('property_type_php', null, 'RAW');
// make sure we have an array
if (ComponentbuilderHelper::checkArray($properties))
{
// set the bucket
$bucket = array();
foreach($properties as $property)
{
// make sure we have the correct values
if (ComponentbuilderHelper::checkArray($property) && isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) && isset($property['value']))
{
// fix the name (TODO)
// $property['name'] = ComponentbuilderHelper::safeString($property['name']);
// some fixes, just in case (more can be added)
switch ($property['name'])
{
// fix the values
case 'name':
case 'type':
$property['value'] = ComponentbuilderHelper::safeString($property['value']);
break;
}
// load the property
$bucket[] = "\t".$property['name'].'="'. str_replace('"', "&quot;", $property['value']).'"';
}
}
// make sure we have an array
if (ComponentbuilderHelper::checkArray($extraproperties))
{
foreach($extraproperties as $xproperty)
{
// make sure we have the correct values
if (ComponentbuilderHelper::checkArray($xproperty) && isset($xproperty['name']) && ComponentbuilderHelper::checkString($xproperty['name']) && isset($xproperty['value']))
{
// load the extra property
$bucket[] = "\t".ComponentbuilderHelper::safeString($xproperty['name']).'="'. str_replace('"', "&quot;", $xproperty['value']).'"';
}
}
}
// make sure we have a string
if (ComponentbuilderHelper::checkString($typephp))
{
// load the type_php property
$bucket[] = "\t".'type_php_1="'. str_replace('"', "'", $typephp).'"';
}
// make sure we have a string
if (ComponentbuilderHelper::checkString($typephpx))
{
// load the type_phpx property
$bucket[] = "\t".'type_phpx_1="'. str_replace('"', "'", $typephp).'"';
}
// if the bucket has been loaded
if (ComponentbuilderHelper::checkArray($bucket))
{
$data['xml'] = "<field".PHP_EOL.implode(PHP_EOL, $bucket).PHP_EOL."/>";
}
}
// Set the xml string to JSON string.
if (isset($data['xml']))
{
$data['xml'] = (string) json_encode($data['xml']);
}
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the css_views string to base64 string.
if (isset($data['css_views']))
{
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
@ -973,9 +1038,9 @@ class ComponentbuilderModelField extends JModelAdmin
}
/**
* Method to change the title & alias.
* Method to change the title
*
* @param string $title The title.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*

View File

@ -49,10 +49,10 @@ class ComponentbuilderModelFields extends JModelList
'a.datatype','datatype',
'a.indexes','indexes',
'a.null_switch','null_switch',
'a.store','store',
'c.title','category_title',
'c.id', 'category_id',
'a.catid', 'catid',
'a.store','store'
'a.catid', 'catid'
);
}
@ -88,6 +88,9 @@ class ComponentbuilderModelFields extends JModelList
$null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch');
$this->setState('filter.null_switch', $null_switch);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category');
$this->setState('filter.category', $category);
@ -95,10 +98,7 @@ class ComponentbuilderModelFields extends JModelList
$this->setState('filter.category_id', $categoryId);
$catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid');
$this->setState('filter.catid', $catid);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$this->setState('filter.catid', $catid);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -184,6 +184,7 @@ class ComponentbuilderModelFields extends JModelList
if ($name === 'datatype')
{
$datatypeArray = array(
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',
@ -313,7 +314,7 @@ class ComponentbuilderModelFields extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.' OR a.store LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.store LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.')');
}
}
@ -431,10 +432,10 @@ class ComponentbuilderModelFields extends JModelList
continue;
}
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_footer
@ -504,10 +505,10 @@ class ComponentbuilderModelFields extends JModelList
$id .= ':' . $this->getState('filter.datatype');
$id .= ':' . $this->getState('filter.indexes');
$id .= ':' . $this->getState('filter.null_switch');
$id .= ':' . $this->getState('filter.store');
$id .= ':' . $this->getState('filter.category');
$id .= ':' . $this->getState('filter.category_id');
$id .= ':' . $this->getState('filter.catid');
$id .= ':' . $this->getState('filter.store');
$id .= ':' . $this->getState('filter.catid');
return parent::getStoreId($id);
}

View File

@ -40,107 +40,7 @@ class JFormFieldAdminsviews extends JFormFieldList
*
* @var string
*/
public $type = 'adminsviews';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create admin_view
if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit admin_view
if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'adminsviews';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
*
* @var string
*/
public $type = 'adminviewfolderlist';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit
if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'adminviewfolderlist';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldAdminviews extends JFormFieldList
*
* @var string
*/
public $type = 'adminviews';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create admin_view
if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit admin_view
if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'adminviews';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldAdminviewsreadonly extends JFormFieldList
*
* @var string
*/
public $type = 'adminviewsreadonly';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create admin_view
if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit admin_view
if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'adminviewsreadonly';
/**
* Method to get a list of options for a list input.

View File

@ -0,0 +1,105 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage aliasbuilder.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Aliasbuilder Form Field class for the Componentbuilder component
*/
class JFormFieldAliasbuilder extends JFormFieldList
{
/**
* The aliasbuilder field type.
*
* @var string
*/
public $type = 'aliasbuilder';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
// load the db opbject
$db = JFactory::getDBO();
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the id
$adminView = $jinput->getInt('id', 0);
// rest the fields ids
$fieldIds = array();
if (is_numeric($adminView) && $adminView >= 1)
{
// get all the fields linked to the admin view
if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields'))
{
if (ComponentbuilderHelper::checkJson($addFields))
{
$addFields = json_decode($addFields, true);
if (ComponentbuilderHelper::checkArray($addFields))
{
foreach($addFields as $addField)
{
if (isset($addField['field']) && (!isset($addField['alias']) || 1 != $addField['alias']))
{
$fieldIds[] = (int) $addField['field'];
}
}
}
}
}
}
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name'),array('id','name','type')));
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
// filter by fields linked
if (ComponentbuilderHelper::checkArray($fieldIds))
{
// only load these fields
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
}
}
return $options;
}
}

View File

@ -40,107 +40,7 @@ class JFormFieldArticles extends JFormFieldList
*
* @var string
*/
public $type = 'articles';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create article
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=article&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit article
if (($buttonName === 'article' || $buttonName === 'articles') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=articles&task=article.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for article field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'articles';
/**
* Method to get a list of options for a list input.

View File

@ -40,7 +40,8 @@ class JFormFieldComponent extends JFormFieldList
*
* @var string
*/
public $type = 'component';
public $type = 'component';
/**
* Override to add new button
*
@ -149,23 +150,24 @@ class JFormFieldComponent extends JFormFieldList
*/
public function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->component_system_name);
}
}
return $options;
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->component_system_name);
}
}
return $options;
}
}

View File

@ -40,107 +40,7 @@ class JFormFieldComponentadminmenus extends JFormFieldList
*
* @var string
*/
public $type = 'componentadminmenus';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create admin_view
if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit admin_view
if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'componentadminmenus';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldComponentadminviews extends JFormFieldList
*
* @var string
*/
public $type = 'componentadminviews';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create admin_view
if ($user->authorise('admin_view.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit admin_view
if (($buttonName === 'admin_view' || $buttonName === 'admin_views') && $user->authorise('admin_view.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'componentadminviews';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldComponents extends JFormFieldList
*
* @var string
*/
public $type = 'components';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create joomla_component
if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=joomla_component&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit joomla_component
if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for joomla_component field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'components';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldCustomadminviews extends JFormFieldList
*
* @var string
*/
public $type = 'customadminviews';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create custom_admin_view
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=custom_admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit custom_admin_view
if (($buttonName === 'custom_admin_view' || $buttonName === 'custom_admin_views') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=custom_admin_views&task=custom_admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for custom_admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'customadminviews';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldCustomfilelist extends JFormFieldList
*
* @var string
*/
public $type = 'customfilelist';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit
if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'customfilelist';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldCustomfolderlist extends JFormFieldList
*
* @var string
*/
public $type = 'customfolderlist';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit
if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'customfolderlist';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldCustomgets extends JFormFieldList
*
* @var string
*/
public $type = 'customgets';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create dynamic_get
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=dynamic_get&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit dynamic_get
if (($buttonName === 'dynamic_get' || $buttonName === 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for dynamic_get field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'customgets';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldDbtables extends JFormFieldList
*
* @var string
*/
public $type = 'dbtables';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit
if (($buttonName === '' || $buttonName === '') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=&task=.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'dbtables';
/**
* Method to get a list of options for a list input.

View File

@ -40,107 +40,7 @@ class JFormFieldDynamicdashboard extends JFormFieldList
*
* @var string
*/
public $type = 'dynamicdashboard';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create custom_admin_view
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=custom_admin_view&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit custom_admin_view
if (($buttonName === 'custom_admin_view' || $buttonName === 'custom_admin_views') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=custom_admin_views&task=custom_admin_view.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for custom_admin_view field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'dynamicdashboard';
/**
* Method to get a list of options for a list input.

View File

@ -40,7 +40,8 @@ class JFormFieldDynamicget extends JFormFieldList
*
* @var string
*/
public $type = 'dynamicget';
public $type = 'dynamicget';
/**
* Override to add new button
*

View File

@ -40,107 +40,7 @@ class JFormFieldDynamicgets extends JFormFieldList
*
* @var string
*/
public $type = 'dynamicgets';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create dynamic_get
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=dynamic_get&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit dynamic_get
if (($buttonName === 'dynamic_get' || $buttonName === 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for dynamic_get field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'dynamicgets';
/**
* Method to get a list of options for a list input.

View File

@ -0,0 +1,65 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.7.x
@created 30th April, 2015
@package Component Builder
@subpackage existingvalidationrules.php
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Existingvalidationrules Form Field class for the Componentbuilder component
*/
class JFormFieldExistingvalidationrules extends JFormFieldList
{
/**
* The existingvalidationrules field type.
*
* @var string
*/
public $type = 'existingvalidationrules';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
public function getOptions()
{
// get the existing validation rules names
if ($items = ComponentbuilderHelper::getExistingValidationRuleNames())
{
// load the items
$options = array(JHtml::_('select.option', '', 'Select an option'));
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item, ComponentbuilderHelper::safeString($item, 'Ww'));
}
return $options;
}
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND')));
}
}

View File

@ -40,107 +40,7 @@ class JFormFieldFields extends JFormFieldList
*
* @var string
*/
public $type = 'fields';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referal if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
}
$user = JFactory::getUser();
// only add if user allowed to create field
if ($user->authorise('field.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=field&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit field
if (($buttonName === 'field' || $buttonName === 'fields') && $user->authorise('field.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=fields&task=field.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for field field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
public $type = 'fields';
/**
* Method to get a list of options for a list input.

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