Adding Expansion Development Method and more... #270

Merged
Llewellyn merged 14 commits from staging into master 2018-04-30 16:11:23 +00:00
78 changed files with 5595 additions and 1881 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! 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.5) 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) > 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,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 14th April, 2018 + *Last Build*: 30th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **182312** + *Line count*: **193305**
+ *Field count*: **1012** + *Field count*: **1027**
+ *File count*: **1199** + *File count*: **1201**
+ *Folder count*: **193** + *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://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! 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.5) 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) > 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,13 +126,13 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 14th April, 2018 + *Last Build*: 30th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **182312** + *Line count*: **193305**
+ *Field count*: **1012** + *Field count*: **1027**
+ *File count*: **1199** + *File count*: **1201**
+ *Folder count*: **193** + *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -232,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.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="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.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.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_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.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.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.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" /> <action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
@ -247,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.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.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="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.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.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" /> <action name="language_translation.create" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE_DESC" />

View File

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

View File

@ -61,6 +61,21 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option> COM_COMPONENTBUILDER_CONFIG_NO</option>
</field> </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) --> <!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
<field <field
type="number" type="number"
@ -74,8 +89,8 @@
max="100" max="100"
step="10" step="10"
/> />
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" /> <field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Compiler_field_builder_type Field. Type: List. (joomla) --> <!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
@ -92,8 +107,8 @@
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option> COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field> </field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" /> <field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Api Field. Type: User. (joomla) --> <!-- Api Field. Type: User. (joomla) -->
<field <field
type="user" type="user"
@ -152,8 +167,8 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option> COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
</field> </field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) --> <!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" /> <field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<field name="autorTitle" <field name="autorTitle"
type="spacer" type="spacer"
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR" label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
@ -572,8 +587,105 @@
/> />
</fieldset> </fieldset>
<fieldset <fieldset
name="cronjob_custom_config" name="development_method_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_CRONJOB"> 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) --> <!-- 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" /> <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

@ -73,10 +73,11 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$addRepo = $jinput->post->get('repository', 0, 'INT'); $addRepo = $jinput->post->get('repository', 0, 'INT');
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT'); $addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT'); $debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
$minify = $jinput->post->get('minify', 2, 'INT');
// include component compiler // include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php'; require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
$model = $this->getModel('compiler'); $model = $this->getModel('compiler');
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr)) if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr, $minify))
{ {
$cache = JFactory::getCache('mod_menu'); $cache = JFactory::getCache('mod_menu');
$cache->clean(); $cache->clean();
@ -193,7 +194,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$lang->load($extension, $base_dir, $language_tag, $reload); $lang->load($extension, $base_dir, $language_tag, $reload);
$message = '('.$fileName.'.zip) file was also removed from tmp!'; $message = '('.$fileName.'.zip) file was also removed from tmp!';
$this->setRedirect($redirect_url,$message,'message'); $this->setRedirect($redirect_url,$message,'message');
return $model->install($fileName.'.zip');; return $model->install($fileName.'.zip');
} }
} }
$this->setRedirect($redirect_url,$message,'error'); $this->setRedirect($redirect_url,$message,'error');

View File

@ -398,6 +398,56 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
return; 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() protected function getApiUser()
{ {
// admin area does not have API user, only front-end (so we fallback on login user) // admin area does not have API user, only front-end (so we fallback on login user)

View File

@ -108,4 +108,30 @@ class ComponentbuilderControllerLanguages extends JControllerAdmin
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=languages', false), $message, 'error'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=languages', false), $message, 'error');
return; 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

@ -72,12 +72,12 @@ class Compiler extends Infusion
$comConfig = JFactory::getConfig(); $comConfig = JFactory::getConfig();
$this->tempPath = $comConfig->get('tmp_path'); $this->tempPath = $comConfig->get('tmp_path');
// set some folder paths in relation to distribution // 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->backupPath = $this->params->get('backup_folder_path', $this->tempPath) . '/' . $this->componentBackupName . '.zip';
$this->dynamicIntegration = true; $this->dynamicIntegration = true;
} }
if ($config['addRepo']) if ($config['repository'])
{ {
$this->repoPath = $this->params->get('git_folder_path', null); $this->repoPath = $this->params->get('git_folder_path', null);
} }

View File

@ -204,7 +204,14 @@ class Get
* *
* @var array * @var array
*/ */
public $languages = array('en-GB' => array()); public $languages = array();
/**
* The Main Languages
*
* @var string
*/
public $langTag = 'en-GB';
/** /**
* The Multi Languages bucket * The Multi Languages bucket
@ -607,6 +614,13 @@ class Get
*/ */
public $libraries = array(); public $libraries = array();
/**
* Is minify Enabled
*
* @var int
*/
public $minify = 0;
/** /**
* Is Tidy Enabled * Is Tidy Enabled
* *
@ -631,10 +645,16 @@ class Get
{ {
// load application // load application
$this->app = JFactory::getApplication(); $this->app = JFactory::getApplication();
// check if we have Tidy enabled
$this->tidy = extension_loaded('Tidy');
// Set the params // Set the params
$this->params = JComponentHelper::getParams('com_componentbuilder'); $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 // set the field type builder
$this->fieldBuilderType = $this->params->get('compiler_field_builder_type', 2); $this->fieldBuilderType = $this->params->get('compiler_field_builder_type', 2);
// check the field builder type logic // check the field builder type logic
@ -648,7 +668,7 @@ class Get
// load the compiler path // load the compiler path
$this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler'); $this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
// set the component ID // set the component ID
$this->componentID = (int) $config['componentId']; $this->componentID = (int) $config['component'];
// set this components code name // set this components code name
if ($name_code = ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'name_code')) if ($name_code = ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'name_code'))
{ {
@ -658,10 +678,10 @@ class Get
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code); $this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
// set if placeholders should be added to customcode // set if placeholders should be added to customcode
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false; $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 // set if line numbers should be added to comments
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'debug_linenr') == 1) ? true : false; $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 // set the current user
$this->user = JFactory::getUser(); $this->user = JFactory::getUser();
// Get a db connection. // Get a db connection.
@ -952,6 +972,7 @@ class Get
$array['view'] = $array['adminview']; $array['view'] = $array['adminview'];
// get the admin settings/data // get the admin settings/data
$array['settings'] = $this->getAdminViewData($array['view']); $array['settings'] = $this->getAdminViewData($array['view']);
return $array; return $array;
}, array_values($component->addadmin_views)); }, array_values($component->addadmin_views));
} }
@ -1436,7 +1457,7 @@ class Get
$view->fields = array_map(function($field) use($name_single, $name_list) $view->fields = array_map(function($field) use($name_single, $name_list)
{ {
// set hash // set hash
static $hash = 1; static $hash = 123467890; // (TODO) I found this making duplicates
// load hash // load hash
$field['hash'] = md5($field['field'] . $hash); $field['hash'] = md5($field['field'] . $hash);
// increment hash // increment hash
@ -2095,7 +2116,7 @@ class Get
// Create a new query object. // Create a new query object.
$query = $this->db->getQuery(true); $query = $this->db->getQuery(true);
// Order it by the ordering field. // Select all the values in the field
$query->select('a.*'); $query->select('a.*');
$query->select($this->db->quoteName(array('c.name', 'c.properties'), array('type_name', 'properties'))); $query->select($this->db->quoteName(array('c.name', 'c.properties'), array('type_name', 'properties')));
$query->from('#__componentbuilder_field AS a'); $query->from('#__componentbuilder_field AS a');
@ -2263,16 +2284,16 @@ class Get
{ {
$this->customScriptBuilder['views_footer'] = array(); $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)) 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 = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
$this->_fieldData[$id]->javascript_views_footer_decoded = true; $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 || if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false) strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
{ {
@ -4507,8 +4528,8 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a')); $query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
if (ComponentbuilderHelper::checkArray($values)) if (ComponentbuilderHelper::checkArray($values))
{ {
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.entranslation', 'a.components', 'a.published'))); $query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.source', 'a.components', 'a.published')));
$query->where($this->db->quoteName('a.entranslation') . ' IN (' . implode(',', array_map(function($a) $query->where($this->db->quoteName('a.source') . ' IN (' . implode(',', array_map(function($a)
{ {
return $this->db->quote($a); return $this->db->quote($a);
}, $values)) . ')'); }, $values)) . ')');
@ -4516,7 +4537,7 @@ class Get
$this->db->execute(); $this->db->execute();
if ($this->db->getNumRows()) if ($this->db->getNumRows())
{ {
return $this->db->loadAssocList('entranslation'); return $this->db->loadAssocList('source');
} }
} }
return false; return false;
@ -4534,7 +4555,7 @@ class Get
$counterInsert = 0; $counterInsert = 0;
$counterUpdate = 0; $counterUpdate = 0;
$today = JFactory::getDate()->toSql(); $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) foreach ($placeholders as $placeholder => $string)
{ {
@ -4621,7 +4642,7 @@ class Get
// add the new lang placeholder to the db // add the new lang placeholder to the db
$this->newLangStrings[$counterInsert] = array(); $this->newLangStrings[$counterInsert] = array();
$this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components' $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(1); // 'published'
$this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created' $this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created'
$this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by' $this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by'
@ -4659,7 +4680,7 @@ class Get
$query = $this->db->getQuery(true); $query = $this->db->getQuery(true);
$continue = false; $continue = false;
// Insert columns. // 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. // Prepare the insert query.
$query->insert($this->db->quoteName('#__componentbuilder_language_translation')); $query->insert($this->db->quoteName('#__componentbuilder_language_translation'));
$query->columns($this->db->quoteName($columns)); $query->columns($this->db->quoteName($columns));
@ -4754,7 +4775,7 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a')); $query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.components'))); $query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.components')));
// get all string that are not linked to this component // 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); return $this->db->quote($a);
}, $values)) . ')'); }, $values)) . ')');
@ -5386,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 $id The comment id
* @param int $commentType The comment type * @param int $commentType The comment type
@ -5417,6 +5438,7 @@ class Get
* *
* @param string $lineContent The file path to search * @param string $lineContent The file path to search
* @param string $placeholders The values to search for * @param string $placeholders The values to search for
* @param int $commentType The comment type
* *
* @return array on success * @return array on success
* *
@ -5442,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 string $string The string to revers
* @param int $id The custom code id * @param int $id The custom code id
@ -5598,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 $type The type of placement
* @param int $id The code id in the system * @param int $id The code id in the system

View File

@ -338,9 +338,9 @@ class Structure extends Get
// run global updater // run global updater
ComponentbuilderHelper::runGlobalUpdater(); ComponentbuilderHelper::runGlobalUpdater();
// set the Joomla version // set the Joomla version
$this->joomlaVersion = $config['joomlaVersion']; $this->joomlaVersion = $config['version'];
// set the template path // set the template path
$this->templatePath = $this->compilerPath . '/joomla_' . $config['joomlaVersion']; $this->templatePath = $this->compilerPath . '/joomla_' . $config['version'];
// set some default names // set some default names
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion; $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; $this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;

View File

@ -2013,7 +2013,18 @@ class Fields extends Structure
// set the decoding methods // set the decoding methods
if (in_array($set, $decode)) 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 // set the uikit checker
if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $textareas)) if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $textareas))
@ -2355,7 +2366,7 @@ class Fields extends Structure
// set tags for this view but don't load to DB // set tags for this view but don't load to DB
$this->tagsBuilder[$view_name_single] = $view_name_single; $this->tagsBuilder[$view_name_single] = $view_name_single;
} }
else elseif (isset($field['settings']->datatype))
{ {
// insure default not none if number type // insure default not none if number type
$intKeys = array('INT', 'TINYINT', 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE'); $intKeys = array('INT', 'TINYINT', 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE');
@ -2474,7 +2485,7 @@ class Fields extends Structure
$this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"'; $this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"';
} }
// set all int fields of this view // set all int fields of this view
if ($dbSwitch && ($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])) if (!isset($this->intFieldsBuilder[$view_name_single]))
{ {
@ -2556,6 +2567,7 @@ class Fields extends Structure
// setup checkboxes and other json items for this view // setup checkboxes and other json items for this view
if ($dbSwitch && (($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) switch ($field['settings']->store)
{ {
case 1: case 1:
@ -2593,6 +2605,8 @@ class Fields extends Structure
$this->jsonItemBuilder[$view_name_single][] = $name; $this->jsonItemBuilder[$view_name_single][] = $name;
// Site settings of each field if needed // Site settings of each field if needed
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName); $this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
// no londer add the json again (already added)
$subformJsonSwitch = false;
break; break;
} }
// just a heads-up for usergroups set to multiple // just a heads-up for usergroups set to multiple
@ -2614,10 +2628,19 @@ class Fields extends Structure
} }
} }
// if subform the values must revert to array // subform house keeping
if ('subform' === $typeName) if ('subform' === $typeName)
{ {
// the values must revert to array
$this->jsonItemBuilderArray[$view_name_single][] = $name; $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' || // build the data for the export & import methods $typeName === 'repeatable' ||

View File

@ -1270,7 +1270,7 @@ class Interpretation extends Fields
$method[] = "\t\t\$lang = JFactory::getLanguage();"; $method[] = "\t\t\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';"; $method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_SITE;"; $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\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; $method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " load the user regestration model"; $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\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';"; $method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_ADMINISTRATOR;"; $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\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; $method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t// load the user model"; $method[] = "\t\t// load the user model";
@ -1686,25 +1686,30 @@ class Interpretation extends Fields
$fieldDecode = ''; $fieldDecode = '';
foreach ($checker as $field => $array) 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 ('json' === $decode)
{ {
$if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{"; $if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{";
// json_decode // json_decode
$decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);"; $decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);";
} }
elseif ('base64' === $array['decode']) 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{"; $if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ")))" . PHP_EOL . "\t" . $tab . "\t{";
// base64_decode // base64_decode
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");"; $decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
} }
elseif (strpos($array['decode'], '_encryption') !== false) elseif (strpos($decode, '_encryption') !== false)
{ {
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
if ($cryptionType . '_encryption' === $array['decode']) 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{"; $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 // set decryption
@ -1719,6 +1724,7 @@ class Interpretation extends Fields
$fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}"; $fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}";
} }
} }
}
return $fieldDecode; return $fieldDecode;
} }
@ -2821,10 +2827,25 @@ class Interpretation extends Fields
return $method; 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 = '') 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 = ''; $script = '';
// check if there is any custom script
if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second])) if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second]))
{ {
// add not if set // add not if set
@ -2832,6 +2853,7 @@ class Interpretation extends Fields
{ {
$script .= $note; $script .= $note;
} }
// load the actual script
$script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix; $script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix;
// clear some memory // clear some memory
if ($unset) if ($unset)
@ -3087,6 +3109,17 @@ class Interpretation extends Fields
public function setPrepareDocument(&$view) 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 // ensure correct target is set
$TARGET = ComponentbuilderHelper::safeString($this->target, 'U'); $TARGET = ComponentbuilderHelper::safeString($this->target, 'U');
@ -3132,6 +3165,9 @@ class Interpretation extends Fields
// set a JavaScript file if needed // set a JavaScript file if needed
$this->fileContentDynamic[$view['settings']->code]['###' . $TARGET . '_LIBRARIES_LOADER###'] .= $this->setJavaScriptFile($view, $TARGET); $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) public function setGetModules($view, $TARGET)
@ -3296,13 +3332,14 @@ class Interpretation extends Fields
if (isset($view['settings']->custom_buttons) && ComponentbuilderHelper::checkArray($view['settings']->custom_buttons)) if (isset($view['settings']->custom_buttons) && ComponentbuilderHelper::checkArray($view['settings']->custom_buttons))
{ {
foreach ($view['settings']->custom_buttons as $custom_button) foreach ($view['settings']->custom_buttons as $custom_button)
{
if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site'))
{ {
// Load to lang // Load to lang
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U'); $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']); $keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($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'))
{
// add cpanel button TODO does not work well on site with permissions // add cpanel button TODO does not work well on site with permissions
if ($custom_button['target'] == 2) if ($custom_button['target'] == 2)
{ {
@ -3320,10 +3357,6 @@ class Interpretation extends Fields
// load the list button // load the list button
elseif (3 == $type && $custom_button['target'] != 1) 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 // add cpanel button TODO does not work well on site with permissions
if (isset($custom_button['type']) && $custom_button['type'] == 2) if (isset($custom_button['type']) && $custom_button['type'] == 2)
{ {
@ -4219,6 +4252,39 @@ class Interpretation extends Fields
public function setMethodGetItem(&$view) public function setMethodGetItem(&$view)
{ {
$script = ''; $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 // go from json to array
if (isset($this->jsonItemBuilder[$view]) && ComponentbuilderHelper::checkArray($this->jsonItemBuilder[$view])) if (isset($this->jsonItemBuilder[$view]) && ComponentbuilderHelper::checkArray($this->jsonItemBuilder[$view]))
{ {
@ -4254,39 +4320,6 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t\t}"; $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 // add custom php to getitem method
$script .= $this->getCustomScriptBuilder('php_getitem', $view, PHP_EOL . PHP_EOL); $script .= $this->getCustomScriptBuilder('php_getitem', $view, PHP_EOL . PHP_EOL);
@ -6065,7 +6098,7 @@ class Interpretation extends Fields
{ {
ksort($this->langContent['admin']); ksort($this->langContent['admin']);
// load to global languages // load to global languages
$this->languages['en-GB']['admin'] = $this->langContent['admin']; $this->languages[$this->langTag]['admin'] = $this->langContent['admin'];
// remove tmp array // remove tmp array
unset($this->langContent['admin']); unset($this->langContent['admin']);
@ -6118,7 +6151,7 @@ class Interpretation extends Fields
{ {
ksort($this->langContent['site']); ksort($this->langContent['site']);
// load to global languages // load to global languages
$this->languages['en-GB']['site'] = $this->langContent['site']; $this->languages[$this->langTag]['site'] = $this->langContent['site'];
// remove tmp array // remove tmp array
unset($this->langContent['site']); unset($this->langContent['site']);
@ -6146,7 +6179,7 @@ class Interpretation extends Fields
{ {
ksort($this->langContent['sitesys']); ksort($this->langContent['sitesys']);
// load to global languages // load to global languages
$this->languages['en-GB']['sitesys'] = $this->langContent['sitesys']; $this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys'];
// remove tmp array // remove tmp array
unset($this->langContent['sitesys']); unset($this->langContent['sitesys']);
@ -6169,7 +6202,7 @@ class Interpretation extends Fields
{ {
ksort($this->langContent['adminsys']); ksort($this->langContent['adminsys']);
// load to global languages // load to global languages
$this->languages['en-GB']['adminsys'] = $this->langContent['adminsys']; $this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys'];
// remove tmp array // remove tmp array
unset($this->langContent['adminsys']); unset($this->langContent['adminsys']);
@ -9052,7 +9085,7 @@ class Interpretation extends Fields
} }
} }
// minfy the script // 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 // minify the fielScript javscript
$minifier = new JS; $minifier = new JS;
@ -9060,7 +9093,7 @@ class Interpretation extends Fields
$fileScript = $minifier->minify(); $fileScript = $minifier->minify();
} }
// minfy the script // 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 // minify the footerScript javscript
$minifier = new JS; $minifier = new JS;
@ -13021,12 +13054,6 @@ class Interpretation extends Fields
$tabCode = ComponentbuilderHelper::safeString($tab) . '_custom_config'; $tabCode = ComponentbuilderHelper::safeString($tab) . '_custom_config';
$tabUpper = ComponentbuilderHelper::safeString($tab, 'U'); $tabUpper = ComponentbuilderHelper::safeString($tab, 'U');
$tabLower = ComponentbuilderHelper::safeString($tab); $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 // remove display targeted fields
$bucket = array(); $bucket = array();
foreach ($tabFields as $tabField) foreach ($tabFields as $tabField)
@ -13038,10 +13065,20 @@ class Interpretation extends Fields
$bucket[] = str_replace('display="config"', '', $tabField); $bucket[] = str_replace('display="config"', '', $tabField);
} }
} }
// 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 // set the fields
$this->configFieldSets[] = implode("", $bucket); $this->configFieldSets[] = implode("", $bucket);
// close field set // close field set
$this->configFieldSets[] = "\t</fieldset>"; $this->configFieldSets[] = "\t</fieldset>";
}
// remove after loading // remove after loading
unset($this->configFieldSetsCustomField[$tab]); unset($this->configFieldSetsCustomField[$tab]);
} }

View File

@ -299,14 +299,12 @@ class Infusion extends Interpretation
// ###AJAXTOKE### <<<DYNAMIC>>> // ###AJAXTOKE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###AJAXTOKE###'] = $this->setAjaxToke($viewName_single); $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>>> // ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
$this->customScriptBuilder['php_document'][$viewName_single] = str_replace('$document->', '$this->document->', $this->customScriptBuilder['php_document'][$viewName_single]); if ($phpDocument = $this->getCustomScriptBuilder('php_document', $viewName_single, PHP_EOL, null, true, false))
$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 // clear some memory
unset($this->customScriptBuilder['php_document'][$viewName_single]); unset($phpDocument);
} }
else else
{ {
@ -361,18 +359,9 @@ class Infusion extends Interpretation
// ###POSTSAVEHOOK### <<<DYNAMIC>>> // ###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;"); $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>>> // ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_view'][$viewName_single], $this->placeholders); $this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->getCustomScriptBuilder('css_view', $viewName_single, '', null, true);
// clear some memory
unset($this->customScriptBuilder['css_view'][$viewName_single]);
}
else
{
// ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = '';
}
// add css to front end // add css to front end
if (isset($view['edit_create_site_view']) && $view['edit_create_site_view']) if (isset($view['edit_create_site_view']) && $view['edit_create_site_view'])
{ {
@ -489,17 +478,30 @@ class Infusion extends Interpretation
// ###JVIEWLISTCANDO### <<<DYNAMIC>>> // ###JVIEWLISTCANDO### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###JVIEWLISTCANDO###'] = $this->setJviewListCanDo($viewName_single, $viewName_list); $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>>> // only minfy if no php is added to the footer script
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_views'][$viewName_list], $this->placeholders); if ($this->minify && strpos($footerScript, '<?php') === false)
{
// minfy the script
$minifier = new JS;
$minifier->add($footerScript);
$footerScript = $minifier->minify();
// clear some memory // clear some memory
unset($this->customScriptBuilder['css_views'][$viewName_list]); unset($minifier);
}
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = PHP_EOL . '<script type="text/javascript">' . $footerScript . "</script>";
// clear some memory
unset($footerScript);
} }
else else
{ {
// ###VIEWCSS### <<<DYNAMIC>>> $this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = '';
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = '';
} }
} }
@ -616,87 +618,32 @@ class Infusion extends Interpretation
$this->setLockLicensePer($view['settings']->code, $this->target); $this->setLockLicensePer($view['settings']->code, $this->target);
if ($view['settings']->main_get->gettype == 1) 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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
// 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_GET_ITEM### <<<DYNAMIC>>> // ###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"); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
// 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###'] = '';
}
} }
elseif ($view['settings']->main_get->gettype == 2) elseif ($view['settings']->main_get->gettype == 2)
{ {
// ###CUSTOM_ADMIN_GET_LIST_QUERY### <<<DYNAMIC>>> // ###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); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = $this->getCustomScriptBuilder($this->target . '_php_getlistquery', $view['settings']->code, PHP_EOL, null, true);
// 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###'] = '';
}
// 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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
// 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_GET_ITEMS### <<<DYNAMIC>>> // ###CUSTOM_ADMIN_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
// 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_CUSTOM_METHODS### <<<DYNAMIC>>> // ###CUSTOM_ADMIN_CUSTOM_METHODS### <<<DYNAMIC>>>
@ -908,36 +855,15 @@ class Infusion extends Interpretation
{ {
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>> // set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 1); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
// 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_GET_ITEM### <<<DYNAMIC>>> // ###SITE_GET_ITEM### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEM###'] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t"); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
// 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###'] = '';
}
} }
elseif ($view['settings']->main_get->gettype == 2) elseif ($view['settings']->main_get->gettype == 2)
{ {
@ -946,36 +872,14 @@ class Infusion extends Interpretation
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>> // ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
// 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_GET_ITEMS### <<<DYNAMIC>>> // ###SITE_GET_ITEMS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code); $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>>> // ###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); $this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
// 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###'] = '';
}
} }
// add to lang array // add to lang array
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE])) if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
@ -1174,26 +1078,26 @@ class Infusion extends Interpretation
// check the admin lang is set // check the admin lang is set
if ($this->setLangAdmin()) if ($this->setLangAdmin())
{ {
$values[] = array_values($this->languages['en-GB']['admin']); $values[] = array_values($this->languages[$this->langTag]['admin']);
$mainLangLoader['admin'] = count($this->languages['en-GB']['admin']); $mainLangLoader['admin'] = count($this->languages[$this->langTag]['admin']);
} }
// check the admin system lang is set // check the admin system lang is set
if ($this->setLangAdminSys()) if ($this->setLangAdminSys())
{ {
$values[] = array_values($this->languages['en-GB']['adminsys']); $values[] = array_values($this->languages[$this->langTag]['adminsys']);
$mainLangLoader['adminsys'] = count($this->languages['en-GB']['adminsys']); $mainLangLoader['adminsys'] = count($this->languages[$this->langTag]['adminsys']);
} }
// check the site lang is set // check the site lang is set
if (!$this->removeSiteFolder && $this->setLangSite()) if (!$this->removeSiteFolder && $this->setLangSite())
{ {
$values[] = array_values($this->languages['en-GB']['site']); $values[] = array_values($this->languages[$this->langTag]['site']);
$mainLangLoader['site'] = count($this->languages['en-GB']['site']); $mainLangLoader['site'] = count($this->languages[$this->langTag]['site']);
} }
// check the site system lang is set // check the site system lang is set
if (!$this->removeSiteFolder && $this->setLangSiteSys()) if (!$this->removeSiteFolder && $this->setLangSiteSys())
{ {
$values[] = array_values($this->languages['en-GB']['sitesys']); $values[] = array_values($this->languages[$this->langTag]['sitesys']);
$mainLangLoader['sitesys'] = count($this->languages['en-GB']['sitesys']); $mainLangLoader['sitesys'] = count($this->languages[$this->langTag]['sitesys']);
} }
$values = array_unique(ComponentbuilderHelper::mergeArrays($values)); $values = array_unique(ComponentbuilderHelper::mergeArrays($values));
// get the other lang strings if there is any // get the other lang strings if there is any
@ -1214,8 +1118,8 @@ class Infusion extends Interpretation
$tag = trim($tag); $tag = trim($tag);
foreach ($areas as $area => $languageStrings) foreach ($areas as $area => $languageStrings)
{ {
// only log messages for none en-GB translations // only log messages for none $this->langTag translations
if ('en-GB' !== $tag) if ($this->langTag !== $tag)
{ {
$langStringNr = count($languageStrings); $langStringNr = count($languageStrings);
$langStringSum = $this->bcmath('mul', $langStringNr, 100); $langStringSum = $this->bcmath('mul', $langStringNr, 100);
@ -1228,12 +1132,12 @@ class Infusion extends Interpretation
if ($percentage < $this->percentageLanguageAdd) if ($percentage < $this->percentageLanguageAdd)
{ {
// dont add // 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; continue;
} }
} }
// show if it was added as well // 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 // set naming convention
$p = 'admin'; $p = 'admin';
@ -1271,7 +1175,7 @@ class Infusion extends Interpretation
// add to language file // add to language file
$this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang)); $this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang));
// set the line counter // set the line counter
$this->lineCount = $this->lineCount + substr_count($lang, PHP_EOL); $this->lineCount = $this->lineCount + count((array)$lang);
// build xml strings // build xml strings
if (!isset($langXML[$p])) if (!isset($langXML[$p]))
{ {

File diff suppressed because it is too large Load Diff

View File

@ -894,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_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_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_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_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_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>" 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>"
@ -923,7 +924,7 @@ COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries"
COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: <b>%s</b>" COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: <b>%s</b>"
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_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_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_MOVE_TO_CORRECT_LOCATION="<b>Custom files</b> not move to correct location!" 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="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_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" COM_COMPONENTBUILDER_BETA_RELEASE="Beta Release"
@ -931,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_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_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_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_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_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" COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
@ -939,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_IMPORTED="<b>%s</b> has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!" COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!" COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
COM_COMPONENTBUILDER_BUILD="Build"
COM_COMPONENTBUILDER_BUILDIN="Build-in" COM_COMPONENTBUILDER_BUILDIN="Build-in"
COM_COMPONENTBUILDER_BULK="Bulk" COM_COMPONENTBUILDER_BULK="Bulk"
COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets" COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets"
@ -952,6 +954,8 @@ COM_COMPONENTBUILDER_CANCEL="Cancel"
COM_COMPONENTBUILDER_CHAIN="Chain" 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_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_CLEAR_TMP="Clear tmp"
COM_COMPONENTBUILDER_CLONE="Clone"
COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!"
COM_COMPONENTBUILDER_CLOSE_NEW="Close & New" COM_COMPONENTBUILDER_CLOSE_NEW="Close & New"
COM_COMPONENTBUILDER_COMPANY="Company" COM_COMPONENTBUILDER_COMPANY="Company"
COM_COMPONENTBUILDER_COMPANY_NAME="Company Name" COM_COMPONENTBUILDER_COMPANY_NAME="Company Name"
@ -2037,12 +2041,12 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_DESCRIPTION="<p
<b>JPATH_BASE</b><br /> <b>JPATH_BASE</b><br />
// The path to the cache folder.<br /> // The path to the cache folder.<br />
<b>JPATH_CACHE</b><br /> <b>JPATH_CACHE</b><br />
// The path to the administration folder of the current component being executed.<br /> // The path to the administration folder of JCB component.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br /> <b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
// The path to the site folder of the current component being executed.<br /> // The path to the site folder of JCB component.<br />
<b>JPATH_COMPONENT_SITE</b><br /> <b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
// The path to the current component being executed.<br /> // The path to the JCB component.<br />
<b>JPATH_COMPONENT</b><br /> <b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
// The path to folder containing the configuration.php file.<br /> // The path to folder containing the configuration.php file.<br />
<b>JPATH_CONFIGURATION</b><br /> <b>JPATH_CONFIGURATION</b><br />
// The path to the installation folder.<br /> // The path to the installation folder.<br />
@ -2214,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_EMAIL_LABEL="Author Email"
COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component." 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_AUTHOR_NAME_LABEL="Author Name"
COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP="Auto Backup"
COM_COMPONENTBUILDER_CONFIG_AUTO_LOAD="Auto" 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 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'> <script type='text/javascript'>
@ -2264,10 +2269,11 @@ function getCronPath(getType, token){
} else { } else {
jQuery('#cronjob-'+getType).html('<span style=\'color: red;\'>Error loading path!</span>'); jQuery('#cronjob-'+getType).html('<span style=\'color: red;\'>Error loading path!</span>');
} }
}) });
} }
</script>" </script>"
COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL="Backup JCB Mapped Components" 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_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_HINT="Email Address Here"
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_LABEL="Email (backup key)" COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_LABEL="Email (backup key)"
@ -2276,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_HINT="/home/user/backup"
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_LABEL="Backup Folder Path" 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_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_DESCRIPTION="Enter Package Name Here"
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT="JCB_Backup_[YEAR]_[MONTH]_[DAY]" COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT="JCB_Backup_[YEAR]_[MONTH]_[DAY]"
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_LABEL="Package Name" COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_LABEL="Package Name"
@ -2299,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_HINT="/home/user/compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path" 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_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_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_HINT="/home/user/fullbackup"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path" COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path"
@ -2312,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_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path" 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_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="DKIM"
COM_COMPONENTBUILDER_CONFIG_DKIM_DESCRIPTION="Set this option to Yes if you want to sign your emails using 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" COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_DESCRIPTION="Set the domain. Eg. domain.com"
@ -2356,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_MINUTES="Every 30 Minutes"
COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS="Every 30 Seconds" COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS="Every 30 Seconds"
COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK="Every Week" 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_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_HINT="http://www.example.com/buy-keys"
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>" COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
@ -2397,6 +2442,7 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global" COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient" COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive" COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language"
COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder" 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_DESCRIPTION="Select what mailer you would like to use to send emails."
COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer" COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer"
@ -2414,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_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_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_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> 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> <script>
jQuery(document).ready(function() jQuery(document).ready(function()
@ -2444,18 +2494,27 @@ function vdm_dkim() {
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_LABEL="Server Configuration" 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_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_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_OFF="Off"
COM_COMPONENTBUILDER_CONFIG_ON="On" COM_COMPONENTBUILDER_CONFIG_ON="On"
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN="Only Boolean"
COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra" 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_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_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_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_PERCENTAGELANGUAGEADD_LABEL="Add Language if %? ready."
COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail" 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_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_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_HINT="Reply Name Here"
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply to Name" 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="Sendmail"
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_DESCRIPTION="Enter the path to the sendmail program directory on your host server." 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" COM_COMPONENTBUILDER_CONFIG_SENDMAIL_HINT="/usr/sbin/sendmail"
@ -3232,7 +3291,7 @@ COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)"
COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View" COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View"
COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DESCRIPTION="Description"
COM_COMPONENTBUILDER_DETAILS="Details" 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="Display switch for dynamic placement in relation to the use of the field in menu and global configuration options." 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="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_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."
@ -3582,11 +3641,11 @@ COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 tex
COM_COMPONENTBUILDER_EXAMPLE="Example" COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data" COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!" COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components"
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data" COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to 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="Export Failed"
COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" 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_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_FIELD="Field"
COM_COMPONENTBUILDER_FIELDS="Fields" COM_COMPONENTBUILDER_FIELDS="Fields"
@ -3834,6 +3893,8 @@ COM_COMPONENTBUILDER_FIELD_NEW="A New Field"
COM_COMPONENTBUILDER_FIELD_NO="No" COM_COMPONENTBUILDER_FIELD_NO="No"
COM_COMPONENTBUILDER_FIELD_NONE="None" COM_COMPONENTBUILDER_FIELD_NONE="None"
COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set" 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'> COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'>
<div class='span4'> <div class='span4'>
<h1>Filter Information</h1> <h1>Filter Information</h1>
@ -3921,6 +3982,8 @@ COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div> <div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div> </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_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_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 /> 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 />
@ -3941,6 +4004,7 @@ COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions"
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing" 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_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_SCRIPTS="Scripts"
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES="Set Properties" COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES="Set Properties"
COM_COMPONENTBUILDER_FIELD_SEVEN="7" COM_COMPONENTBUILDER_FIELD_SEVEN="7"
COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64" COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64"
@ -3966,12 +4030,12 @@ COM_COMPONENTBUILDER_FIELD_ZERO="0"
COM_COMPONENTBUILDER_FILE="File" COM_COMPONENTBUILDER_FILE="File"
COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED="File <b>%s</b> could not be unlocked!" 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_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_BSB="File <b>%s</b> was not move 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_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File <b>%s</b> was successfully unlocked!"
COM_COMPONENTBUILDER_FILTER="Filter" COM_COMPONENTBUILDER_FILTER="Filter"
COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>" COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_BSB="Folder <b>%s</b> was not move 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_FORCE_LOCAL_UPDATE="Force Local Update"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" 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_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
@ -4123,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_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_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_ICON="Icon"
COM_COMPONENTBUILDER_IMPORT_COMPONENTS="Import Components"
COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue" COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue"
COM_COMPONENTBUILDER_IMPORT_DATA="Import Data" COM_COMPONENTBUILDER_IMPORT_DATA="Import Data"
COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data." COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data."
@ -4136,6 +4199,7 @@ COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD="Upload"
COM_COMPONENTBUILDER_IMPORT_FROM_URL="URL" COM_COMPONENTBUILDER_IMPORT_FROM_URL="URL"
COM_COMPONENTBUILDER_IMPORT_GET_BOTTON="Get File" COM_COMPONENTBUILDER_IMPORT_GET_BOTTON="Get File"
COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN="-- Ignore This Column --" 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_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_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." COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL="Please enter a url."
@ -4308,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_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_BUILDCOMP_LABEL="Build Backend-views Dynamically"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" 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="Companyname"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here"
@ -4372,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_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_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_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_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages 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_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="Export Key"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_DESCRIPTION="The key used to lock the data during export." 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" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT="Export Key Here"
@ -4389,8 +4455,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image" 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_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_IMAGE_LABEL="Component Image"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages 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_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="Javascript"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]" 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" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_HINT="// JavaScript for the entire back-end"
@ -4696,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_N_ITEMS_UNPUBLISHED_1="%s Language unpublished."
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu" 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_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_DESC="The user that created this Language."
COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_LANGUAGE_CREATED_DATE_DESC="The date this Language was created." COM_COMPONENTBUILDER_LANGUAGE_CREATED_DATE_DESC="The date this Language was created."
@ -4777,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_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS="Details" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS="Details"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT="Editing the Language Translation" 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_ERROR_UNIQUE_ALIAS="Another Language Translation has the same alias."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID="Id" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID="Id"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE="Language" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE="Language"
@ -4794,6 +4858,10 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION="Permissions" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION="Permissions"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PUBLISHING="Publishing" 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_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_STATUS="Status"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings." COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
@ -5171,12 +5239,12 @@ COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_CONSTANT_PATHS_DESCRIPTION=
<b>JPATH_BASE</b><br /> <b>JPATH_BASE</b><br />
// The path to the cache folder.<br /> // The path to the cache folder.<br />
<b>JPATH_CACHE</b><br /> <b>JPATH_CACHE</b><br />
// The path to the administration folder of the current component being executed.<br /> // The path to the administration folder of JCB component.<br />
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br /> <b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
// The path to the site folder of the current component being executed.<br /> // The path to the site folder of JCB component.<br />
<b>JPATH_COMPONENT_SITE</b><br /> <b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
// The path to the current component being executed.<br /> // The path to the JCB component.<br />
<b>JPATH_COMPONENT</b><br /> <b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
// The path to folder containing the configuration.php file.<br /> // The path to folder containing the configuration.php file.<br />
<b>JPATH_CONFIGURATION</b><br /> <b>JPATH_CONFIGURATION</b><br />
// The path to the installation folder.<br /> // The path to the installation folder.<br />
@ -5316,6 +5384,8 @@ COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour"
COM_COMPONENTBUILDER_MATCH_FIELD="Match Field" COM_COMPONENTBUILDER_MATCH_FIELD="Match Field"
COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options" COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options"
COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" 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_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)"
COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME="Name"
COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)"
@ -5328,11 +5398,13 @@ COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_S
COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NEW_NOTICE="New Notice"
COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NO="No"
COM_COMPONENTBUILDER_NONE_DB="None DB" COM_COMPONENTBUILDER_NONE_DB="None DB"
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NOT_SET="not set" COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" 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_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_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_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_DESCRIPTION_FOUND="No description found."
@ -5340,6 +5412,7 @@ COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
COM_COMPONENTBUILDER_NO_FOUND="No Found" COM_COMPONENTBUILDER_NO_FOUND="No Found"
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item 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_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_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_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_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
@ -5348,6 +5421,7 @@ COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_
COM_COMPONENTBUILDER_NO_TYPE="No Type" COM_COMPONENTBUILDER_NO_TYPE="No Type"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found." COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages" 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_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_ON_GITHUB="on Github"
COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPEN="Open"
@ -5562,10 +5636,12 @@ COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD="Set a cl
COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" 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_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_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_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_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_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_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="Show"
COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW="Show in list view" 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_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>."
@ -6406,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_MYSQL_TWEAKS="The component mysql tweaks"
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views" COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates" 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_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_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." COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
@ -6565,6 +6642,7 @@ COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EI
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_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_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_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_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_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="You have %s %s. Adding more then 50 %s is considered bad practice."
@ -6577,6 +6655,7 @@ COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add th
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_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_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_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_COMPONENT_="- Select Component -"
COM_COMPONENTBUILDER__SELECT_PACKAGE_="- Select Package -" 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_CREATE_S=", since you don't have permission to create %s!"

View File

@ -480,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_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="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_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_CLONE_BUTTON_ACCESS="Joomla Component Clone 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_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages 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_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="Languages Access"
COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages" COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages"
COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use" COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use"
@ -506,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_IMPORT_DESC="Allows the users in this group to import import languages"
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu" 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_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="Language Translations Access"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC="Allows the users in this group to access access language translations" 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" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE="Language Translations Batch Use"

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

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

View File

@ -100,62 +100,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->addpermissions))
{
// Convert the addpermissions field to an array.
$addpermissions = new Registry;
$addpermissions->loadString($item->addpermissions);
$item->addpermissions = $addpermissions->toArray();
}
if (!empty($item->addtabs))
{
// Convert the addtabs field to an array.
$addtabs = new Registry;
$addtabs->loadString($item->addtabs);
$item->addtabs = $addtabs->toArray();
}
if (!empty($item->addlinked_views))
{
// Convert the addlinked_views field to an array.
$addlinked_views = new Registry;
$addlinked_views->loadString($item->addlinked_views);
$item->addlinked_views = $addlinked_views->toArray();
}
if (!empty($item->addtables))
{
// Convert the addtables field to an array.
$addtables = new Registry;
$addtables->loadString($item->addtables);
$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.
$custom_button = new Registry;
$custom_button->loadString($item->custom_button);
$item->custom_button = $custom_button->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->html_import_view)) if (!empty($item->html_import_view))
{ {
// base64 Decode html_import_view. // base64 Decode html_import_view.
@ -360,6 +304,62 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import_ext = base64_decode($item->php_import_ext); $item->php_import_ext = base64_decode($item->php_import_ext);
} }
if (!empty($item->addpermissions))
{
// Convert the addpermissions field to an array.
$addpermissions = new Registry;
$addpermissions->loadString($item->addpermissions);
$item->addpermissions = $addpermissions->toArray();
}
if (!empty($item->addtabs))
{
// Convert the addtabs field to an array.
$addtabs = new Registry;
$addtabs->loadString($item->addtabs);
$item->addtabs = $addtabs->toArray();
}
if (!empty($item->addlinked_views))
{
// Convert the addlinked_views field to an array.
$addlinked_views = new Registry;
$addlinked_views->loadString($item->addlinked_views);
$item->addlinked_views = $addlinked_views->toArray();
}
if (!empty($item->addtables))
{
// Convert the addtables field to an array.
$addtables = new Registry;
$addtables->loadString($item->addtables);
$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.
$custom_button = new Registry;
$custom_button->loadString($item->custom_button);
$item->custom_button = $custom_button->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->id)) if (empty($item->id))
{ {

View File

@ -168,6 +168,19 @@ class ComponentbuilderModelAjax extends JModelList
} }
$result['path'] = '<code>' . $path . '</code>'; $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; return $result;
} }
@ -1365,7 +1378,7 @@ class ComponentbuilderModelAjax extends JModelList
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $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->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->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.id') . ' != '.(int) $id);
@ -1377,9 +1390,20 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$templateString = array(); $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) foreach ($results as $result)
{ {
$templateString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?&gt;</code></td>"; $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>";
} }
// build the table // 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 = '<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">';
@ -1399,7 +1423,7 @@ class ComponentbuilderModelAjax extends JModelList
$db = JFactory::getDbo(); $db = JFactory::getDbo();
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $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->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->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.id') . ' != '.(int) $id);
@ -1411,17 +1435,29 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$results = $db->loadObjectList(); $results = $db->loadObjectList();
$layoutString = array(); $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) 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) switch ($result->gettype)
{ {
case 1: case 1:
// single // single
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?&gt;</code></td>"; $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; break;
case 2: case 2:
// list // list
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?&gt;</code></td>"; $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; break;
case 3: case 3:
case 4: case 4:
@ -1435,7 +1471,7 @@ class ComponentbuilderModelAjax extends JModelList
{ {
$varName = $result->getcustom; $varName = $result->getcustom;
} }
$layoutString[] = "<td><b>".$result->name."</b></td><td><code>&lt;?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?&gt;</code></td>"; $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; break;
} }
} }
@ -2220,7 +2256,7 @@ class ComponentbuilderModelAjax extends JModelList
protected $extraFieldProperties = array( protected $extraFieldProperties = array(
'listclass' => 'COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD', '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', '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', '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'); '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) public function getFieldOptions($fieldtype)
@ -2244,6 +2280,20 @@ class ComponentbuilderModelAjax extends JModelList
// load the html // load the html
$field['subform'] = '<div class="control-label prop_removal">'. $properties->label . '</div><div class="controls prop_removal">' . $properties->input . '</div>'; $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>'; $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 found field options
return $field; return $field;
} }
@ -2277,6 +2327,32 @@ class ComponentbuilderModelAjax extends JModelList
return null; 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') protected function buildFieldOptionsSubform($values, $nameListOptions = null, $name = 'properties', $label = 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL')
{ {
// get the subform // get the subform

View File

@ -170,14 +170,15 @@ class ComponentbuilderModelCompiler extends JModelList
return $db->loadObjectList(); return $db->loadObjectList();
} }
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr) public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
{ {
$set['joomlaVersion'] = $version; $set['version'] = $version;
$set['componentId'] = $id; $set['component'] = $id;
$set['addBackup'] = $backup; $set['backup'] = $backup;
$set['addRepo'] = $repo; $set['repository'] = $repo;
$set['addPlaceholders'] = $addPlaceholders; $set['placeholders'] = $addPlaceholders;
$set['debugLinenr'] = $debugLinenr; $set['debuglinenr'] = $debugLinenr;
$set['minify'] = $minify;
// start up Compiler // start up Compiler
$this->compiler = new Compiler($set); $this->compiler = new Compiler($set);
if($this->compiler) if($this->compiler)

View File

@ -95,6 +95,12 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$item->metadata = $registry->toArray(); $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)) if (!empty($item->dashboard_tab))
{ {
// Convert the dashboard_tab field to an array. // Convert the dashboard_tab field to an array.
@ -103,12 +109,6 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$item->dashboard_tab = $dashboard_tab->toArray(); $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 // update the fields
$objectUpdate = new stdClass(); $objectUpdate = new stdClass();
$objectUpdate->id = (int) $item->id; $objectUpdate->id = (int) $item->id;

View File

@ -100,38 +100,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->metadata = $registry->toArray(); $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)) if (!empty($item->php_jview_display))
{ {
// base64 Decode 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); $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)) if (empty($item->id))
{ {

View File

@ -100,54 +100,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->metadata = $registry->toArray(); $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)) if (!empty($item->php_custom_get))
{ {
// base64 Decode 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); $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)) if (empty($item->id))
{ {

View File

@ -100,18 +100,6 @@ class ComponentbuilderModelField extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->xml))
{
// JSON Decode xml.
$item->xml = json_decode($item->xml);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->css_views)) if (!empty($item->css_views))
{ {
// base64 Decode css_views. // base64 Decode css_views.
@ -124,12 +112,24 @@ class ComponentbuilderModelField extends JModelAdmin
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
} }
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->javascript_views_footer)) if (!empty($item->javascript_views_footer))
{ {
// base64 Decode javascript_views_footer. // base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $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)) if (empty($item->id))
{ {
@ -893,6 +893,10 @@ class ComponentbuilderModelField extends JModelAdmin
$properties = $input->get('properties', null, 'ARRAY'); $properties = $input->get('properties', null, 'ARRAY');
// get the extra properties // get the extra properties
$extraproperties = $input->get('extraproperties', null, 'ARRAY'); $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 // make sure we have an array
if (ComponentbuilderHelper::checkArray($properties)) if (ComponentbuilderHelper::checkArray($properties))
{ {
@ -931,10 +935,22 @@ class ComponentbuilderModelField extends JModelAdmin
} }
} }
} }
// 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 the bucket has been loaded
if (ComponentbuilderHelper::checkArray($bucket)) if (ComponentbuilderHelper::checkArray($bucket))
{ {
$data['xml'] = "<field\n".implode("\n", $bucket)."\n/>"; $data['xml'] = "<field".PHP_EOL.implode(PHP_EOL, $bucket).PHP_EOL."/>";
} }
} }
@ -944,12 +960,6 @@ class ComponentbuilderModelField extends JModelAdmin
$data['xml'] = (string) json_encode($data['xml']); $data['xml'] = (string) json_encode($data['xml']);
} }
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the css_views string to base64 string. // Set the css_views string to base64 string.
if (isset($data['css_views'])) if (isset($data['css_views']))
{ {
@ -962,6 +972,12 @@ class ComponentbuilderModelField extends JModelAdmin
$data['css_view'] = base64_encode($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']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the javascript_views_footer string to base64 string. // Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer'])) if (isset($data['javascript_views_footer']))
{ {

View File

@ -184,6 +184,7 @@ class ComponentbuilderModelFields extends JModelList
if ($name === 'datatype') if ($name === 'datatype')
{ {
$datatypeArray = array( $datatypeArray = array(
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR', 'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR', 'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT', 'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',
@ -431,12 +432,12 @@ class ComponentbuilderModelFields extends JModelList
continue; continue;
} }
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode css_views // decode css_views
$item->css_views = base64_decode($item->css_views); $item->css_views = base64_decode($item->css_views);
// decode css_view // decode css_view
$item->css_view = base64_decode($item->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 // decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// unset the values we don't want exported. // unset the values we don't want exported.

View File

@ -151,22 +151,23 @@ class JFormFieldComponent extends JFormFieldList
public function getOptions() public function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name'))); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC'); $query->order('a.system_name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$options[] = JHtml::_('select.option', '', 'Select an option'); $options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->component_system_name); $options[] = JHtml::_('select.option', $item->id, $item->component_system_name);
} }
} }
return $options;
return $options;
} }
} }

View File

@ -50,22 +50,22 @@ class JFormFieldLang extends JFormFieldList
public function getOptions() public function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name'))); $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name')));
$query->from($db->quoteName('#__componentbuilder_language', 'a')); $query->from($db->quoteName('#__componentbuilder_language', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.langtag ASC'); $query->order('a.langtag ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$options[] = JHtml::_('select.option', '', 'Select an option'); $options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')'); $options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
} }
} }
return $options; return $options;
} }
} }

View File

@ -249,6 +249,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
if ($name === 'datatype') if ($name === 'datatype')
{ {
$datatypeArray = array( $datatypeArray = array(
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR', 'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR', 'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT', 'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',

View File

@ -105,7 +105,8 @@
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
multiple="true" multiple="true"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION"
icon="list"> icon="list"
min="1">
<form hidden="true" name="list_addfields_modal" repeat="true"> <form hidden="true" name="list_addfields_modal" repeat="true">
<!-- Field Field. Type: Fields. (custom) --> <!-- Field Field. Type: Fields. (custom) -->
<field <field
@ -158,6 +159,7 @@
required="false" required="false"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION"
class="inputbox" class="inputbox"
onchange="checkTitle(this)"
/> />
<!-- Alias Field. Type: Checkbox. (joomla) --> <!-- Alias Field. Type: Checkbox. (joomla) -->
<field <field
@ -168,6 +170,7 @@
required="false" required="false"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION"
class="inputbox" class="inputbox"
onchange="checkAlias(this)"
/> />
<!-- Sort Field. Type: Checkbox. (joomla) --> <!-- Sort Field. Type: Checkbox. (joomla) -->
<field <field

View File

@ -1140,7 +1140,8 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
multiple="true" multiple="true"
icon="list"> icon="list"
max="20">
<form hidden="true" name="list_custom_button_modal" repeat="true"> <form hidden="true" name="list_custom_button_modal" repeat="true">
<!-- Icomoon Field. Type: List. (joomla) --> <!-- Icomoon Field. Type: List. (joomla) -->
<field <field

View File

@ -105,7 +105,8 @@
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
multiple="true" multiple="true"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION"
icon="list"> icon="list"
min="1">
<form hidden="true" name="list_addadmin_views_modal" repeat="true"> <form hidden="true" name="list_addadmin_views_modal" repeat="true">
<!-- Adminview Field. Type: Adminviews. (custom) --> <!-- Adminview Field. Type: Adminviews. (custom) -->
<field <field

View File

@ -544,7 +544,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -570,7 +570,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -611,7 +611,8 @@
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_BUTTON_LABEL" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
multiple="true" multiple="true"
icon="list"> icon="list"
max="20">
<form hidden="true" name="list_custom_button_modal" repeat="true"> <form hidden="true" name="list_custom_button_modal" repeat="true">
<!-- Icomoon Field. Type: List. (joomla) --> <!-- Icomoon Field. Type: List. (joomla) -->
<field <field

View File

@ -521,6 +521,10 @@ jQuery(document).ready(function()
getValidationRulesTable(); getValidationRulesTable();
// set button to create more fields // set button to create more fields
addButton('validation_rule', 'validation_rules_header', 2); addButton('validation_rule', 'validation_rules_header', 2);
// get the field type text
var fieldText = jQuery("#jform_fieldtype option:selected").text().toLowerCase();
// now check if database input is needed
dbChecker(fieldText);
}); });
function getLinked_server(type){ function getLinked_server(type){
@ -601,6 +605,13 @@ function getFieldOptions(fieldtype){
// append to note_filter_information class // append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(result.extra); jQuery('.note_filter_information').closest('.control-group').prepend(result.extra);
// append to note_filter_information class // append to note_filter_information class
if(result.textarea){
jQuery.each( result.textarea, function( i, tField ) {
// append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(tField);
});
}
// append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(result.subform); jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
// add the watcher // add the watcher
rowWatcher(); rowWatcher();
@ -764,3 +775,50 @@ function getValidationRulesTable(){
} }
}); });
} }
function dbChecker(type){
if ('note' === type || 'spacer' === type) {
// update the datatype selection
jQuery('#jform_datatype').val('').trigger('liszt:updated').change();
jQuery('#jform_datalenght').val('').trigger('liszt:updated').change();
jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
jQuery('#jform_indexes').val(0).trigger('liszt:updated').change();
jQuery('#jform_store').val(0).trigger('liszt:updated').change();
// remove the datatype
jQuery('#jform_datatype-lbl').closest('.control-group').hide();
jQuery('#jform_datatype').closest('.control-group').hide();
updateFieldRequired('datatype',1);
jQuery('#jform_datatype').removeAttr('required');
jQuery('#jform_datatype').removeAttr('aria-required');
jQuery('#jform_datatype').removeClass('required');
// remove the null selection
jQuery('#jform_null_switch-lbl').closest('.control-group').hide();
jQuery('#jform_null_switch').closest('.control-group').hide();
updateFieldRequired('null_switch',1);
jQuery('#jform_null_switch').removeAttr('required');
jQuery('#jform_null_switch').removeAttr('aria-required');
jQuery('#jform_null_switch').removeClass('required');
// show notice
jQuery('.note_no_database_settings_needed').closest('.control-group').show();
jQuery('.note_database_settings_needed').closest('.control-group').hide();
} else {
// add the datatype
jQuery('#jform_datatype-lbl').closest('.control-group').show();
jQuery('#jform_datatype').closest('.control-group').show();
updateFieldRequired('datatype',0);
jQuery('#jform_datatype').prop('required','required');
jQuery('#jform_datatype').attr('aria-required',true);
jQuery('#jform_datatype').addClass('required');
// add the null selection
jQuery('#jform_null_switch-lbl').closest('.control-group').show();
jQuery('#jform_null_switch').closest('.control-group').show();
updateFieldRequired('null_switch',0);
jQuery('#jform_null_switch').prop('required','required');
jQuery('#jform_null_switch').attr('aria-required',true);
jQuery('#jform_null_switch').addClass('required');
// remove notice
jQuery('.note_no_database_settings_needed').closest('.control-group').hide();
jQuery('.note_database_settings_needed').closest('.control-group').show();
}
}

View File

@ -122,6 +122,8 @@
multiple="false" multiple="false"
required="true"> required="true">
<!-- Option Set. --> <!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION</option>
<option value="CHAR"> <option value="CHAR">
COM_COMPONENTBUILDER_FIELD_CHAR</option> COM_COMPONENTBUILDER_FIELD_CHAR</option>
<option value="VARCHAR"> <option value="VARCHAR">
@ -217,33 +219,6 @@
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION" description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox" class="inputbox"
/> />
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Css_views Field. Type: Textarea. (joomla) --> <!-- Css_views Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
@ -298,64 +273,8 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option> COM_COMPONENTBUILDER_FIELD_NO</option>
</field> </field>
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_database_settings_needed Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" /> <field type="note" name="note_database_settings_needed" label="COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_DESCRIPTION" heading="h4" class="alert alert-info note_database_settings_needed" />
<!-- Datadefault_other Field. Type: Text. (joomla) -->
<field
type="text"
name="datadefault_other"
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_LABEL"
size="10"
maxlength="50"
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_HINT"
/>
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Datadefault Field. Type: List. (joomla) -->
<field
type="list"
name="datadefault"
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_LABEL"
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_DESCRIPTION"
class="btn-group"
multiple="false">
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_FIELD_NONE</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_ZERO</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_ONE</option>
<option value="CURRENT_TIMESTAMP">
COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP</option>
<option value="DATETIME">
COM_COMPONENTBUILDER_FIELD_DATETIME</option>
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Datalenght_other Field. Type: Text. (joomla) -->
<field
type="text"
name="datalenght_other"
label="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL"
size="10"
maxlength="50"
description="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
/>
<!-- Datalenght Field. Type: List. (joomla) --> <!-- Datalenght Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
@ -404,8 +323,95 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option> COM_COMPONENTBUILDER_FIELD_NO</option>
</field> </field>
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" />
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Datadefault_other Field. Type: Text. (joomla) -->
<field
type="text"
name="datadefault_other"
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_LABEL"
size="10"
maxlength="50"
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_HINT"
/>
<!-- Datadefault Field. Type: List. (joomla) -->
<field
type="list"
name="datadefault"
label="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_LABEL"
description="COM_COMPONENTBUILDER_FIELD_DATADEFAULT_DESCRIPTION"
class="btn-group"
multiple="false">
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_FIELD_NONE</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_ZERO</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_ONE</option>
<option value="CURRENT_TIMESTAMP">
COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP</option>
<option value="DATETIME">
COM_COMPONENTBUILDER_FIELD_DATETIME</option>
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Datalenght_other Field. Type: Text. (joomla) -->
<field
type="text"
name="datalenght_other"
label="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL"
size="10"
maxlength="50"
description="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
/>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" /> <field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Note_no_database_settings_needed Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_no_database_settings_needed" label="COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_DESCRIPTION" heading="h4" class="alert alert-info note_no_database_settings_needed" />
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) --> <!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"

View File

@ -85,18 +85,18 @@
filter="unset" filter="unset"
/> />
<!-- Dynamic Fields. --> <!-- Dynamic Fields. -->
<!-- Entranslation Field. Type: Textarea. (joomla) --> <!-- Source Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
name="entranslation" name="source"
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL" label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL"
rows="4" rows="4"
cols="5" cols="5"
description="JFIELD_TITLE_DESC" description="JFIELD_TITLE_DESC"
message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_MESSAGE" message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE"
class="text_area span12" class="text_area span12"
filter="STRING" filter="safehtml"
hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_HINT" hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_HINT"
readonly="true" readonly="true"
disabled="true" disabled="true"
/> />

View File

@ -178,7 +178,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -585,7 +585,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -611,7 +611,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -630,7 +630,8 @@
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_BUTTON_LABEL" label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_BUTTON_LABEL"
layout="joomla.form.field.subform.repeatable-table" layout="joomla.form.field.subform.repeatable-table"
multiple="true" multiple="true"
icon="list"> icon="list"
max="20">
<form hidden="true" name="list_custom_button_modal" repeat="true"> <form hidden="true" name="list_custom_button_modal" repeat="true">
<!-- Icomoon Field. Type: List. (joomla) --> <!-- Icomoon Field. Type: List. (joomla) -->
<field <field

View File

@ -178,7 +178,7 @@ function getDynamicValues(id){
} }
function getLayoutDetails_server(id){ function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }
@ -204,7 +204,7 @@ function getLayoutDetails(id){
} }
function getTemplateDetails_server(id){ function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json"; var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json&vdm="+vastDevMod;
if(token.length > 0 && id > 0){ if(token.length > 0 && id > 0){
var request = 'token='+token+'&id='+id; var request = 'token='+token+'&id='+id;
} }

View File

@ -80,14 +80,17 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
parent::populateState(); parent::populateState();
} }
protected $app; public $canmerge = 1;
public $postfix = false;
public $forceUpdate = 0;
public $hasKey = 0;
public $sleutle = null;
public $data = false;
public $app;
protected $dir = false; protected $dir = false;
protected $data = false;
protected $target = false; protected $target = false;
protected $newID = array(); protected $newID = array();
protected $forceUpdate = 0;
protected $hasKey = 0;
protected $sleutle = null;
protected $updateAfter = array('field' => array(), 'adminview' => array()); protected $updateAfter = array('field' => array(), 'adminview' => array());
protected $divergedDataMover = array(); protected $divergedDataMover = array();
protected $fieldTypes = array(); protected $fieldTypes = array();
@ -95,6 +98,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected $specialValue = false; protected $specialValue = false;
protected $checksum = null; protected $checksum = null;
protected $checksumURLs = array('vdm' => 'https://raw.githubusercontent.com/vdm-io/JCB-Packages/master/'); protected $checksumURLs = array('vdm' => 'https://raw.githubusercontent.com/vdm-io/JCB-Packages/master/');
protected $mustMerge = array('validation_rule', 'fieldtype', 'snippet', 'language', 'language_translation');
/** /**
* Import an spreadsheet from either folder, url or upload. * Import an spreadsheet from either folder, url or upload.
@ -225,6 +229,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->forceUpdate = $this->app->input->getInt('force_update', 0); $this->forceUpdate = $this->app->input->getInt('force_update', 0);
// show more information // show more information
$this->moreInfo = $this->app->input->getInt('more_info', 0); $this->moreInfo = $this->app->input->getInt('more_info', 0);
// allow merge
$this->canmerge = $this->app->input->getInt('canmerge', 1);
// has a key // has a key
$this->hasKey = $this->app->input->getInt('haskey', 0); $this->hasKey = $this->app->input->getInt('haskey', 0);
// die sleutle // die sleutle
@ -695,6 +701,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->user = JFactory::getUser(); $this->user = JFactory::getUser();
// set some defaults // set some defaults
$this->today = JFactory::getDate()->toSql(); $this->today = JFactory::getDate()->toSql();
// if we can't merge add postfix to name
if (!$this->canmerge)
{
// set some postfix
$this->postfix = ' ('.ComponentbuilderHelper::randomkey(2).')';
}
// the array of tables to store // the array of tables to store
$tables = array( $tables = array(
'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view', 'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
@ -713,7 +725,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
} }
// do a after all run on all items that need it // do a after all run on all items that need it
$this->updateAfter(); $this->updateAfterAll();
// finally move the old datasets // finally move the old datasets
$this->moveDivergedData(); $this->moveDivergedData();
// lets move all the files to its correct location // lets move all the files to its correct location
@ -727,12 +739,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
/** /**
* Save the smart items * Save the smart items
* *
* @param string $type The type of values * @param string $table The table
* *
* @return boolean false on failure * @return boolean false on failure
* *
**/ **/
protected function saveSmartItems($table) public function saveSmartItems($table)
{ {
if (isset($this->data[$table]) && ComponentbuilderHelper::checkArray($this->data[$table])) if (isset($this->data[$table]) && ComponentbuilderHelper::checkArray($this->data[$table]))
{ {
@ -741,6 +753,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$canEdit = $canDo->get('core.edit'); $canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state'); $canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create'); $canCreate = $canDo->get('core.create');
// check if we should allow merge of local values
$canmerge = $this->allowMerge($table);
// set id keeper // set id keeper
if (!isset($this->newID[$table])) if (!isset($this->newID[$table]))
{ {
@ -750,7 +764,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{ {
$oldID = (int) $item->id; $oldID = (int) $item->id;
// first check if exist // first check if exist
if ($local = $this->getLocalItem($item, $table, 1)) if ($canmerge && $local = $this->getLocalItem($item, $table, 1))
{ {
// display more import info // display more import info
if ($this->moreInfo) if ($this->moreInfo)
@ -821,6 +835,21 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
return true; return true;
} }
/**
* Check if we should allow merge for this table
*
* @return boolean
*
**/
protected function allowMerge($table)
{
if ($this->canmerge == 1 || in_array($table, $this->mustMerge))
{
return true;
}
return false;
}
/** /**
* Move the smart content (files & folders) into place * Move the smart content (files & folders) into place
* *
@ -844,7 +873,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// great we have some custom stuff lets move it // great we have some custom stuff lets move it
if (!JFolder::copy($customDir, $customPath,'',true)) if (!JFolder::copy($customDir, $customPath,'',true))
{ {
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVE_TO_CORRECT_LOCATION'), 'error'); $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false; $success = false;
} }
// display more import info // display more import info
@ -860,7 +889,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// great we have some images lets move them // great we have some images lets move them
if (!JFolder::copy($imageDir, $imagesPath,'',true)) if (!JFolder::copy($imageDir, $imagesPath,'',true))
{ {
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVE_TO_CORRECT_LOCATION'), 'error'); $this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false; $success = false;
} }
// display more import info // display more import info
@ -884,7 +913,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder); $fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true)) if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true))
{ {
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVE_TO_BSB', $folder, $destination), 'error'); $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
$success = false; $success = false;
} }
// display more import info // display more import info
@ -905,7 +934,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file); $fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination)) if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination))
{ {
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVE_TO_BSB', $file, $destination), 'error'); $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error');
$success = false; $success = false;
} }
// display more import info // display more import info
@ -989,7 +1018,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* @return void * @return void
* *
**/ **/
protected function updateAfter() public function updateAfterAll()
{ {
if (ComponentbuilderHelper::checkArray($this->updateAfter['field'])) if (ComponentbuilderHelper::checkArray($this->updateAfter['field']))
{ {
@ -1068,7 +1097,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if (ComponentbuilderHelper::checkJson($addlinked_views)) if (ComponentbuilderHelper::checkJson($addlinked_views))
{ {
$addlinked_views = json_decode($addlinked_views, true); $addlinked_views = json_decode($addlinked_views, true);
// convert Repetable Fields // convert Repeatable Fields
if (ComponentbuilderHelper::checkArray($addlinked_views) && isset($addlinked_views['adminview'])) if (ComponentbuilderHelper::checkArray($addlinked_views) && isset($addlinked_views['adminview']))
{ {
$addlinked_views = ComponentbuilderHelper::convertRepeatable($addlinked_views, 'addlinked_views'); $addlinked_views = ComponentbuilderHelper::convertRepeatable($addlinked_views, 'addlinked_views');
@ -1097,7 +1126,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* @return void * @return void
* *
**/ **/
protected function moveDivergedData() public function moveDivergedData()
{ {
// check if there is data to move // check if there is data to move
if (ComponentbuilderHelper::checkArray($this->divergedDataMover)) if (ComponentbuilderHelper::checkArray($this->divergedDataMover))
@ -1356,7 +1385,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* object on success * object on success
* *
**/ **/
protected function prepItem($item, &$type, $action, $diverged = false) protected function prepItem($item, $type, $action, $diverged = false)
{ {
// remove access // remove access
if (isset($item->access)) if (isset($item->access))
@ -1429,6 +1458,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB', $item->fieldtype, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'error'); $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB', $item->fieldtype, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'error');
return false; return false;
} }
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->name = $item->name.$this->postfix;
}
break; break;
case 'dynamic_get': case 'dynamic_get':
// update the view_table_main ID // update the view_table_main ID
@ -1455,6 +1489,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
); );
// update the subform ids // update the subform ids
$this->updateSubformsIDs($item, 'dynamic_get', $updaterT); $this->updateSubformsIDs($item, 'dynamic_get', $updaterT);
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->name = $item->name.$this->postfix;
}
break; break;
case 'layout': case 'layout':
case 'template': case 'template':
@ -1462,6 +1501,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = $this->setNewID($item, 'dynamic_get', 'dynamic_get', $type); $item = $this->setNewID($item, 'dynamic_get', 'dynamic_get', $type);
// update the snippet // update the snippet
$item = $this->setNewID($item, 'snippet', 'snippet', $type); $item = $this->setNewID($item, 'snippet', 'snippet', $type);
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->name = $item->name.$this->postfix;
}
break; break;
case 'custom_admin_view': case 'custom_admin_view':
case 'site_view': case 'site_view':
@ -1481,6 +1525,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->system_name = $item->system_name.$this->postfix;
}
break; break;
case 'admin_view': case 'admin_view':
// set the getters anchors // set the getters anchors
@ -1530,6 +1579,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->system_name = $item->system_name.$this->postfix;
}
break; break;
case 'joomla_component': case 'joomla_component':
// set the anchors getters // set the anchors getters
@ -1656,6 +1710,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
); );
// update the repeatable fields // update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// if we can't merge add postfix to name
if ($this->postfix)
{
$item->system_name = $item->system_name.$this->postfix;
}
break; break;
case 'component_admin_views': case 'component_admin_views':
// diverged id already updated // diverged id already updated
@ -1947,6 +2006,13 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{ {
unset($item->localTranslation); unset($item->localTranslation);
} }
// move entranslation to source
if (isset($item->entranslation))
{
$item->source = $item->entranslation;
// also remove the old field
unset($item->entranslation);
}
break; break;
case 'admin_fields': case 'admin_fields':
case 'admin_fields_conditions': case 'admin_fields_conditions':
@ -2158,7 +2224,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* ID int on success * ID int on success
* *
**/ **/
protected function updateLocalItem(&$item, &$type, &$canState) protected function updateLocalItem(&$item, $type, &$canState)
{ {
// prep the item // prep the item
if ($update = $this->prepItem($item, $type, 'update')) if ($update = $this->prepItem($item, $type, 'update'))
@ -2189,7 +2255,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* ID int on success * ID int on success
* *
**/ **/
protected function addLocalItem(&$item, &$type, $diverged = false) protected function addLocalItem(&$item, $type, $diverged = false)
{ {
// prep the item // prep the item
if ($add = $this->prepItem($item, $type, 'add', $diverged)) if ($add = $this->prepItem($item, $type, 'add', $diverged))
@ -2220,15 +2286,26 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
* ID int on success * ID int on success
* *
**/ **/
protected function getLocalItem(&$item, &$type, $retry = false, $get = 1, $diverged = false) protected function getLocalItem($item, $type, $retry = false, $get = 1, $diverged = false)
{ {
$query = $this->_db->getQuery(true); $query = $this->_db->getQuery(true);
$query->select('a.*'); $query->select('a.*');
$query->from($this->_db->quoteName('#__componentbuilder_' . $type, 'a')); $query->from($this->_db->quoteName('#__componentbuilder_' . $type, 'a'));
// only run query if where is set // only run query if where is set
$runQuery = false; $runQuery = false;
if ($get == 1 && isset($item->created) && isset($item->id)) if ($get == 1 && isset($item->created) && isset($item->id) && (isset($item->name) || isset($item->system_name)))
{ {
// to prefent crazy mismatch with old IDs (I know very weired)
if (isset($item->system_name))
{
$query->where($this->_db->quoteName('a.system_name') . ' = '. $this->_db->quote($item->system_name));
}
// to prefent crazy mismatch with old IDs (I know very weired)
if (isset($item->name))
{
$query->where($this->_db->quoteName('a.name') . ' = '. $this->_db->quote($item->name));
}
// load the created and id
$query->where($this->_db->quoteName('a.created') . ' = '. $this->_db->quote($item->created)); $query->where($this->_db->quoteName('a.created') . ' = '. $this->_db->quote($item->created));
$query->where($this->_db->quoteName('a.id') .' = '. (int) $item->id); $query->where($this->_db->quoteName('a.id') .' = '. (int) $item->id);
$runQuery = true; $runQuery = true;
@ -2271,19 +2348,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
} }
} }
elseif (isset($item->{$get}) && componentbuilderHelper::checkString($item->{$get})) // do not allow empty strings (since it could be major mis match) elseif (isset($item->{$get}))
{
// set the value
$value = $item->{$get};
// check if we have special value
if ($this->specialValue && ComponentbuilderHelper::checkArray($this->specialValue) && isset($this->specialValue[$get]))
{
$value = $this->specialValue[$get];
}
$query->where($this->_db->quoteName('a.' . $get) . ' = '. $this->_db->quote($value));
$runQuery = true;
}
elseif (isset($item->{$get}) && is_numeric($item->{$get}))
{ {
// set the value // set the value
$value = $item->{$get}; $value = $item->{$get};
@ -2293,14 +2358,18 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$value = $this->specialValue[$get]; $value = $this->specialValue[$get];
} }
// load to query // load to query
if (is_int($value)) if (is_numeric($value) && is_int($value))
{ {
$query->where($this->_db->quoteName('a.' . $get) . ' = '. (int) $value); $query->where($this->_db->quoteName('a.' . $get) . ' = '. (int) $value);
} }
elseif (is_float($value)) elseif (is_numeric($value) && is_float($value))
{ {
$query->where($this->_db->quoteName('a.' . $get) . ' = '. (float) $value); $query->where($this->_db->quoteName('a.' . $get) . ' = '. (float) $value);
} }
elseif(componentbuilderHelper::checkString($value)) // do not allow empty strings (since it could be major mis match)
{
$query->where($this->_db->quoteName('a.' . $get) . ' = '. $this->_db->quote($value));
}
else else
{ {
return false; // really not needed but who knows for sure... return false; // really not needed but who knows for sure...
@ -2340,6 +2409,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{ {
$this->specialValue['admin_view'] = $this->newID['admin_view'][(int) $item->admin_view]; $this->specialValue['admin_view'] = $this->newID['admin_view'][(int) $item->admin_view];
} }
// (TODO) I have seen this happen, seems dangerous!
else
{
return false;
}
break; break;
case 'validation_rule': case 'validation_rule':
case 'fieldtype': case 'fieldtype':
@ -2509,8 +2583,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
} }
break; break;
case 'language_translation': case 'language_translation':
// get by English translation since there should just be one // get by source translation since there should just be one
$getter = 'entranslation'; $getter = 'source';
if (isset($item->entranslation))
{
$item->source = $item->entranslation;
}
break; break;
case 'language': case 'language':
// get by language tag since there should just be one // get by language tag since there should just be one

View File

@ -470,12 +470,19 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
$user = JFactory::getUser(); $user = JFactory::getUser();
// remove header if it has headers // remove header if it has headers
$id_key = $data['target_headers']['id']; $id_key = $data['target_headers']['id'];
$english_key = $data['target_headers']['English']; if (isset($data['target_headers']['Source']))
{
$source_key = $data['target_headers']['Source'];
}
else
{
$source_key = $data['target_headers']['English'];
}
// get the first array set // get the first array set
$firstSet = reset($data['array']); $firstSet = reset($data['array']);
// check if first array is a header array and remove if true // check if first array is a header array and remove if true
if($firstSet[$id_key] == 'id' || $firstSet[$english_key] == 'English') if($firstSet[$id_key] == 'id' || $firstSet[$source_key] == 'Source' || $firstSet[$source_key] == 'English')
{ {
array_shift($data['array']); array_shift($data['array']);
} }
@ -504,7 +511,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
->select($db->quoteName(array('version', 'translation'))) ->select($db->quoteName(array('version', 'translation')))
->from($db->quoteName('#__componentbuilder_'.$table)) ->from($db->quoteName('#__componentbuilder_'.$table))
->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key])) ->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key]))
->where($db->quoteName('entranslation') . ' = '. $db->quote($row[$english_key])); ->where($db->quoteName('source') . ' = '. $db->quote($row[$source_key]));
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$db->setQuery($query); $db->setQuery($query);
$db->execute(); $db->execute();
@ -538,7 +545,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
foreach($row as $key => $cell) foreach($row as $key => $cell)
{ {
// ignore column // ignore column
if ('IGNORE' === $target[$key] || 'modified_by' === $target[$key] || 'modified' === $target[$key] || 'English' === $target[$key] ) if ('IGNORE' === $target[$key] || 'modified_by' === $target[$key] || 'modified' === $target[$key] || 'Source' === $target[$key] || 'English' === $target[$key] )
{ {
continue; continue;
} }

View File

@ -100,14 +100,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->addcontributors))
{
// Convert the addcontributors field to an array.
$addcontributors = new Registry;
$addcontributors->loadString($item->addcontributors);
$item->addcontributors = $addcontributors->toArray();
}
if (!empty($item->php_postflight_update)) if (!empty($item->php_postflight_update))
{ {
// base64 Decode php_postflight_update. // base64 Decode php_postflight_update.
@ -221,6 +213,14 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->export_key = rtrim($basic->decryptString($item->export_key), "\0"); $item->export_key = rtrim($basic->decryptString($item->export_key), "\0");
} }
if (!empty($item->addcontributors))
{
// Convert the addcontributors field to an array.
$addcontributors = new Registry;
$addcontributors->loadString($item->addcontributors);
$item->addcontributors = $addcontributors->toArray();
}
if (empty($item->id)) if (empty($item->id))
{ {

View File

@ -80,12 +80,60 @@ class ComponentbuilderModelJoomla_components extends JModelList
protected $params; protected $params;
protected $tempPath; protected $tempPath;
protected $customPath; protected $customPath;
protected $smartExport = array(); protected $smartBox = array();
protected $exportIDs = array(); protected $smartIDs = array();
protected $customCodeM = array(); protected $customCodeM = array();
protected $fieldTypes = array(); protected $fieldTypes = array();
protected $isMultiple = array(); protected $isMultiple = array();
/**
* Method to clone the component
*
* @return bool on success.
*/
public function cloner($pks)
{
// get the components
if ($items = $this->getComponents($pks))
{
// update $pks with returned IDs
$pks = array();
// start loading the components
$this->smartBox['joomla_component'] = array();
foreach ($items as $nr => &$item)
{
// check if user has access
$access = ($this->user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $this->user->authorise('joomla_component.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);
continue;
}
// make sure old fields are not exported any more
$this->removeOldComponentValues($item);
// load to global object
$this->smartBox['joomla_component'][$item->id] = $item;
// add to pks
$pks[] = $item->id;
}
// has any data been set for this component
if (ComponentbuilderHelper::checkArray($pks))
{
// load the linked stuff
$this->getLinkedToComponents($pks);
}
// has any data been set for this component
if (isset($this->smartBox['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartBox['joomla_component']))
{
// set the folder and move the files of each component to the folder
return $this->smartCloner();
}
}
return false;
}
/** /**
* Method to build the export package * Method to build the export package
* *
@ -93,53 +141,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
*/ */
public function getSmartExport($pks) public function getSmartExport($pks)
{ {
// setup the query // get the components
if (ComponentbuilderHelper::checkArray($pks)) if ($items = $this->getComponents($pks))
{ {
// Get the user object.
if (!ComponentbuilderHelper::checkObject($this->user))
{
$this->user = JFactory::getUser();
}
// Create a new query object.
if (!ComponentbuilderHelper::checkObject($this->_db))
{
$this->_db = JFactory::getDBO();
}
$query = $this->_db->getQuery(true);
// Select some fields
$query->select(array('a.*'));
// From the componentbuilder_joomla_component table
$query->from($this->_db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$this->user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $this->user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$this->_db->setQuery($query);
$this->_db->execute();
if ($this->_db->getNumRows())
{
// load the items from db
$items = $this->_db->loadObjectList();
// check if we have items
if (ComponentbuilderHelper::checkArray($items))
{
// set params
if (!ComponentbuilderHelper::checkObject($this->params))
{
$this->params = JComponentHelper::getParams('com_componentbuilder');
}
// set custom folder path // set custom folder path
$this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); $this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
// check what type of export or backup this is // check what type of export or backup this is
@ -206,7 +210,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// update $pks with returned IDs // update $pks with returned IDs
$pks = array(); $pks = array();
// start loading the components // start loading the components
$this->smartExport['joomla_component'] = array(); $this->smartBox['joomla_component'] = array();
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// check if user has access // check if user has access
@ -217,17 +221,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
continue; continue;
} }
// make sure old fields are not exported any more // make sure old fields are not exported any more
unset($item->addconfig); $this->removeOldComponentValues($item);
unset($item->addadmin_views);
unset($item->addcustom_admin_views);
unset($item->addsite_views);
unset($item->version_update);
unset($item->sql_tweak);
unset($item->addcustommenus);
unset($item->dashboard_tab);
unset($item->php_dashboard_methods);
unset($item->addfiles);
unset($item->addfolders);
// build information data set // build information data set
$this->info['name'][$item->id] = $item->name; $this->info['name'][$item->id] = $item->name;
$this->info['short_description'][$item->id] = $item->short_description; $this->info['short_description'][$item->id] = $item->short_description;
@ -281,10 +275,35 @@ class ComponentbuilderModelJoomla_components extends JModelList
// set the language strings for this component // set the language strings for this component
$this->setLanguageTranslation($item->id); $this->setLanguageTranslation($item->id);
// load to global object // load to global object
$this->smartExport['joomla_component'][$item->id] = $item; $this->smartBox['joomla_component'][$item->id] = $item;
// add to pks // add to pks
$pks[] = $item->id; $pks[] = $item->id;
} }
// has any data been set for this component
if (ComponentbuilderHelper::checkArray($pks))
{
// load the linked stuff
$this->getLinkedToComponents($pks);
}
// has any data been set for this component
if (isset($this->smartBox['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartBox['joomla_component']))
{
// set the folder and move the files of each component to the folder
return $this->smartExportBuilder();
}
}
return false;
}
/**
* Get Everything Linked to Components
*
* @return void
*/
protected function getLinkedToComponents($pks)
{
// array of tables linked to joomla_component // array of tables linked to joomla_component
$linkedTables = array( $linkedTables = array(
'custom_code' => 'component', 'custom_code' => 'component',
@ -303,70 +322,145 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->setData($table, $pks, $field); $this->setData($table, $pks, $field);
} }
// add fields and conditions // add fields and conditions
if (isset($this->exportIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->exportIDs['admin_view'])) if (isset($this->smartIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->smartIDs['admin_view']))
{ {
$this->setData('admin_fields', array_values($this->exportIDs['admin_view']), 'admin_view'); $this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
$this->setData('admin_fields_conditions', array_values($this->exportIDs['admin_view']), 'admin_view'); $this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
} }
// add validation rules // add validation rules
if (isset($this->exportIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->exportIDs['validation_rule'])) if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule']))
{ {
$this->setData('validation_rule', array_values($this->exportIDs['validation_rule']), 'name'); $this->setData('validation_rule', array_values($this->smartIDs['validation_rule']), 'name');
} }
// add field types // add field types
if (isset($this->exportIDs['fieldtype']) && ComponentbuilderHelper::checkArray($this->exportIDs['fieldtype'])) if (isset($this->smartIDs['fieldtype']) && ComponentbuilderHelper::checkArray($this->smartIDs['fieldtype']))
{ {
$this->setData('fieldtype', array_values($this->exportIDs['fieldtype']), 'id'); $this->setData('fieldtype', array_values($this->smartIDs['fieldtype']), 'id');
} }
// add templates // add templates
if (isset($this->exportIDs['template']) && ComponentbuilderHelper::checkArray($this->exportIDs['template'])) if (isset($this->smartIDs['template']) && ComponentbuilderHelper::checkArray($this->smartIDs['template']))
{ {
$this->setData('template', array_values($this->exportIDs['template']), 'id'); $this->setData('template', array_values($this->smartIDs['template']), 'id');
} }
// add layouts // add layouts
if (isset($this->exportIDs['layout']) && ComponentbuilderHelper::checkArray($this->exportIDs['layout'])) if (isset($this->smartIDs['layout']) && ComponentbuilderHelper::checkArray($this->smartIDs['layout']))
{ {
$this->setData('layout', array_values($this->exportIDs['layout']), 'id'); $this->setData('layout', array_values($this->smartIDs['layout']), 'id');
} }
// add dynamic get // add dynamic get
if (isset($this->exportIDs['dynamic_get']) && ComponentbuilderHelper::checkArray($this->exportIDs['dynamic_get'])) if (isset($this->smartIDs['dynamic_get']) && ComponentbuilderHelper::checkArray($this->smartIDs['dynamic_get']))
{ {
$this->setData('dynamic_get', array_values($this->exportIDs['dynamic_get']), 'id'); $this->setData('dynamic_get', array_values($this->smartIDs['dynamic_get']), 'id');
} }
// add snippets // only if exporting
if (isset($this->exportIDs['snippet']) && ComponentbuilderHelper::checkArray($this->exportIDs['snippet'])) if ('clone' !== $this->activeType)
{ {
$this->setData('snippet', array_values($this->exportIDs['snippet']), 'id'); // add snippets
if (isset($this->smartIDs['snippet']) && ComponentbuilderHelper::checkArray($this->smartIDs['snippet']))
{
$this->setData('snippet', array_values($this->smartIDs['snippet']), 'id');
} }
// add custom code // add custom code
if (isset($this->exportIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->exportIDs['custom_code'])) if (isset($this->smartIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->smartIDs['custom_code']))
{ {
$this->setData('custom_code', array_values($this->exportIDs['custom_code']), 'id'); $this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
}
}
} }
// has any data been set for this component /**
if (isset($this->smartExport['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartExport['joomla_component'])) * Get Components
*
* @return array of objects.
*/
protected function getComponents($pks)
{ {
// set the folder and move the files of each component to the folder // setup the query
return $this->smartExportBuilder(); if (ComponentbuilderHelper::checkArray($pks))
{
// Get the user object.
if (!ComponentbuilderHelper::checkObject($this->user))
{
$this->user = JFactory::getUser();
} }
// Create a new query object.
if (!ComponentbuilderHelper::checkObject($this->_db))
{
$this->_db = JFactory::getDBO();
}
$query = $this->_db->getQuery(true);
// Select some fields
$query->select(array('a.*'));
// From the componentbuilder_joomla_component table
$query->from($this->_db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where('a.id IN (' . implode(',',$pks) . ')');
// Implement View Level Access
if (!$this->user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $this->user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');
// Load the items
$this->_db->setQuery($query);
$this->_db->execute();
if ($this->_db->getNumRows())
{
// load the items from db
$items = $this->_db->loadObjectList();
// check if we have items
if (ComponentbuilderHelper::checkArray($items))
{
// set params
if (!ComponentbuilderHelper::checkObject($this->params))
{
$this->params = JComponentHelper::getParams('com_componentbuilder');
}
return $items;
} }
} }
} }
return false; return false;
} }
/**
* Remove all values that are no longer relevant.
*
* @return void.
*/
protected function removeOldComponentValues(&$item)
{
// make sure old fields are not used any more
unset($item->addconfig);
unset($item->addadmin_views);
unset($item->addcustom_admin_views);
unset($item->addsite_views);
unset($item->version_update);
unset($item->sql_tweak);
unset($item->addcustommenus);
unset($item->dashboard_tab);
unset($item->php_dashboard_methods);
unset($item->addfiles);
unset($item->addfolders);
}
/** /**
* Set export IDs. * Set export IDs.
* *
* @return void. * @return void.
*/ */
protected function setExportIDs($value, $table, $int = true) protected function setSmartIDs($value, $table, $int = true)
{ {
// check if table has been set // check if table has been set
if (!isset($this->exportIDs[$table])) if (!isset($this->smartIDs[$table]))
{ {
$this->exportIDs[$table] = array(); $this->smartIDs[$table] = array();
} }
// convert if value is in json // convert if value is in json
if (ComponentbuilderHelper::checkJson($value)) if (ComponentbuilderHelper::checkJson($value))
@ -380,21 +474,21 @@ class ComponentbuilderModelJoomla_components extends JModelList
{ {
if ($int && (ComponentbuilderHelper::checkString($id) || is_numeric($id)) && 0 !== (int) $id) if ($int && (ComponentbuilderHelper::checkString($id) || is_numeric($id)) && 0 !== (int) $id)
{ {
$this->exportIDs[$table][(int) $id] = (int) $id; $this->smartIDs[$table][(int) $id] = (int) $id;
} }
elseif (!$int && ComponentbuilderHelper::checkString($id)) elseif (!$int && ComponentbuilderHelper::checkString($id))
{ {
$this->exportIDs[$table][$id] = $this->_db->quote($id); $this->smartIDs[$table][$id] = $this->_db->quote($id);
} }
} }
} }
elseif ($int && (ComponentbuilderHelper::checkString($value) || is_numeric($value)) && 0 !== (int) $value) elseif ($int && (ComponentbuilderHelper::checkString($value) || is_numeric($value)) && 0 !== (int) $value)
{ {
$this->exportIDs[$table][(int) $value] = (int) $value; $this->smartIDs[$table][(int) $value] = (int) $value;
} }
elseif (!$int && ComponentbuilderHelper::checkString($value)) elseif (!$int && ComponentbuilderHelper::checkString($value))
{ {
$this->exportIDs[$table][$value] = $this->_db->quote($value); $this->smartIDs[$table][$value] = $this->_db->quote($value);
} }
} }
@ -519,22 +613,22 @@ class ComponentbuilderModelJoomla_components extends JModelList
// reset the global array // reset the global array
if ('template' === $table) if ('template' === $table)
{ {
$this->exportIDs['template'] = array(); $this->smartIDs['template'] = array();
} }
elseif ('layout' === $table) elseif ('layout' === $table)
{ {
$this->exportIDs['layout'] = array(); $this->smartIDs['layout'] = array();
} }
// start loading the data // start loading the data
if (!isset($this->smartExport[$table])) if (!isset($this->smartBox[$table]))
{ {
$this->smartExport[$table] = array(); $this->smartBox[$table] = array();
} }
// start loading the found items // start loading the found items
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// set the data per id only once // set the data per id only once
if (!isset($item->id) || 0 === (int) $item->id || isset($this->smartExport[$table][$item->id])) if (!isset($item->id) || 0 === (int) $item->id || isset($this->smartBox[$table][$item->id]))
{ {
continue; continue;
} }
@ -571,11 +665,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
unset($item->addconditions); unset($item->addconditions);
} }
// load to global object // load to global object
$this->smartExport[$table][$item->id] = $item; $this->smartBox[$table][$item->id] = $item;
// set the custom code ID's // set the custom code ID's
$this->setCustomCodeIds($item, $table); $this->setCustomCodeIds($item, $table);
// actions to take if table is component_files_folders // actions to take if table is component_files_folders
if ('component_files_folders' === $table) if ('component_files_folders' === $table && 'clone' !== $this->activeType)
{ {
// build files // build files
$this->moveIt($this->getValues($item->addfiles, 'subform', 'file', null), 'file'); $this->moveIt($this->getValues($item->addfiles, 'subform', 'file', null), 'file');
@ -614,7 +708,10 @@ class ComponentbuilderModelJoomla_components extends JModelList
if ('admin_view' === $table) if ('admin_view' === $table)
{ {
// add fields & conditions // add fields & conditions
$this->setExportIDs($item->id, 'admin_view'); $this->setSmartIDs($item->id, 'admin_view');
// do not move anything if clone
if ('clone' !== $this->activeType)
{
// admin icon // admin icon
$this->moveIt(array($item->icon), 'image'); $this->moveIt(array($item->icon), 'image');
// admin icon_add // admin icon_add
@ -622,6 +719,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// admin icon_category // admin icon_category
$this->moveIt(array($item->icon_category), 'image'); $this->moveIt(array($item->icon_category), 'image');
} }
}
// actions to take if table is admin_fields // actions to take if table is admin_fields
if ('admin_fields' === $table) if ('admin_fields' === $table)
{ {
@ -639,7 +737,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
if ('field' === $table) if ('field' === $table)
{ {
// add field types // add field types
$this->setExportIDs($item->fieldtype, 'fieldtype'); $this->setSmartIDs($item->fieldtype, 'fieldtype');
// check if this field has multiple fields // check if this field has multiple fields
if ($this->checkMultiFields($item->fieldtype)) if ($this->checkMultiFields($item->fieldtype))
{ {
@ -674,7 +772,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
if (!in_array($validationRule, (array) $coreValidationRules)) if (!in_array($validationRule, (array) $coreValidationRules))
{ {
// okay load the rule // okay load the rule
$this->setExportIDs($validationRule, 'validation_rule', false); $this->setSmartIDs($validationRule, 'validation_rule', false);
} }
} }
} }
@ -693,11 +791,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
} }
} }
// add dynamic gets // add dynamic gets
$this->setExportIDs($item->main_get, 'dynamic_get'); $this->setSmartIDs($item->main_get, 'dynamic_get');
$this->setExportIDs($item->custom_get, 'dynamic_get'); $this->setSmartIDs($item->custom_get, 'dynamic_get');
$this->setExportIDs($item->dynamic_get, 'dynamic_get'); $this->setSmartIDs($item->dynamic_get, 'dynamic_get');
// move the icon // move the icon
if ('custom_admin_view' === $table && isset($item->icon)) if ('custom_admin_view' === $table && isset($item->icon) && 'clone' !== $this->activeType)
{ {
// view icon // view icon
$this->moveIt(array($item->icon), 'image'); $this->moveIt(array($item->icon), 'image');
@ -705,7 +803,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add snippets (was removed please use snippet importer) // add snippets (was removed please use snippet importer)
if (isset($item->snippet) && is_numeric($item->snippet)) if (isset($item->snippet) && is_numeric($item->snippet))
{ {
$this->setExportIDs((int) $item->snippet, 'snippet'); $this->setSmartIDs((int) $item->snippet, 'snippet');
} }
} }
// actions to take if table is template and layout // actions to take if table is template and layout
@ -714,7 +812,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add snippets (was removed please use snippet importer) // add snippets (was removed please use snippet importer)
if (isset($item->snippet) && is_numeric($item->snippet)) if (isset($item->snippet) && is_numeric($item->snippet))
{ {
$this->setExportIDs((int) $item->snippet, 'snippet'); $this->setSmartIDs((int) $item->snippet, 'snippet');
} }
// search for templates & layouts // search for templates & layouts
$this->getTemplateLayout(base64_decode($item->$table), $this->user); $this->getTemplateLayout(base64_decode($item->$table), $this->user);
@ -724,25 +822,80 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->getTemplateLayout($item->php_view, $this->user); $this->getTemplateLayout($item->php_view, $this->user);
} }
// add dynamic gets // add dynamic gets
$this->setExportIDs((int) $item->dynamic_get, 'dynamic_get'); $this->setSmartIDs((int) $item->dynamic_get, 'dynamic_get');
} }
} }
} }
} }
} }
/**
* Method to do the smart cloning
*
* @return bool
*/
protected function smartCloner()
{
// check if data is set
if (isset($this->smartBox) && ComponentbuilderHelper::checkArray($this->smartBox))
{
// get the import_joomla_components
$model = ComponentbuilderHelper::getModel('import_joomla_components');
// do not show more information
$model->moreInfo = 0;
// trigger the create new (clone) feature
$model->canmerge = 0;
// set some postfix
$model->postfix = ' ('.ComponentbuilderHelper::randomkey(2).')';
// get App
$model->app = JFactory::getApplication();
// set user
$model->user = $this->user;
// set today's date
$model->today = JFactory::getDate()->toSql();
// load the data
$model->data = $this->smartBox;
// remove smart box to safe on memory
unset($this->smartBox);
// the array of tables to store
$tables = array(
'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
'admin_fields', 'admin_fields_conditions', 'component_admin_views', 'component_site_views',
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
);
// smart table loop
foreach ($tables as $table)
{
// save the table to database
if (!$model->saveSmartItems($table))
{
return false;
}
}
// do an after all run on all items that need it
$model->updateAfter();
// finally move the old datasets
$model->moveDivergedData();
// we had success
return true;
}
return false;
}
/** /**
* Method to build the package to export * Method to build the package to export
* *
* @return void * @return bool
*/ */
protected function smartExportBuilder() protected function smartExportBuilder()
{ {
// check if data is set // check if data is set
if (isset($this->smartExport) && ComponentbuilderHelper::checkArray($this->smartExport)) if (isset($this->smartBox) && ComponentbuilderHelper::checkArray($this->smartBox))
{ {
// set db data // set db data
$data = serialize($this->smartExport); $data = serialize($this->smartBox);
// lock the data if set // lock the data if set
if (ComponentbuilderHelper::checkArray($this->key)) if (ComponentbuilderHelper::checkArray($this->key))
{ {
@ -1096,9 +1249,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
$data = $this->getDataWithAlias($template, 'template'); $data = $this->getDataWithAlias($template, 'template');
if (ComponentbuilderHelper::checkArray($data)) if (ComponentbuilderHelper::checkArray($data))
{ {
if (!isset($this->exportIDs['template']) || !isset($this->exportIDs['template'][$data['id']])) if (!isset($this->smartIDs['template']) || !isset($this->smartIDs['template'][$data['id']]))
{ {
$this->setExportIDs($data['id'], 'template'); $this->setSmartIDs($data['id'], 'template');
// call self to get child data // call self to get child data
$again[] = $data['html']; $again[] = $data['html'];
$again[] = $data['php_view']; $again[] = $data['php_view'];
@ -1131,9 +1284,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
$data = $this->getDataWithAlias($layout, 'layout'); $data = $this->getDataWithAlias($layout, 'layout');
if (ComponentbuilderHelper::checkArray($data)) if (ComponentbuilderHelper::checkArray($data))
{ {
if (!isset($this->exportIDs['layout']) || !isset($this->exportIDs['layout'][$data['id']])) if (!isset($this->smartIDs['layout']) || !isset($this->smartIDs['layout'][$data['id']]))
{ {
$this->setExportIDs($data['id'], 'layout'); $this->setSmartIDs($data['id'], 'layout');
// call self to get child data // call self to get child data
$again[] = $data['html']; $again[] = $data['html'];
$again[] = $data['php_view']; $again[] = $data['php_view'];
@ -1152,14 +1305,14 @@ class ComponentbuilderModelJoomla_components extends JModelList
if ($user) if ($user)
{ {
// add templates // add templates
if (isset($this->exportIDs['template']) && ComponentbuilderHelper::checkArray($this->exportIDs['template'])) if (isset($this->smartIDs['template']) && ComponentbuilderHelper::checkArray($this->smartIDs['template']))
{ {
$this->setData('template', array_values($this->exportIDs['template']), 'id'); $this->setData('template', array_values($this->smartIDs['template']), 'id');
} }
// add layouts // add layouts
if (isset($this->exportIDs['layout']) && ComponentbuilderHelper::checkArray($this->exportIDs['layout'])) if (isset($this->smartIDs['layout']) && ComponentbuilderHelper::checkArray($this->smartIDs['layout']))
{ {
$this->setData('layout', array_values($this->exportIDs['layout']), 'id'); $this->setData('layout', array_values($this->smartIDs['layout']), 'id');
} }
} }
} }
@ -1247,13 +1400,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
// if numeric add to ids // if numeric add to ids
if (is_numeric($func)) if (is_numeric($func))
{ {
$this->setExportIDs($func, 'custom_code'); $this->setSmartIDs($func, 'custom_code');
} }
elseif (ComponentbuilderHelper::checkString($func)) elseif (ComponentbuilderHelper::checkString($func))
{ {
if ($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id')) if ($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id'))
{ {
$this->setExportIDs($funcID, 'custom_code'); $this->setSmartIDs($funcID, 'custom_code');
} }
} }
} }
@ -1296,19 +1449,19 @@ class ComponentbuilderModelJoomla_components extends JModelList
// check if we have items // check if we have items
if (ComponentbuilderHelper::checkArray($items)) if (ComponentbuilderHelper::checkArray($items))
{ {
if (!isset($this->smartExport['language_translation'])) if (!isset($this->smartBox['language_translation']))
{ {
$this->smartExport['language_translation'] = array(); $this->smartBox['language_translation'] = array();
} }
foreach ($items as $item) foreach ($items as $item)
{ {
if (!isset($this->smartExport['language_translation'][$item->id]) && ComponentbuilderHelper::checkJson($item->components)) if (!isset($this->smartBox['language_translation'][$item->id]) && ComponentbuilderHelper::checkJson($item->components))
{ {
$components = json_decode($item->components, true); $components = json_decode($item->components, true);
if (in_array($id, $components)) if (in_array($id, $components))
{ {
// load to global object // load to global object
$this->smartExport['language_translation'][$item->id] = $item; $this->smartBox['language_translation'][$item->id] = $item;
// add languages // add languages
if (isset($item->translation)) if (isset($item->translation))
{ {

View File

@ -614,9 +614,9 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
} }
// Only for strings // Only for strings
if (ComponentbuilderHelper::checkString($this->table->entranslation) && !is_numeric($this->table->entranslation)) if (ComponentbuilderHelper::checkString($this->table->source) && !is_numeric($this->table->source))
{ {
$this->table->entranslation = $this->generateUniqe('entranslation',$this->table->entranslation); $this->table->source = $this->generateUniqe('source',$this->table->source);
} }
// insert all set values // insert all set values

View File

@ -44,7 +44,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
'a.ordering','ordering', 'a.ordering','ordering',
'a.created_by','created_by', 'a.created_by','created_by',
'a.modified_by','modified_by', 'a.modified_by','modified_by',
'a.entranslation','entranslation' 'a.source','source'
); );
} }
@ -65,8 +65,8 @@ class ComponentbuilderModelLanguage_translations extends JModelList
{ {
$this->context .= '.' . $layout; $this->context .= '.' . $layout;
} }
$entranslation = $this->getUserStateFromRequest($this->context . '.filter.entranslation', 'filter_entranslation'); $source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source');
$this->setState('filter.entranslation', $entranslation); $this->setState('filter.source', $source);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting); $this->setState('filter.sorting', $sorting);
@ -153,11 +153,11 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// load the languages to the string // load the languages to the string
if (ComponentbuilderHelper::checkArray($langBucket)) if (ComponentbuilderHelper::checkArray($langBucket))
{ {
$item->entranslation = '<small><em>(' . implode(', ', $langBucket) . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->entranslation, 'UTF-8', true, 150) . $componentCounter; $item->source = '<small><em>(' . implode(', ', $langBucket) . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150) . $componentCounter;
} }
else else
{ {
$item->entranslation = '<small><em>(' . JText::_('COM_COMPONENTBUILDER_NOTRANSLATION') . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->entranslation, 'UTF-8', true, 150) . $componentCounter; $item->source = '<small><em>(' . JText::_('COM_COMPONENTBUILDER_NOTRANSLATION') . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150) . $componentCounter;
} }
} }
} }
@ -187,7 +187,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
{ {
$item->{$lanTag} = ''; $item->{$lanTag} = '';
} }
// now adapt the entranslation // now adapt the source
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation)) if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
{ {
$translations = json_decode($item->translation, true); $translations = json_decode($item->translation, true);
@ -268,7 +268,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
else else
{ {
$search = $db->quote('%' . $db->escape($search) . '%'); $search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.entranslation LIKE '.$search.')'); $query->where('(a.source LIKE '.$search.')');
} }
} }
@ -386,11 +386,11 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// load the languages to the string // load the languages to the string
if (ComponentbuilderHelper::checkArray($langBucket)) if (ComponentbuilderHelper::checkArray($langBucket))
{ {
$item->entranslation = '<small><em>(' . implode(', ', $langBucket) . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->entranslation, 'UTF-8', true, 150) . $componentCounter; $item->source = '<small><em>(' . implode(', ', $langBucket) . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150) . $componentCounter;
} }
else else
{ {
$item->entranslation = '<small><em>(' . JText::_('COM_COMPONENTBUILDER_NOTRANSLATION') . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->entranslation, 'UTF-8', true, 150) . $componentCounter; $item->source = '<small><em>(' . JText::_('COM_COMPONENTBUILDER_NOTRANSLATION') . ')</em></small> ' . ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150) . $componentCounter;
} }
} }
} }
@ -420,7 +420,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
{ {
$item->{$lanTag} = ''; $item->{$lanTag} = '';
} }
// now adapt the entranslation // now adapt the source
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation)) if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
{ {
$translations = json_decode($item->translation, true); $translations = json_decode($item->translation, true);
@ -458,7 +458,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// start setup of headers // start setup of headers
$headers = new stdClass(); $headers = new stdClass();
$headers->id = 'id'; $headers->id = 'id';
$headers->English = 'English'; $headers->Source = 'Source';
// add the languages // add the languages
if (ComponentbuilderHelper::checkArray($languages)) if (ComponentbuilderHelper::checkArray($languages))
{ {
@ -485,7 +485,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
$id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.entranslation'); $id .= ':' . $this->getState('filter.source');
return parent::getStoreId($id); return parent::getStoreId($id);
} }

View File

@ -52,6 +52,129 @@ class ComponentbuilderModelLanguages extends JModelList
parent::__construct($config); parent::__construct($config);
} }
/**
* Load all the languages found in Joomla into JCB
*
* @since 2.7.5
*
* @return bool true on success
*/
public function buildLanguages()
{
if ($languages = $this->getLanguages())
{
// make sure we have an array
if (ComponentbuilderHelper::checkArray($languages))
{
// get the model
$model = ComponentbuilderHelper::getModel('language');
foreach ($languages as $language)
{
// only load it is a package
if ('package' === $language->type)
{
// build array to store/update
$tmp = array();
$tmp['id'] = 0;
$tmp['name'] = (string) $language->name;
$tmp['langtag'] = (string) str_replace('pkg_', '', $language->element);
// check if already set
if ($id = ComponentbuilderHelper::getVar('language', $tmp['langtag'], 'langtag', 'id'))
{
$tmp['id'] = (int) $id;
}
// save update the language in the database
$model->save($tmp);
}
}
return true;
}
}
return false;
}
/**
* Gets an array of objects from the updatesite.
*
* @return object[] An array of results.
*
* @since 2.7.5
* @throws RuntimeException
*/
protected function getLanguages()
{
$updateSite = $this->getUpdateSite();
$http = new JHttp;
try
{
$response = $http->get($updateSite);
}
catch (RuntimeException $e)
{
$response = null;
}
if ($response === null || $response->code !== 200)
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_NO_LANGUAGES_UPDATE_SERVER_FOUND'), 'warning');
return;
}
$updateSiteXML = simplexml_load_string($response->body);
$languages = array();
foreach ($updateSiteXML->extension as $extension)
{
$language = new stdClass;
foreach ($extension->attributes() as $key => $value)
{
$language->$key = (string) $value;
}
$languages[$language->name] = $language;
}
// we must add the British language en-GB (since Joomla Ships with it)
$language = new stdClass;
$language->name = 'English GB';
$language->element = 'pkg_en-GB';
$language->type = 'package';
$languages[$language->name] = $language;
usort($languages, function($a, $b)
{
return strcmp($a->name, $b->name);
});
return $languages;
}
/**
* Get the Update Site
*
* @since 2.7.5
*
* @return string The URL of the Accredited Languagepack Updatesite XML
*/
private function getUpdateSite()
{
$db = $this->getDbo();
$query = $db->getQuery(true)
->select($db->qn('us.location'))
->from($db->qn('#__extensions', 'e'))
->where($db->qn('e.type') . ' = ' . $db->q('package'))
->where($db->qn('e.element') . ' = ' . $db->q('pkg_en-GB'))
->where($db->qn('e.client_id') . ' = 0')
->join('LEFT', $db->qn('#__update_sites_extensions', 'use') . ' ON ' . $db->qn('use.extension_id') . ' = ' . $db->qn('e.extension_id'))
->join('LEFT', $db->qn('#__update_sites', 'us') . ' ON ' . $db->qn('us.update_site_id') . ' = ' . $db->qn('use.update_site_id'));
return $db->setQuery($query)->loadResult();
}
/** /**
* Method to auto-populate the model state. * Method to auto-populate the model state.
* *

View File

@ -66,6 +66,11 @@ class ComponentbuilderModelLayout extends JModelAdmin
return JTable::getInstance($type, $prefix, $config); return JTable::getInstance($type, $prefix, $config);
} }
public function getVDM()
{
return $this->vastDevMod;
}
/** /**
* Method to get a single record. * Method to get a single record.
* *
@ -95,14 +100,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->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->php_view)) if (!empty($item->php_view))
{ {
// base64 Decode php_view. // base64 Decode php_view.
@ -115,6 +112,35 @@ class ComponentbuilderModelLayout extends JModelAdmin
$item->layout = base64_decode($item->layout); $item->layout = base64_decode($item->layout);
} }
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->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
}
if (!empty($item->id)) if (!empty($item->id))
{ {
$item->tags = new JHelperTags; $item->tags = new JHelperTags;

View File

@ -100,6 +100,12 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->php_setdocument))
{
// base64 Decode php_setdocument.
$item->php_setdocument = base64_decode($item->php_setdocument);
}
if (!empty($item->libraries)) if (!empty($item->libraries))
{ {
// Convert the libraries field to an array. // Convert the libraries field to an array.
@ -116,12 +122,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$item->addconditions = $addconditions->toArray(); $item->addconditions = $addconditions->toArray();
} }
if (!empty($item->php_setdocument))
{
// base64 Decode php_setdocument.
$item->php_setdocument = base64_decode($item->php_setdocument);
}
if (empty($item->id)) if (empty($item->id))
{ {

View File

@ -100,38 +100,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->metadata = $registry->toArray(); $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_document)) if (!empty($item->php_document))
{ {
// base64 Decode php_document. // base64 Decode php_document.
@ -204,6 +172,38 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->php_model = base64_decode($item->php_model); $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)) if (empty($item->id))
{ {

View File

@ -66,6 +66,11 @@ class ComponentbuilderModelTemplate extends JModelAdmin
return JTable::getInstance($type, $prefix, $config); return JTable::getInstance($type, $prefix, $config);
} }
public function getVDM()
{
return $this->vastDevMod;
}
/** /**
* Method to get a single record. * Method to get a single record.
* *
@ -95,14 +100,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->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->php_view)) if (!empty($item->php_view))
{ {
// base64 Decode php_view. // base64 Decode php_view.
@ -115,6 +112,35 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$item->template = base64_decode($item->template); $item->template = base64_decode($item->template);
} }
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->id))
{
$id = 0;
}
else
{
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
{
$this->vastDevMod = $vdm;
}
else
{
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
}
if (!empty($item->id)) if (!empty($item->id))
{ {
$item->tags = new JHelperTags; $item->tags = new JHelperTags;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ALTER TABLE `#__componentbuilder_language_translation` CHANGE `entranslation` `source` TEXT NOT NULL;

View File

@ -236,4 +236,50 @@ function fanAsgfdSffsAbsent(arr){
} }
return absentArray; return absentArray;
} }
// little script to check that only one title is selected
function checkTitle(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
var subID = subID.replace(/\d+/g, '');
// set notice and do house cleaning
if (jQuery('#'+id).prop('checked')) {
// get number of items
var numItems = jQuery('.count-the-items1235').length + 10;
for (i = 0; i < numItems; i++) { // for now this is the number of field we should check
// build ID
var id_check = subID+i+'__title';
// first check if Id is on page
if (jQuery("#"+id_check).length && id_check !== id) {
// uncheck it
jQuery("#"+id_check).prop('checked', false).trigger('change');
}
}
}
}
// little script to check that only one title is selected
function checkAlias(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
var subID = subID.replace(/\d+/g, '');
// set notice and do house cleaning
if (jQuery('#'+id).prop('checked')) {
// get number of items
var numItems = jQuery('.count-the-items1235').length + 10;
for (i = 0; i < numItems; i++) { // for now this is the number of field we should check
// build ID
var id_check = subID+i+'__alias';
// first check if Id is on page
if (jQuery("#"+id_check).length && id_check !== id) {
// uncheck it
jQuery("#"+id_check).prop('checked', false).trigger('change');
}
}
}
}
</script> </script>

View File

@ -120,7 +120,7 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?> <?php $numberAddconditions = range(0, count( (array) $this->item->addconditions) + 3, 1);?>
// for the values already set // for the values already set
jQuery(document).ready(function(){ jQuery(document).ready(function(){

View File

@ -186,6 +186,32 @@ class ComponentbuilderViewCompiler extends JViewLegacy
// add to form // add to form
$form[] = $debuglinenr; $form[] = $debuglinenr;
// get the minify radio field
$minify = JFormHelper::loadFieldType('radio',true);
// start minify xml
$minifyXML = new SimpleXMLElement('<field/>');
// minify attributes
$minifyAttributes = array(
'type' => 'radio',
'name' => 'minify',
'label' => 'COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT',
'class' => 'btn-group btn-group-yesno',
'description' => 'COM_COMPONENTBUILDER_SHOULD_THE_JAVASCRIPT_BE_MINIFIED_IN_THE_COMPONENT',
'default' => '2');
// load the minify attributes
ComponentbuilderHelper::xmlAddAttributes($minifyXML, $minifyAttributes);
// start the minify options
$minifyOptions = array(
'2' => 'COM_COMPONENTBUILDER_GLOBAL',
'1' => 'COM_COMPONENTBUILDER_YES',
'0' => 'COM_COMPONENTBUILDER_NO');
// load the minify options
ComponentbuilderHelper::xmlAddOptions($minifyXML, $minifyOptions);
// setup the minify radio field
$minify->setup($minifyXML,2);
// add to form
$form[] = $minify;
// get the component list field // get the component list field
$component = JFormHelper::loadFieldType('list',true); $component = JFormHelper::loadFieldType('list',true);
// start component xml // start component xml

View File

@ -82,6 +82,11 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
<?php echo JLayoutHelper::render('field.data_base_right', $this); ?> <?php echo JLayoutHelper::render('field.data_base_right', $this); ?>
</div> </div>
</div> </div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('field.data_base_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'scripts', JText::_('COM_COMPONENTBUILDER_FIELD_SCRIPTS', true)); ?> <?php echo JHtml::_('bootstrap.addTab', 'fieldTab', 'scripts', JText::_('COM_COMPONENTBUILDER_FIELD_SCRIPTS', true)); ?>
@ -343,6 +348,10 @@ jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) {
// get type value // get type value
var fieldId = jQuery("#jform_fieldtype option:selected").val(); var fieldId = jQuery("#jform_fieldtype option:selected").val();
getFieldOptions(fieldId); getFieldOptions(fieldId);
// get the field type text
var fieldText = jQuery("#jform_fieldtype option:selected").text().toLowerCase();
// now check if database input is needed
dbChecker(fieldText);
}); });

View File

@ -154,6 +154,31 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
// add to form // add to form
$form[] = $more_info; $form[] = $more_info;
// get the merge radio field
$merge = JFormHelper::loadFieldType('radio',true);
// start merge xml
$mergeXML = new SimpleXMLElement('<field/>');
// merge attributes
$mergeAttributes = array(
'type' => 'radio',
'name' => 'canmerge',
'label' => 'COM_COMPONENTBUILDER_MERGE',
'class' => 'btn-group btn-group-yesno',
'description' => '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',
'default' => '1');
// load the merge attributes
ComponentbuilderHelper::xmlAddAttributes($mergeXML, $mergeAttributes);
// set the merge options
$mergeOptions = array(
'1' => 'COM_COMPONENTBUILDER_YES',
'0' => 'COM_COMPONENTBUILDER_NO');
// load the merge options
ComponentbuilderHelper::xmlAddOptions($mergeXML, $mergeOptions);
// setup the merge radio field
$merge->setup($mergeXML,1);
// add to form
$form[] = $merge;
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom']))) if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
{ {
// set required field // set required field

View File

@ -97,3 +97,35 @@ if ($this->saveOrder)
<input type="hidden" name="task" value="" /> <input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?> <?php echo JHtml::_('form.token'); ?>
</form> </form>
<script type="text/javascript">
// joomla_components footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the clone button is clicked
jQuery('#toolbar').on('click',"button.button-save-copy", function(e){
jQuery('#loading').show();
});
// when the backup button is clicked
jQuery('#toolbar').on('click',"button.button-archive", function(e){
jQuery('#loading').show();
});
// when the export button is clicked
jQuery('#toolbar').on('click',"button.button-download", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -134,16 +134,21 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
$dhtml = $layout->render(array('title' => $title)); $dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch'); $bar->appendButton('Custom', $dhtml, 'batch');
} }
if ($this->user->authorise('joomla_component.export_components', 'com_componentbuilder')) if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
{ {
// add Export Components button. // add Export JCB Packages button.
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENTS', false); JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', false);
} }
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder')) if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
{ {
// add Backup button. // add Backup button.
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false); JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
} }
if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder'))
{
// add Clone button.
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', false);
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{ {
@ -159,10 +164,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
JToolBarHelper::custom('joomla_components.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); JToolBarHelper::custom('joomla_components.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
} }
} }
if ($this->user->authorise('joomla_component.import_components', 'com_componentbuilder')) if ($this->user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder'))
{ {
// add Import Components button. // add Import JCB Packages button.
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_COMPONENTS', false); JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
} }
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import')) if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))

View File

@ -97,3 +97,26 @@ if ($this->saveOrder)
<input type="hidden" name="task" value="" /> <input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?> <?php echo JHtml::_('form.token'); ?>
</form> </form>
<script type="text/javascript">
// language_translations footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the export button is clicked
jQuery('#toolbar').on('click',"button.button-download", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -77,13 +77,13 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l
<td class="nowrap"> <td class="nowrap">
<?php if ($canDo->get('language_translation.edit')): ?> <?php if ($canDo->get('language_translation.edit')): ?>
<div class="name"> <div class="name">
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $item->entranslation; ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $item->source; ?></a>
<?php if ($item->checked_out): ?> <?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_translations.', $canCheckin); ?> <?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_translations.', $canCheckin); ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="name"><?php echo $item->entranslation; ?></div> <div class="name"><?php echo $item->source; ?></div>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td class="center"> <td class="center">

View File

@ -44,7 +44,7 @@ defined('_JEXEC') or die('Restricted access');
</th> </th>
<?php endif; ?> <?php endif; ?>
<th class="nowrap" > <th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL', 'entranslation', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL', 'source', $this->listDirn, $this->listOrder); ?>
</th> </th>
<?php if ($this->canState): ?> <?php if ($this->canState): ?>
<th width="10" class="nowrap center" > <th width="10" class="nowrap center" >

View File

@ -245,7 +245,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
return array( return array(
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'), 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'), 'a.published' => JText::_('JSTATUS'),
'a.entranslation' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL'), 'a.source' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL'),
'a.id' => JText::_('JGRID_HEADING_ID') 'a.id' => JText::_('JGRID_HEADING_ID')
); );
} }

View File

@ -97,3 +97,26 @@ if ($this->saveOrder)
<input type="hidden" name="task" value="" /> <input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?> <?php echo JHtml::_('form.token'); ?>
</form> </form>
<script type="text/javascript">
// languages footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the build button is clicked
jQuery('#toolbar').on('click',"button.button-joomla", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -149,6 +149,11 @@ class ComponentbuilderViewLanguages extends JViewLegacy
JToolBarHelper::custom('languages.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true); JToolBarHelper::custom('languages.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
} }
} }
if ($this->user->authorise('language.build', 'com_componentbuilder'))
{
// add Build button.
JToolBarHelper::custom('languages.buildLanguages', 'joomla', '', 'COM_COMPONENTBUILDER_BUILD', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('language.import')) if ($this->canDo->get('core.import') && $this->canDo->get('language.import'))
{ {

View File

@ -208,6 +208,8 @@ class ComponentbuilderViewLayout extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -208,6 +208,8 @@ class ComponentbuilderViewTemplate extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error'); JText::script('view not acceptable. Error');
} }
} }

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>14th April, 2018</creationDate> <creationDate>30th April, 2018</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://joomlacomponentbuilder.com</authorUrl> <authorUrl>http://joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright> <copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.7.5</version> <version>2.7.6</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.2.7.5)</h1> <h1>Component Builder (v.2.7.6)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>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. <p>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.

View File

@ -339,4 +339,21 @@
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.7.6</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.6/JCB_v2.7.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates> </updates>

View File

@ -3428,9 +3428,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field'; $field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","javascript_view_footer":"javascript_view_footer","add_javascript_view_footer":"add_javascript_view_footer","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_javascript_view_footer","add_css_views","add_css_view","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_css_views","add_css_view","add_javascript_views_footer","add_javascript_view_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table. // Set the object into the content types table.
$field_Inserted = $db->insertObject('#__content_types', $field); $field_Inserted = $db->insertObject('#__content_types', $field);
@ -3476,7 +3476,7 @@ class com_componentbuilderInstallerScript
$language_translation->type_title = 'Componentbuilder Language_translation'; $language_translation->type_title = 'Componentbuilder Language_translation';
$language_translation->type_alias = 'com_componentbuilder.language_translation'; $language_translation->type_alias = 'com_componentbuilder.language_translation';
$language_translation->table = '{"special": {"dbtable": "#__componentbuilder_language_translation","key": "id","type": "Language_translation","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $language_translation->table = '{"special": {"dbtable": "#__componentbuilder_language_translation","key": "id","type": "Language_translation","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$language_translation->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "entranslation","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"entranslation":"entranslation","components":"components"}}'; $language_translation->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "source","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"source":"source","components":"components"}}';
$language_translation->router = 'ComponentbuilderHelperRoute::getLanguage_translationRoute'; $language_translation->router = 'ComponentbuilderHelperRoute::getLanguage_translationRoute';
$language_translation->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/language_translation.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "components","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; $language_translation->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/language_translation.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "components","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}';
@ -3692,7 +3692,7 @@ class com_componentbuilderInstallerScript
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Field to update. // Field to update.
$fields = array( $fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","minify":"0","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","minify":"0","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
); );
// Condition. // Condition.
$conditions = array( $conditions = array(
@ -4037,9 +4037,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field'; $field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","javascript_view_footer":"javascript_view_footer","add_javascript_view_footer":"add_javascript_view_footer","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}'; $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","css_views":"css_views","add_css_views":"add_css_views","css_view":"css_view","add_css_view":"add_css_view","datalenght":"datalenght","add_javascript_views_footer":"add_javascript_views_footer","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer","not_required":"not_required","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_javascript_view_footer","add_css_views","add_css_view","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","store","catid","add_css_views","add_css_view","add_javascript_views_footer","add_javascript_view_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Check if field type is already in content_type DB. // Check if field type is already in content_type DB.
$field_id = null; $field_id = null;
@ -4153,7 +4153,7 @@ class com_componentbuilderInstallerScript
$language_translation->type_title = 'Componentbuilder Language_translation'; $language_translation->type_title = 'Componentbuilder Language_translation';
$language_translation->type_alias = 'com_componentbuilder.language_translation'; $language_translation->type_alias = 'com_componentbuilder.language_translation';
$language_translation->table = '{"special": {"dbtable": "#__componentbuilder_language_translation","key": "id","type": "Language_translation","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $language_translation->table = '{"special": {"dbtable": "#__componentbuilder_language_translation","key": "id","type": "Language_translation","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$language_translation->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "entranslation","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"entranslation":"entranslation","components":"components"}}'; $language_translation->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "source","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"source":"source","components":"components"}}';
$language_translation->router = 'ComponentbuilderHelperRoute::getLanguage_translationRoute'; $language_translation->router = 'ComponentbuilderHelperRoute::getLanguage_translationRoute';
$language_translation->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/language_translation.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "components","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; $language_translation->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/language_translation.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "components","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}';
@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder"> echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.7.5 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.7.6 Was Successful! Let us know if anything is not working as expected.</h3>';
} }
} }

View File

@ -36,6 +36,9 @@ JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/compon
JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php');
JLoader::register('ComponentbuilderHelperRoute', dirname(__FILE__) . '/helpers/route.php'); JLoader::register('ComponentbuilderHelperRoute', dirname(__FILE__) . '/helpers/route.php');
// Triger the Global Site Event
ComponentbuilderHelper::globalEvent($document);
// import joomla controller library // import joomla controller library
jimport('joomla.application.component.controller'); jimport('joomla.application.component.controller');

View File

@ -210,12 +210,170 @@ class ComponentbuilderControllerApi extends JControllerForm
return; return;
} }
public function expand()
{
// get params first
if (!isset($this->params) || !ComponentbuilderHelper::checkObject($this->params))
{
$this->params = JComponentHelper::getParams('com_componentbuilder');
}
// check if expansion is enabled
$method = $this->params->get('development_method', 1);
// check what kind of return values show we give
$returnOptionsBuild = $this->params->get('return_options_build', 2);
if (2 == $method)
{
// get expansion components
$expansion = $this->params->get('expansion', null);
// check if they are set
if (ComponentbuilderHelper::checkObject($expansion))
{
// check if user has the right
$user = $this->getApiUser();
// the message package
$message = array();
if ($user->authorise('core.admin', 'com_componentbuilder'))
{
// make sure to not unlock
$unlock = false;
// get messages
$callback = function($messages) use (&$message, &$unlock) {
// unlock messages if needed
if ($unlock) {
$messages = ComponentbuilderHelper::unlock($messages);
}
// check if we have any messages
if (ComponentbuilderHelper::checkArray($messages)) {
$message[] = implode("<br />\n", $messages);
} else {
// var_dump($messages); // error debug message
}
};
// we have two options, doing them one at a time, use using curl to do tome somewhat asynchronously
if (count ( (array) $expansion) > 1 && function_exists('curl_version'))
{
// set workers
foreach ($expansion as $component)
{
ComponentbuilderHelper::setWorker($component, 'compileInstall');
}
// make sure to unlock
$unlock = true;
// run workers
ComponentbuilderHelper::runWorker('compileInstall', 1, $callback);
}
else
{
// get model
$model = $this->getModel('api');
// load the compiler
$this->_autoloader();
// set workers
foreach ($expansion as $component)
{
// compile and install
$model->compileInstall($component);
}
// check if we have any messages
$callback($model->messages);
}
// return messages if found
if (1== $returnOptionsBuild && ComponentbuilderHelper::checkArray($message))
{
echo implode("<br />\n", $message);
}
else
{
echo 1;
}
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit();
}
// check if message is to be returned
if (1== $returnOptionsBuild)
{
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit('Access Denied!');
}
}
}
// clear session
JFactory::getApplication()->getSession()->destroy();
// check if message is to be returned
if (1== $returnOptionsBuild)
{
jexit('Expansion Disabled!');
}
// return bool
echo 0;
jexit();
}
protected function getApiUser() protected function getApiUser()
{ {
// return user object // return user object
return JFactory::getUser($this->params->get('api', 0, 'INT')); return JFactory::getUser($this->params->get('api', 0, 'INT'));
} }
public function worker()
{
// get input values
$input = JFactory::getApplication()->input;
// get DATA
$DATA = $input->post->get('VDM_DATA', null, 'STRING');
// get TASK
$TASK = $input->server->get('HTTP_VDM_TASK', null, 'STRING');
// get TYPE
$TYPE = $input->server->get('HTTP_VDM_VALUE_TYPE', null, 'STRING');
// check if correct value is given
if (ComponentbuilderHelper::checkString($DATA) && ComponentbuilderHelper::checkString($TASK) && ComponentbuilderHelper::checkString($TYPE))
{
// get the type of values we are working with ( 2 = array; 1 = string)
$type = ComponentbuilderHelper::unlock($TYPE);
// get data value
$dataValues = ComponentbuilderHelper::unlock($DATA);
// get the task
$task = ComponentbuilderHelper::unlock($TASK);
// check the for a string
if (1 == $type && ComponentbuilderHelper::checkObject($dataValues) && ComponentbuilderHelper::checkString($task))
{
// get params first
if (!isset($this->params) || !ComponentbuilderHelper::checkObject($this->params))
{
$this->params = JComponentHelper::getParams('com_componentbuilder');
}
// get model
$model = $this->getModel('api');
// open the compile Install function
if ('compileInstall' === $task)
{
// load the compiler
$this->_autoloader();
// compile and install
$model->compileInstall($dataValues);
// return locked values
echo ComponentbuilderHelper::lock($model->messages);
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit();
}
}
}
// not success
echo 0;
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit();
}
protected function _autoloader()
{
// include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
}
/** /**
* Method to check if you can edit an existing record. * Method to check if you can edit an existing record.
* *

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,9 @@ COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
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_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_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
COM_COMPONENTBUILDER_COMPONENT_DID_NOT_COMPILE="Component did not compile!"
COM_COMPONENTBUILDER_COMPONENT_IS_NOT_PUBLISHED_OR_IS_CHECKED_OUT="Component is not published, or is checked out!"
COM_COMPONENTBUILDER_COMPONENT_WAS_NOT_FOUND="Component was not found!"
COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DESCRIPTION="Description"
@ -54,6 +57,9 @@ COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s"
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!" COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!" COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> could not be retrieved!" COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> could not be retrieved!"
COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_AND_IS_STILL_IN_THE_TEMP_FOLDER="The %s was not Installed and is still in the temp folder."
COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_COMPILED="The %s was successfully compiled."
COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_INSTALLED_AND_REMOVED_FROM_TEMP_FOLDER="The %s was successfully Installed and removed from temp folder."
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_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
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_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."

View File

@ -176,4 +176,72 @@ class ComponentbuilderModelApi extends JModelItem
} }
return false; return false;
} }
public $messages = array();
public $model;
protected $compiler;
public function compileInstall($component)
{
$values = array(
'version' => 3,
'component' => 0,
'backup' => 0,
'repository' => 0,
'placeholders' => 2,
'debuglinenr' => 2,
'minify' => 2
);
// set the values
foreach ($values as $key => $val)
{
if (isset($component->{$key}))
{
$values[$key] = $component->{$key};
}
}
// make sure we have a component
if (isset($values['component']) && $values['component'] > 1)
{
// make sure the component is published
$published = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component'], 'id', 'published');
// make sure the component is checked in
$checked_out = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component'], 'id', 'checked_out');
if (1 == $published && $checked_out == 0)
{
// start up Compiler
$this->compiler = new Compiler($values);
if($this->compiler)
{
// component was compiled
$this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_COMPILED', $this->compiler->componentFolderName);
// get compiler model to run the installer
$model = ComponentbuilderHelper::getModel('compiler', JPATH_COMPONENT_ADMINISTRATOR);
// now install components
if ($model->install($this->compiler->componentFolderName.'.zip'))
{
// component was installed
$this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_INSTALLED_AND_REMOVED_FROM_TEMP_FOLDER', $this->compiler->componentFolderName);
}
else
{
// component was not installed
$this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_NOT_INSTALLED_AND_IS_STILL_IN_THE_TEMP_FOLDER', $this->compiler->componentFolderName);
}
// get all the messages from application (TODO)
return true;
}
// set that the component was not found
$this->messages[] = JText::_('COM_COMPONENTBUILDER_COMPONENT_DID_NOT_COMPILE');
return false;
}
// set that the component was not found
$this->messages[] = JText::_('COM_COMPONENTBUILDER_COMPONENT_IS_NOT_PUBLISHED_OR_IS_CHECKED_OUT');
return false;
}
// set that the component was not found
$this->messages[] = JText::_('COM_COMPONENTBUILDER_COMPONENT_WAS_NOT_FOUND');
return false;
}
} }