We are moving #299

Merged
ro-ot merged 6 commits from staging into master 2018-06-05 14:41:23 +00:00
10 changed files with 131 additions and 256 deletions

View File

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

View File

@ -1,20 +1,5 @@
### Steps to reproduce the issue
JCB and all its projects are leaving gitHub... this is going to take some time since JCB/VDM is so integrated with github,
The new address is [https://gitlab.com/jcb-repos/Joomla-Component-Builder](https://gitlab.com/jcb-repos/Joomla-Component-Builder).
### Expected result
### Actual result
### System information (as much as possible)
- OS Name & Version:
- MySql Version:
- Apache Version:
- PHP Version:
- Joomla Version:
- JCB Version:
- Browser:
### Additional comments
Please make sure to open your issues there!!

View File

@ -1,16 +1,5 @@
Pull Request for Issue gh- .
JCB and all its projects are leaving gitHub... this is going to take some time since JCB/VDM is so integrated with github,
### Summary of Changes
### Testing Instructions
### Expected result
### Actual result
### Documentation Changes Required
The new address is [https://gitlab.com/jcb-repos/Joomla-Component-Builder](https://gitlab.com/jcb-repos/Joomla-Component-Builder).
Please make sure to open your issues there!!

28
.github/SUPPORT.md vendored
View File

@ -1,27 +1,5 @@
Where can you get support and help?
====================
JCB and all its projects are leaving gitHub... this is going to take some time since JCB/VDM is so integrated with github,
+ [The JCB Tutorials][Tutorials]
+ [Hello World Tutorial][HelloWorld]
+ [The JCB! Wiki][Wiki]
+ [JCB Google Group/forum][forum]
+ [Report a Security Issue][Security]
+ [Community Complaint][Complaint]
+ [Open Issue On Github][Issue] ^^
Since JCB has become a community project [VDM.io][VDM] is **no longer solely responsible** for support.
We have started a [**JCB forum**][forum] where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components.
^^ Then if you run into any issues, related to the JCB code, like bugs, **start by searching** the (*open & closed*) [issues][Issue] over on Github, and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines][guidelines].
[Tutorials]: https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE
[HelloWorld]: https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45
[Wiki]: https://github.com/vdm-io/Joomla-Component-Builder/wiki
[forum]: https://groups.google.com/a/vdm.io/d/forum/jcb
[Security]: http://joomlacomponentbuilder.com/report-security-issues
[Complaint]: http://joomlacomponentbuilder.com/community-complaint
[Issue]: https://github.com/vdm-io/Joomla-Component-Builder/issues
[VDM]: https://www.vdm.io/joomla-component-builder
[guidelines]: https://github.com/vdm-io/Joomla-Component-Builder/blob/master/.github/CONTRIBUTING.md
The new address is [https://gitlab.com/jcb-repos/Joomla-Component-Builder](https://gitlab.com/jcb-repos/Joomla-Component-Builder).
Please make sure to open your issues there!!

146
README.md
View File

@ -1,145 +1,3 @@
# Joomla Component Builder (JCB)
[![GitHub release](https://img.shields.io/github/release/vdm-io/Joomla-Component-Builder.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases) [![Total Downloads](https://img.shields.io/github/downloads/vdm-io/Joomla-Component-Builder/total.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases)
JCB and all its projects are leaving gitHub... this is going to take some time since JCB/VDM is so integrated with github,
This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
![Component Builder image](https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/vdm-component.jpg "The Component Builder")
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will 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.8.0) 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)
Once installed upgrades are quick and easy via the default Joomla upgrade area.
Some of the Features
====================
+ Adding mySQL Dump to any View/Table.
+ Grab existing Table data and build a dynamic dump.
+ Unlimited Joomla Components.
+ Unlimited Tables/Views.
+ Reusing Views and Fields.
+ Runs on Your Own Joomla Install.
+ Add Dynamic/custom back-end views that uses Table and Chart result sets.
+ Build data query of extreme complex nature to use in Dynamic/custom views.
+ Highly Dynamic/custom Front-end Structures.
+ Dynamically setup templates and layouts for Front-end design.
+ Integration of the excellent UIKIT lib.
+ Integration of the excellent FOOTABLE lib.
+ All Joomla Standard Field Types (including repeatable fields).
+ Strong Implementation of all Joomla Form Security.
+ Load data via ajax with ease.
+ You can add an Update Server to Components you build.
+ Build advanced Dynamic front-end forms.
+ Dynamic data queries from multiple tables.
+ Place in local GIT folder, and publish to sales server.
+ Include any amount of custom files and folders during build.
+ Static helper class with smart methods already included.
+ Static helper methods Can easily be added.
+ Direct install from complier view.
+ Integrative with native Joomla Categories and Tags.
+ Fully Dynamic Search Friendly URL Auto Implementation.
+ Custom scripting options all over the MVC structure.
+ Permission implementation down to each view, item and field.
+ Easy extendible to include other libraries.
+ Can include SQL and visioning update link to distribute your component updates via Joomla default upgrade of components.
+ Easy Export & Import addon to all backend-tables.
+ Overriding ability of import concepts in all backend-tables.
+ The Batch and Filter implementation on all backend-list views.
+ This and much much more are all possible with this component builder!
Just Imagine
====================
+ Your Component Back-end can be more advanced then the Joomla Article Manager.
+ Your Code as Perfectly Unified to the strict Joomla Standards.
+ Adding Custom Scripting almost anywhere in the MVC structure.
+ Import and export feature to all backend-views.
+ Batch copy and move/update feature for all backend-views.
+ History tracking per/change made on any back-end item.
+ Dynamic field control, to show and hide fields in amazing ways.
+ Front-end freedom of design that allows for any library to be used.
+ This and much much more are all possible with this component builder!
You are in Control
====================
+ You can change the licensing template for your components.
+ You can change/improve existing field types and add more.
+ Line numbers to show where in compiler was the code build.
+ You can improve the component since all code are open-source.
+ Free updates for the lifetime of the project.
+ You can dynamically add internal help structures to all component.
+ There is no limitations on how big or how much you want to build (server limitation only).
+ This is a complete factory kind of component that functions like a deployment hub.
+ Export any component completely mapped in JCB and import into another JCB.
+ This and much much more are all possible with this component builder!
Get More Demo Content
====================
> The cat is out of the bag, JCB fully mapped can now be yours! Including many other JCB mapped components.
### All you need to do is [explained here](https://vdm.bz/how-to-get-free-vdm-package-keys)!
To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jcb-packages).
Where can you get support and help?
====================
+ [The JCB Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE)
+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
+ [The JCB! Wiki](https://github.com/vdm-io/Joomla-Component-Builder/wiki)
+ [JCB Google Group/forum](https://groups.google.com/a/vdm.io/d/forum/jcb)
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
+ [Open Issue On Github](https://github.com/vdm-io/Joomla-Component-Builder/issues) ^^
Since JCB has [become a community](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
We have started a [**JCB forum**](https://groups.google.com/a/vdm.io/d/forum/jcb) where you can post questions, about how things work, or if you need some kind of help in relation to your development of your components.
^^ Then if you run into any issues, related to the JCB code, like bugs, **start by searching** the (*open & closed*) issues over on Github, and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/.github/CONTRIBUTING.md).
WHY GIVE IT AWAY LIKE THIS?
====================
> We are Open Source Enthusiast
> Who Support the Joomla Community
Our idea was to almost let this tool serve as a cheat sheet to how things can be done... and with the help of other developers end up formulating the way how things not only can, but must be done to insure secure, stable, scalable and maintainable code is produced.
MAKING IT BETTER!
====================
Watch the [proposed development workflow](https://vdm.bz/proposed-development-workflow).
# Build Details
+ *Community*: [Joomla Component Builder](http://www.joomlacomponentbuilder.com)
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 30th May, 2018
+ *Version*: 2.8.0
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **185584**
+ *Field count*: **1054**
+ *File count*: **1236**
+ *Folder count*: **197**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Donations
Come on buy VDM a coffee :)
* PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
The new address is [https://gitlab.com/jcb-repos/Joomla-Component-Builder](https://gitlab.com/jcb-repos/Joomla-Component-Builder).

View File

@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 30th May, 2018
+ *Last Build*: 31st May, 2018
+ *Version*: 2.8.0
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **185584**
+ *Line count*: **185591**
+ *Field count*: **1054**
+ *File count*: **1236**
+ *Folder count*: **197**

View File

@ -191,8 +191,7 @@ class Interpretation extends Fields
*
* @param int $nr The line number
*
* @return void
*
* @return string
*/
private function setLine($nr)
{
@ -254,7 +253,10 @@ class Interpretation extends Fields
}
/**
* @param $view
* set Lock License Per
*
* @param type $view
* @param type $target
*/
public function setLockLicensePer(&$view, $target)
{
@ -280,6 +282,14 @@ class Interpretation extends Fields
}
}
/**
* Check statment license locked
*
* @param type $boolMethod
* @param type $thIIS
*
* @return string
*/
public function checkStatmentLicenseLocked($boolMethod, $thIIS = '$this')
{
$statment[] = PHP_EOL . $this->_t(2) . "if (!" . $thIIS . "->" . $boolMethod . "())";
@ -293,6 +303,14 @@ class Interpretation extends Fields
return implode(PHP_EOL, $statment);
}
/**
* set Bool License Lock
*
* @param type $boolMethod
* @param type $globalbool
*
* @return string
*/
public function setBoolLicenseLock($boolMethod, $globalbool)
{
$bool[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
@ -325,6 +343,14 @@ class Interpretation extends Fields
return implode(PHP_EOL, $bool);
}
/**
* set Helper License Lock
*
* @param type $_VDM
* @param type $target
*
* @return string
*/
public function setHelperLicenseLock($_VDM, $target)
{
$helper[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
@ -348,6 +374,13 @@ class Interpretation extends Fields
return implode(PHP_EOL, $helper);
}
/**
* set Init License Lock
*
* @param type $_VDM
*
* @return string
*/
public function setInitLicenseLock($_VDM)
{
$init[] = PHP_EOL . "if (!defined('" . $_VDM . "'))";
@ -362,6 +395,11 @@ class Interpretation extends Fields
return implode(PHP_EOL, $init);
}
/**
* set WHMCS Cryption
*
* @return string
*/
public function setWHMCSCryption()
{
// make sure we have the correct file
@ -549,6 +587,11 @@ class Interpretation extends Fields
return '';
}
/**
* set Get Crypt Key
*
* @return string
*/
public function setGetCryptKey()
{
// ENCRYPT_FILE
@ -714,6 +757,9 @@ class Interpretation extends Fields
return '';
}
/**
* set Version Controller
*/
public function setVersionController()
{
if (ComponentbuilderHelper::checkArray($this->componentData->version_update) || ComponentbuilderHelper::checkArray($this->updateSQLBuilder))
@ -821,6 +867,12 @@ class Interpretation extends Fields
}
}
/**
* set Dynamic Update XML SQL
*
* @param array $updateXML
* @param bool $current_version
*/
public function setDynamicUpdateXMLSQL(&$updateXML, $current_version = false)
{
// start building the update
@ -864,6 +916,13 @@ class Interpretation extends Fields
$this->setUpdateXMLSQL($update_, $updateXML, $addDynamicSQL);
}
/**
* set Update XML SQL
*
* @param array $update
* @param array $updateXML
* @param boolean $addDynamicSQL
*/
public function setUpdateXMLSQL(&$update, &$updateXML, &$addDynamicSQL)
{
// ensure version naming is correct
@ -931,6 +990,11 @@ class Interpretation extends Fields
}
}
/**
* no Help
*
* @return string
*/
public function noHelp()
{
$help = array();
@ -6496,23 +6560,36 @@ class Interpretation extends Fields
{
// set the fields array
$field = array();
// use custom code
$useCustomCode = (isset($this->fieldRelations[$viewName_list][(int) $item['id']]['join_type']) && $this->fieldRelations[$viewName_list][(int) $item['id']]['join_type'] == 2 &&
isset($this->fieldRelations[$viewName_list][(int) $item['id']]['set']) && ComponentbuilderHelper::checkString($this->fieldRelations[$viewName_list][(int) $item['id']]['set']));
// load the main list view field
$field['[field=' . (int) $item['id'] . ']'] = $this->getListItem($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, $escape, $user, $refview);
// code name
if (isset($item['code']) && $useCustomCode)
{
$field['$item->{' . (int) $item['id'] . '}'] = '$item->' . $item['code'];
}
// now load the relations
foreach ($this->fieldRelations[$viewName_list][(int) $item['id']]['joinfields'] as $join)
{
$blankClass = '';
if (isset($this->listJoinBuilder[$viewName_list]) && isset($this->listJoinBuilder[$viewName_list][(int) $join]))
{
// code block
$field['[field=' . (int) $join . ']'] = $this->getListItem($this->listJoinBuilder[$viewName_list][(int) $join], $viewName_single, $viewName_list, $blankClass, $doNotEscape, $coreLoad, $core, false, $ref, $escape, $user, $refview);
// code name
if (isset($this->listJoinBuilder[$viewName_list][(int) $join]['code']) && $useCustomCode)
{
$field['$item->{' . (int) $join . '}'] = '$item->' . $this->listJoinBuilder[$viewName_list][(int) $join]['code'];
}
}
}
// join based on join type
if (isset($this->fieldRelations[$viewName_list][(int) $item['id']]['join_type']) && $this->fieldRelations[$viewName_list][(int) $item['id']]['join_type'] == 2 &&
isset($this->fieldRelations[$viewName_list][(int) $item['id']]['set']) && ComponentbuilderHelper::checkString($this->fieldRelations[$viewName_list][(int) $item['id']]['set']))
if ($useCustomCode)
{
// custom code
return PHP_EOL . $this->_t(3) . "<div>" . str_replace(array_keys($field), array_values($field), $this->fieldRelations[$viewName_list][(int) $item['id']]['set']) . PHP_EOL . $this->_t(3) . "</div>";
return PHP_EOL . $this->_t(3) . "<div>" . $this->setPlaceholders(str_replace(array_keys($field), array_values($field), $this->fieldRelations[$viewName_list][(int) $item['id']]['set']), $this->placeholders) . PHP_EOL . $this->_t(3) . "</div>";
}
elseif (isset($this->fieldRelations[$viewName_list][(int) $item['id']]['set']) && ComponentbuilderHelper::checkString($this->fieldRelations[$viewName_list][(int) $item['id']]['set']))
{
@ -6520,7 +6597,7 @@ class Interpretation extends Fields
return PHP_EOL . $this->_t(3) . "<div>" . implode($this->fieldRelations[$viewName_list][(int) $item['id']]['set'], $field) . PHP_EOL . $this->_t(3) . "</div>";
}
// default
return PHP_EOL . $this->_t(3) . "<div>" . implode(' ', $field) . PHP_EOL . $this->_t(3) . "</div>";
return PHP_EOL . $this->_t(3) . "<div>" . implode('', $field) . PHP_EOL . $this->_t(3) . "</div>";
}
return $this->getListItem($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core, $class, $ref, $escape, $user, $refview);
}

View File

@ -6796,8 +6796,8 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_
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_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then %s %s is considered bad practice."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_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 %s %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"

View File

@ -233,24 +233,29 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
protected $rowNumbers = array(
'admin_fields_conditions' => 80,
'admin_fields' => 50
);
protected $buttonArray = array(
'library_config' => 'libraries_config',
'library_files_folders_urls' => 'libraries_files_folders_urls',
'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions',
'admin_fields_relations' => 'admins_fields_relations',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'component_admin_views' => 'components_admin_views' ,
'component_site_views' => 'components_site_views',
'component_custom_admin_views' => 'components_custom_views',
'component_updates' => 'components_updates',
'component_mysql_tweaks' => 'components_mysql_tweaks',
'component_custom_admin_menus' => 'components_custom_admin_menus',
'component_config' => 'components_config',
'component_dashboard' => 'components_dashboard',
'component_files_folders' => 'components_files_folders',
'language' => true);
'library_config' => 'libraries_config',
'library_files_folders_urls' => 'libraries_files_folders_urls',
'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions',
'admin_fields_relations' => 'admins_fields_relations',
'validation_rule' => 'validation_rules',
'field' => 'fields',
'component_admin_views' => 'components_admin_views' ,
'component_site_views' => 'components_site_views',
'component_custom_admin_views' => 'components_custom_views',
'component_updates' => 'components_updates',
'component_mysql_tweaks' => 'components_mysql_tweaks',
'component_custom_admin_menus' => 'components_custom_admin_menus',
'component_config' => 'components_config',
'component_dashboard' => 'components_dashboard',
'component_files_folders' => 'components_files_folders',
'language' => true);
public function getButton($type, $size)
{
@ -702,15 +707,17 @@ class ComponentbuilderModelAjax extends JModelList
$this->checkRepeatableConversion($fieldsData, $fieldName, $id, $idName);
// get the table
$table = $this->getSubformTable($type, $fieldsData);
// get row number
$number = (isset($this->rowNumbers[$type]) && $this->rowNumbers[$type]) ? $this->rowNumbers[$type] : false;
// set notice of bad practice
$notice = '';
if ($idName === 'admin_view' && isset($this->rowNumber) && $this->rowNumber > 50)
if ($number && isset($this->rowNumber) && $this->rowNumber > $number)
{
$notice = '<div class="alert alert-warning">' . JText::sprintf('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', $this->rowNumber, $typeName, $typeName, $typeName, $typeName) . '</div>';
$notice = '<div class="alert alert-warning">' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S', $this->rowNumber, $typeName, $number, $typeName, $typeName, $typeName) . '</div>';
}
elseif ($idName === 'admin_view' && isset($this->rowNumber))
elseif ($number && isset($this->rowNumber))
{
$notice = '<div class="alert alert-info">' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $typeName) . '</div>';
$notice = '<div class="alert alert-info">' . JText::sprintf('COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE', $this->rowNumber, $typeName, $number, $typeName) . '</div>';
}
// return table
return $notice.$table;

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>30th May, 2018</creationDate>
<creationDate>31st May, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>