Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
cc35295cf6 | |||
3329aad3c7 | |||
47f90de990 | |||
8b8b42ae8f | |||
f200e635b8 | |||
e905aa895f | |||
2f4f9ff0a3 | |||
d961652f56 | |||
dfef0774f3 | |||
88dbcee380 | |||
8b4efd640f | |||
cec566176d | |||
74f2d8df56 | |||
47d1a6c155 | |||
909a91844f | |||
0857101371 | |||
a110ff0e35 | |||
4b57e69edb | |||
d1813147d3 | |||
48a3a49d6f | |||
98448b24b7 | |||
0dc22b100b | |||
dfff74989e | |||
4e7d4af1d3 |
12
README.md
12
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.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.7) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -126,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)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 14th April, 2018
|
||||
+ *Version*: 2.7.5
|
||||
+ *Last Build*: 4th May, 2018
|
||||
+ *Version*: 2.7.7
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **182312**
|
||||
+ *Field count*: **1012**
|
||||
+ *File count*: **1199**
|
||||
+ *Line count*: **193747**
|
||||
+ *Field count*: **1034**
|
||||
+ *File count*: **1201**
|
||||
+ *Folder count*: **193**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.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.7) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -126,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)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 14th April, 2018
|
||||
+ *Version*: 2.7.5
|
||||
+ *Last Build*: 4th May, 2018
|
||||
+ *Version*: 2.7.7
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **182312**
|
||||
+ *Field count*: **1012**
|
||||
+ *File count*: **1199**
|
||||
+ *Line count*: **193747**
|
||||
+ *Field count*: **1034**
|
||||
+ *File count*: **1201**
|
||||
+ *Folder count*: **193**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
|
@ -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.submenu" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC" />
|
||||
<action name="joomla_component.backup" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.export_components" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.import_components" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.export_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.import_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
|
||||
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
|
||||
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
|
||||
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
|
||||
@ -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.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
|
||||
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
|
||||
<action name="language.build" title="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC" />
|
||||
<action name="language_translation.access" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC" />
|
||||
<action name="language_translation.batch" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE_DESC" />
|
||||
<action name="language_translation.create" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_CREATE_DESC" />
|
||||
|
@ -225,8 +225,15 @@ abstract class ###Component###Helper
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
|
||||
{
|
||||
// do some table foot work
|
||||
$external = false;
|
||||
if (strpos($table, '#__') !== false)
|
||||
{
|
||||
$external = true;
|
||||
$table = str_replace('#__', '', $table);
|
||||
}
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
@ -239,9 +246,19 @@ abstract class ###Component###Helper
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
if ($external)
|
||||
{
|
||||
$names[] = $name;
|
||||
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($name = self::getVar($table, $val, $id, $name))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (self::checkArray($names))
|
||||
|
@ -35,8 +35,15 @@ defined('_JEXEC') or die('Restricted access');
|
||||
abstract class ###Component###Helper
|
||||
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
|
||||
{
|
||||
// do some table foot work
|
||||
$external = false;
|
||||
if (strpos($table, '#__') !== false)
|
||||
{
|
||||
$external = true;
|
||||
$table = str_replace('#__', '', $table);
|
||||
}
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
@ -49,9 +56,19 @@ abstract class ###Component###Helper
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
if ($external)
|
||||
{
|
||||
$names[] = $name;
|
||||
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($name = self::getVar($table, $val, $id, $name))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (self::checkArray($names))
|
||||
|
@ -323,29 +323,6 @@ class ###Component###Table###View### extends JTable
|
||||
$asset->loadByName('com_###component###');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
}###GENERATENEWALIAS###
|
||||
|
||||
}
|
||||
|
@ -99,4 +99,4 @@ if ($this->saveOrder)
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</form>###VIEWS_FOOTER_SCRIPT###
|
268
admin/config.xml
268
admin/config.xml
@ -47,6 +47,72 @@
|
||||
/>
|
||||
<field type="spacer" name="spacerHistory" hr="true" />
|
||||
|
||||
<!-- Manage_jcb_package_directories Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="manage_jcb_package_directories"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="2"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NONE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL</option>
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION</option>
|
||||
</field>
|
||||
<!-- Jcb_package_directories Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="jcb_package_directories"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
showon="manage_jcb_package_directories:1">
|
||||
<!-- Option Set. -->
|
||||
<option value="vdm">
|
||||
COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES</option>
|
||||
<option value="jcb">
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
|
||||
<!-- Add_menu_prefix Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Menu_prefix Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL"
|
||||
size="30"
|
||||
maxlength="30"
|
||||
default="»"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="SAFEHTML"
|
||||
message="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT"
|
||||
autocomplete="on"
|
||||
showon="add_menu_prefix:1"
|
||||
/>
|
||||
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
|
||||
<!-- Minify Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -61,46 +127,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
|
||||
<field
|
||||
type="number"
|
||||
name="percentagelanguageadd"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
|
||||
default="50"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
min="10"
|
||||
max="100"
|
||||
step="10"
|
||||
/>
|
||||
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
|
||||
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="compiler_field_builder_type"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
|
||||
class="list_class"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
|
||||
<!-- Api Field. Type: User. (joomla) -->
|
||||
<field
|
||||
type="user"
|
||||
name="api"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_API_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION"
|
||||
/>
|
||||
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
|
||||
<!-- Set_browser_storage Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -152,8 +180,63 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
|
||||
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
|
||||
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
|
||||
<!-- Language Field. Type: Lang. (custom) -->
|
||||
<field
|
||||
type="lang"
|
||||
name="language"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
|
||||
<field
|
||||
type="number"
|
||||
name="percentagelanguageadd"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
|
||||
default="50"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
min="10"
|
||||
max="100"
|
||||
step="10"
|
||||
/>
|
||||
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
|
||||
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="compiler_field_builder_type"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
|
||||
class="list_class"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
|
||||
<!-- Api Field. Type: User. (joomla) -->
|
||||
<field
|
||||
type="user"
|
||||
name="api"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_API_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION"
|
||||
/>
|
||||
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
|
||||
<field name="autorTitle"
|
||||
type="spacer"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
|
||||
@ -572,8 +655,105 @@
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="cronjob_custom_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CRONJOB">
|
||||
name="development_method_custom_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD">
|
||||
|
||||
<!-- Development_method Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="development_method"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSION</option>
|
||||
</field>
|
||||
<!-- Note_development_method_default Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_development_method_default" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_default" showon="development_method:1" />
|
||||
<!-- Note_development_method_expansion Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_development_method_expansion" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_expansion" showon="development_method:2" />
|
||||
<!-- Expansion Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="expansion"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_EXPANSION_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_EXPANSION_DESCRIPTION"
|
||||
icon="list"
|
||||
max="50"
|
||||
min="1"
|
||||
showon="development_method:2">
|
||||
<form hidden="true" name="list_expansion_modal" repeat="true">
|
||||
<!-- Component Field. Type: Component. (custom) -->
|
||||
<field
|
||||
type="component"
|
||||
name="component"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Backup Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="backup"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
<!-- Repository Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="repository"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
<!-- Placeholders Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="placeholders"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Return_options_build Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="return_options_build"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="2"
|
||||
showon="development_method:2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DISPLAY_MESSAGE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN</option>
|
||||
</field>
|
||||
<!-- Expansioncronjob_note Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="expansioncronjob_note" label="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_DESCRIPTION" heading="h4" class="expansioncronjob_note" showon="development_method:2" />
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="auto_backup_custom_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP">
|
||||
|
||||
<!-- Backupcronjob_note Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="backupcronjob_note" label="COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_DESCRIPTION" heading="h4" class="backupcronjob_note" />
|
||||
|
@ -46,6 +46,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
$this->registerTask('isRead', 'ajax');
|
||||
$this->registerTask('getComponentDetails', 'ajax');
|
||||
$this->registerTask('getCronPath', 'ajax');
|
||||
$this->registerTask('getJCBpackageInfo', 'ajax');
|
||||
$this->registerTask('tableColumns', 'ajax');
|
||||
$this->registerTask('fieldSelectOptions', 'ajax');
|
||||
$this->registerTask('getDynamicScripts', 'ajax');
|
||||
@ -235,6 +236,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getJCBpackageInfo':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$urlValue = $jinput->get('url', NULL, 'STRING');
|
||||
if($urlValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getJCBpackageInfo($urlValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'tableColumns':
|
||||
try
|
||||
{
|
||||
|
@ -66,17 +66,18 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
if($user->authorise('core.admin', 'com_componentbuilder'))
|
||||
{
|
||||
// get the post values
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$componentId = $jinput->post->get('component', 0, 'INT');
|
||||
$version = $jinput->post->get('version', 0, 'INT');
|
||||
$addBackup = $jinput->post->get('backup', 0, 'INT');
|
||||
$addRepo = $jinput->post->get('repository', 0, 'INT');
|
||||
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
|
||||
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$componentId = $jinput->post->get('component', 0, 'INT');
|
||||
$version = $jinput->post->get('version', 0, 'INT');
|
||||
$addBackup = $jinput->post->get('backup', 0, 'INT');
|
||||
$addRepo = $jinput->post->get('repository', 0, 'INT');
|
||||
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
|
||||
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
|
||||
$minify = $jinput->post->get('minify', 2, 'INT');
|
||||
// include component compiler
|
||||
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
|
||||
$model = $this->getModel('compiler');
|
||||
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr))
|
||||
$model = $this->getModel('compiler');
|
||||
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr, $minify))
|
||||
{
|
||||
$cache = JFactory::getCache('mod_menu');
|
||||
$cache->clean();
|
||||
@ -88,8 +89,8 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
}
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$redirect_url = $app->getUserState('com_componentbuilder.redirect_url');
|
||||
$message = $app->getUserState('com_componentbuilder.message');
|
||||
$redirect_url = $app->getUserState('com_componentbuilder.redirect_url');
|
||||
$message = $app->getUserState('com_componentbuilder.message');
|
||||
if (empty($redirect_url) && $componentId > 0)
|
||||
{
|
||||
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||
@ -193,7 +194,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
$lang->load($extension, $base_dir, $language_tag, $reload);
|
||||
$message = '('.$fileName.'.zip) file was also removed from tmp!';
|
||||
$this->setRedirect($redirect_url,$message,'message');
|
||||
return $model->install($fileName.'.zip');;
|
||||
return $model->install($fileName.'.zip');
|
||||
}
|
||||
}
|
||||
$this->setRedirect($redirect_url,$message,'error');
|
||||
|
@ -163,40 +163,9 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
|
||||
$keyNotice = '<h1>' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '</h1>';
|
||||
$keyNotice .= '<p>' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY') . '</h1>';
|
||||
// set the package owner info
|
||||
if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner'])))
|
||||
if (componentbuilderHelper::getPackageOwnerValue('owner', $model->info) || componentbuilderHelper::getPackageOwnerValue('company', $model->info))
|
||||
{
|
||||
$ownerDetails = '<h2>' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
|
||||
$ownerDetails .= '<ul>';
|
||||
if (isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $model->info['getKeyFrom']['company']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $model->info['getKeyFrom']['owner']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($model->info['getKeyFrom']['website']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['website']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $model->info['getKeyFrom']['website']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($model->info['getKeyFrom']['email']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['email']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $model->info['getKeyFrom']['email']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($model->info['getKeyFrom']['license']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['license']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $model->info['getKeyFrom']['license']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($model->info['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['copyright']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $model->info['getKeyFrom']['copyright']) . '</li>';
|
||||
}
|
||||
$ownerDetails .= '</ul>';
|
||||
$ownerDetails = componentbuilderHelper::getPackageOwnerDetailsDisplay($model->info, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -398,6 +367,56 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
|
||||
return;
|
||||
}
|
||||
|
||||
public function cloner()
|
||||
{
|
||||
// Get the model
|
||||
$model = $this->getModel('Joomla_components');
|
||||
// check if export is allowed for this user.
|
||||
$model->user = JFactory::getUser();
|
||||
if ($model->user->authorise('joomla_component.cloner', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// check if there is any selections
|
||||
if (!ComponentbuilderHelper::checkArray($pks))
|
||||
{
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
// only one component allowed at this time
|
||||
elseif (count( (array) $pks) !== 1)
|
||||
{
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
// set the active type
|
||||
$model->activeType = 'clone';
|
||||
// clone the component and the views and the fields... everything linked to the component.
|
||||
if ($model->cloner($pks))
|
||||
{
|
||||
// clone was successful
|
||||
$message = JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message);
|
||||
return;
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COMPONENTBUILDER_CLONE_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
protected function getApiUser()
|
||||
{
|
||||
// admin area does not have API user, only front-end (so we fallback on login user)
|
||||
|
@ -107,5 +107,31 @@ class ComponentbuilderControllerLanguages extends JControllerAdmin
|
||||
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=languages', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public function buildLanguages()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if user has the right
|
||||
$user = JFactory::getUser();
|
||||
if($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// get the model
|
||||
$model = $this->getModel('languages');
|
||||
if ($model->buildLanguages())
|
||||
{
|
||||
// set success message
|
||||
$message = '<h1>'.JText::_('COM_COMPONENTBUILDER_IMPORT_SUCCESS').'</h1>';
|
||||
$message .= '<p>'.JText::_('COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED').'</p>';
|
||||
// set redirect
|
||||
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=languages', false);
|
||||
$this->setRedirect($redirect_url, $message);
|
||||
}
|
||||
}
|
||||
// set redirect
|
||||
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=languages', false);
|
||||
$this->setRedirect($redirect_url);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -72,12 +72,12 @@ class Compiler extends Infusion
|
||||
$comConfig = JFactory::getConfig();
|
||||
$this->tempPath = $comConfig->get('tmp_path');
|
||||
// set some folder paths in relation to distribution
|
||||
if ($config['addBackup'])
|
||||
if ($config['backup'])
|
||||
{
|
||||
$this->backupPath = $this->params->get('backup_folder_path', $this->tempPath) . '/' . $this->componentBackupName . '.zip';
|
||||
$this->dynamicIntegration = true;
|
||||
}
|
||||
if ($config['addRepo'])
|
||||
if ($config['repository'])
|
||||
{
|
||||
$this->repoPath = $this->params->get('git_folder_path', null);
|
||||
}
|
||||
|
@ -204,7 +204,14 @@ class Get
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $languages = array('en-GB' => array());
|
||||
public $languages = array();
|
||||
|
||||
/**
|
||||
* The Main Languages
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $langTag = 'en-GB';
|
||||
|
||||
/**
|
||||
* The Multi Languages bucket
|
||||
@ -607,6 +614,13 @@ class Get
|
||||
*/
|
||||
public $libraries = array();
|
||||
|
||||
/**
|
||||
* Is minify Enabled
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $minify = 0;
|
||||
|
||||
/**
|
||||
* Is Tidy Enabled
|
||||
*
|
||||
@ -631,10 +645,16 @@ class Get
|
||||
{
|
||||
// load application
|
||||
$this->app = JFactory::getApplication();
|
||||
// check if we have Tidy enabled
|
||||
$this->tidy = extension_loaded('Tidy');
|
||||
// Set the params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// set the minfy switch of the JavaScript
|
||||
$this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0);
|
||||
// set the global language
|
||||
$this->langTag = $this->params->get('language', $this->langTag);
|
||||
// setup the main language array
|
||||
$this->languages[$this->langTag] = array();
|
||||
// check if we have Tidy enabled
|
||||
$this->tidy = extension_loaded('Tidy');
|
||||
// set the field type builder
|
||||
$this->fieldBuilderType = $this->params->get('compiler_field_builder_type', 2);
|
||||
// check the field builder type logic
|
||||
@ -648,7 +668,7 @@ class Get
|
||||
// load the compiler path
|
||||
$this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
|
||||
// set the component ID
|
||||
$this->componentID = (int) $config['componentId'];
|
||||
$this->componentID = (int) $config['component'];
|
||||
// set this components code name
|
||||
if ($name_code = ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'name_code'))
|
||||
{
|
||||
@ -658,10 +678,10 @@ class Get
|
||||
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
|
||||
// set if placeholders should be added to customcode
|
||||
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false;
|
||||
$this->addPlaceholders = ((int) $config['addPlaceholders'] == 0) ? false : (((int) $config['addPlaceholders'] == 1) ? true : $global);
|
||||
$this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
|
||||
// set if line numbers should be added to comments
|
||||
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'debug_linenr') == 1) ? true : false;
|
||||
$this->debugLinenr = ((int) $config['debugLinenr'] == 0) ? false : (((int) $config['debugLinenr'] == 1) ? true : $global);
|
||||
$this->debugLinenr = ((int) $config['debuglinenr'] == 0) ? false : (((int) $config['debuglinenr'] == 1) ? true : $global);
|
||||
// set the current user
|
||||
$this->user = JFactory::getUser();
|
||||
// Get a db connection.
|
||||
@ -952,6 +972,7 @@ class Get
|
||||
$array['view'] = $array['adminview'];
|
||||
// get the admin settings/data
|
||||
$array['settings'] = $this->getAdminViewData($array['view']);
|
||||
|
||||
return $array;
|
||||
}, array_values($component->addadmin_views));
|
||||
}
|
||||
@ -1436,7 +1457,7 @@ class Get
|
||||
$view->fields = array_map(function($field) use($name_single, $name_list)
|
||||
{
|
||||
// set hash
|
||||
static $hash = 1;
|
||||
static $hash = 123467890; // (TODO) I found this making duplicates
|
||||
// load hash
|
||||
$field['hash'] = md5($field['field'] . $hash);
|
||||
// increment hash
|
||||
@ -2095,7 +2116,7 @@ class Get
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
// Order it by the ordering field.
|
||||
// Select all the values in the field
|
||||
$query->select('a.*');
|
||||
$query->select($this->db->quoteName(array('c.name', 'c.properties'), array('type_name', 'properties')));
|
||||
$query->from('#__componentbuilder_field AS a');
|
||||
@ -2263,16 +2284,16 @@ class Get
|
||||
{
|
||||
$this->customScriptBuilder['views_footer'] = array();
|
||||
}
|
||||
if (!isset($this->customScriptBuilder['views_footer'][$name_list]))
|
||||
if (!isset($this->customScriptBuilder['views_footer'][$name_single]))
|
||||
{
|
||||
$this->customScriptBuilder['views_footer'][$name_list] = '';
|
||||
$this->customScriptBuilder['views_footer'][$name_single] = '';
|
||||
}
|
||||
if (!isset($this->_fieldData[$id]->javascript_views_footer_decoded))
|
||||
{
|
||||
$this->_fieldData[$id]->javascript_views_footer = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
|
||||
$this->_fieldData[$id]->javascript_views_footer_decoded = true;
|
||||
}
|
||||
$this->customScriptBuilder['views_footer'][$name_list] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer;
|
||||
$this->customScriptBuilder['views_footer'][$name_single] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer;
|
||||
if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
|
||||
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
|
||||
{
|
||||
@ -4507,8 +4528,8 @@ class Get
|
||||
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
|
||||
if (ComponentbuilderHelper::checkArray($values))
|
||||
{
|
||||
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.entranslation', 'a.components', 'a.published')));
|
||||
$query->where($this->db->quoteName('a.entranslation') . ' IN (' . implode(',', array_map(function($a)
|
||||
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.source', 'a.components', 'a.published')));
|
||||
$query->where($this->db->quoteName('a.source') . ' IN (' . implode(',', array_map(function($a)
|
||||
{
|
||||
return $this->db->quote($a);
|
||||
}, $values)) . ')');
|
||||
@ -4516,7 +4537,7 @@ class Get
|
||||
$this->db->execute();
|
||||
if ($this->db->getNumRows())
|
||||
{
|
||||
return $this->db->loadAssocList('entranslation');
|
||||
return $this->db->loadAssocList('source');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -4534,7 +4555,7 @@ class Get
|
||||
$counterInsert = 0;
|
||||
$counterUpdate = 0;
|
||||
$today = JFactory::getDate()->toSql();
|
||||
foreach ($this->languages['en-GB'] as $area => $placeholders)
|
||||
foreach ($this->languages[$this->langTag] as $area => $placeholders)
|
||||
{
|
||||
foreach ($placeholders as $placeholder => $string)
|
||||
{
|
||||
@ -4621,7 +4642,7 @@ class Get
|
||||
// add the new lang placeholder to the db
|
||||
$this->newLangStrings[$counterInsert] = array();
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components'
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'entranslation'
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'source'
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'published'
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created'
|
||||
$this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by'
|
||||
@ -4659,7 +4680,7 @@ class Get
|
||||
$query = $this->db->getQuery(true);
|
||||
$continue = false;
|
||||
// Insert columns.
|
||||
$columns = array('components', 'entranslation', 'published', 'created', 'created_by', 'version', 'access');
|
||||
$columns = array('components', 'source', 'published', 'created', 'created_by', 'version', 'access');
|
||||
// Prepare the insert query.
|
||||
$query->insert($this->db->quoteName('#__componentbuilder_language_translation'));
|
||||
$query->columns($this->db->quoteName($columns));
|
||||
@ -4754,7 +4775,7 @@ class Get
|
||||
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
|
||||
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.components')));
|
||||
// get all string that are not linked to this component
|
||||
$query->where($this->db->quoteName('a.entranslation') . ' NOT IN (' . implode(',', array_map(function($a)
|
||||
$query->where($this->db->quoteName('a.source') . ' NOT IN (' . implode(',', array_map(function($a)
|
||||
{
|
||||
return $this->db->quote($a);
|
||||
}, $values)) . ')');
|
||||
@ -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 $commentType The comment type
|
||||
@ -5417,6 +5438,7 @@ class Get
|
||||
*
|
||||
* @param string $lineContent The file path to search
|
||||
* @param string $placeholders The values to search for
|
||||
* @param int $commentType The comment type
|
||||
*
|
||||
* @return array on success
|
||||
*
|
||||
@ -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 int $id The custom code id
|
||||
@ -5475,13 +5497,13 @@ class Get
|
||||
// get targets to search for
|
||||
$langStringTargets = array_filter(
|
||||
$this->langStringTargets, function($get) use($string)
|
||||
{
|
||||
if (strpos($string, $get) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (strpos($string, $get) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// check if we should continue
|
||||
if (ComponentbuilderHelper::checkArray($langStringTargets))
|
||||
{
|
||||
@ -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 $id The code id in the system
|
||||
|
@ -338,9 +338,9 @@ class Structure extends Get
|
||||
// run global updater
|
||||
ComponentbuilderHelper::runGlobalUpdater();
|
||||
// set the Joomla version
|
||||
$this->joomlaVersion = $config['joomlaVersion'];
|
||||
$this->joomlaVersion = $config['version'];
|
||||
// set the template path
|
||||
$this->templatePath = $this->compilerPath . '/joomla_' . $config['joomlaVersion'];
|
||||
$this->templatePath = $this->compilerPath . '/joomla_' . $config['version'];
|
||||
// set some default names
|
||||
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion;
|
||||
$this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
|
||||
|
@ -2013,7 +2013,18 @@ class Fields extends Structure
|
||||
// set the decoding methods
|
||||
if (in_array($set, $decode))
|
||||
{
|
||||
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => $set, 'type' => $type);
|
||||
if (isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]) &&
|
||||
isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']))
|
||||
{
|
||||
if (!in_array($set, $this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']))
|
||||
{
|
||||
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode'][] = $set;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => array($set), 'type' => $type);
|
||||
}
|
||||
}
|
||||
// set the uikit checker
|
||||
if ((2 == $this->uikit || 1 == $this->uikit) && in_array($type, $textareas))
|
||||
@ -2355,7 +2366,7 @@ class Fields extends Structure
|
||||
// set tags for this view but don't load to DB
|
||||
$this->tagsBuilder[$view_name_single] = $view_name_single;
|
||||
}
|
||||
else
|
||||
elseif (isset($field['settings']->datatype))
|
||||
{
|
||||
// insure default not none if number type
|
||||
$intKeys = array('INT', 'TINYINT', 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE');
|
||||
@ -2474,7 +2485,7 @@ class Fields extends Structure
|
||||
$this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"';
|
||||
}
|
||||
// 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]))
|
||||
{
|
||||
@ -2556,6 +2567,7 @@ class Fields extends Structure
|
||||
// setup checkboxes and other json items for this view
|
||||
if ($dbSwitch && (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag'))
|
||||
{
|
||||
$subformJsonSwitch = true;
|
||||
switch ($field['settings']->store)
|
||||
{
|
||||
case 1:
|
||||
@ -2593,6 +2605,8 @@ class Fields extends Structure
|
||||
$this->jsonItemBuilder[$view_name_single][] = $name;
|
||||
// Site settings of each field if needed
|
||||
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
|
||||
// no londer add the json again (already added)
|
||||
$subformJsonSwitch = false;
|
||||
break;
|
||||
}
|
||||
// just a heads-up for usergroups set to multiple
|
||||
@ -2614,10 +2628,19 @@ class Fields extends Structure
|
||||
}
|
||||
}
|
||||
|
||||
// if subform the values must revert to array
|
||||
// subform house keeping
|
||||
if ('subform' === $typeName)
|
||||
{
|
||||
// the values must revert to array
|
||||
$this->jsonItemBuilderArray[$view_name_single][] = $name;
|
||||
// should the json builder still be added
|
||||
if ($subformJsonSwitch)
|
||||
{
|
||||
// and insure the if is converted to json
|
||||
$this->jsonItemBuilder[$view_name_single][] = $name;
|
||||
// Site settings of each field if needed
|
||||
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
// build the data for the export & import methods $typeName === 'repeatable' ||
|
||||
|
@ -1270,7 +1270,7 @@ class Interpretation extends Fields
|
||||
$method[] = "\t\t\$lang = JFactory::getLanguage();";
|
||||
$method[] = "\t\t\$extension = 'com_users';";
|
||||
$method[] = "\t\t\$base_dir = JPATH_SITE;";
|
||||
$method[] = "\t\t\$language_tag = 'en-GB';";
|
||||
$method[] = "\t\t\$language_tag = '".$this->langTag."';";
|
||||
$method[] = "\t\t\$reload = true;";
|
||||
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
|
||||
$method[] = "\t\t//" . $this->setLine(__LINE__) . " load the user regestration model";
|
||||
@ -1351,7 +1351,7 @@ class Interpretation extends Fields
|
||||
$method[] = "\t\t\$lang = JFactory::getLanguage();";
|
||||
$method[] = "\t\t\$extension = 'com_users';";
|
||||
$method[] = "\t\t\$base_dir = JPATH_ADMINISTRATOR;";
|
||||
$method[] = "\t\t\$language_tag = 'en-GB';";
|
||||
$method[] = "\t\t\$language_tag = '".$this->langTag."';";
|
||||
$method[] = "\t\t\$reload = true;";
|
||||
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
|
||||
$method[] = "\t\t// load the user model";
|
||||
@ -1686,37 +1686,43 @@ class Interpretation extends Fields
|
||||
$fieldDecode = '';
|
||||
foreach ($checker as $field => $array)
|
||||
{
|
||||
if (strpos($get['selection']['select'], $field) !== false)
|
||||
if (strpos($get['selection']['select'], $field) !== false && ComponentbuilderHelper::checkArray($array['decode']))
|
||||
{
|
||||
if ('json' === $array['decode'])
|
||||
// insure it is unique
|
||||
$array['decode'] = (array) array_unique(array_reverse((array) $array['decode']));
|
||||
// now loop the array
|
||||
foreach ($array['decode'] as $decode)
|
||||
{
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// json_decode
|
||||
$decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);";
|
||||
}
|
||||
elseif ('base64' === $array['decode'])
|
||||
{
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ")))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// base64_decode
|
||||
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
|
||||
}
|
||||
elseif (strpos($array['decode'], '_encryption') !== false)
|
||||
{
|
||||
foreach ($this->cryptionTypes as $cryptionType)
|
||||
if ('json' === $decode)
|
||||
{
|
||||
if ($cryptionType . '_encryption' === $array['decode'])
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (" . $this->fileContentStatic['###Component###'] . "Helper::checkJson(" . $string . "->" . $field . "))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// json_decode
|
||||
$decoder = $string . "->" . $field . " = json_decode(" . $string . "->" . $field . ", true);";
|
||||
}
|
||||
elseif ('base64' === $decode)
|
||||
{
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ")))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// base64_decode
|
||||
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
|
||||
}
|
||||
elseif (strpos($decode, '_encryption') !== false)
|
||||
{
|
||||
foreach ($this->cryptionTypes as $cryptionType)
|
||||
{
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$" . $cryptionType . "key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// set decryption
|
||||
$decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
|
||||
$this->siteDecrypt[$cryptionType][$code] = true;
|
||||
if ($cryptionType . '_encryption' === $decode)
|
||||
{
|
||||
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$" . $cryptionType . "key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{";
|
||||
// set decryption
|
||||
$decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
|
||||
$this->siteDecrypt[$cryptionType][$code] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// build decoder string
|
||||
$fieldDecode .= $if . PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " Decode " . $field;
|
||||
$fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}";
|
||||
// build decoder string
|
||||
$fieldDecode .= $if . PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " Decode " . $field;
|
||||
$fieldDecode .= PHP_EOL . "\t" . $tab . "\t\t" . $decoder . PHP_EOL . "\t" . $tab . "\t}";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $fieldDecode;
|
||||
@ -2821,10 +2827,25 @@ class Interpretation extends Fields
|
||||
return $method;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the a script from the custom script builder
|
||||
*
|
||||
* @param string $first The first key
|
||||
* @param string $second The second key
|
||||
* @param string $prefix The prefix to add in front of the script if found
|
||||
* @param string/bool $note The switch/note to add to the script
|
||||
* @param bool $unset The switch to unset the value if found
|
||||
* @param string/bool $default The switch/string to use as default return if script not found
|
||||
* @param string $sufix The sufix to add after the script if found
|
||||
*
|
||||
* @return mix The string/script if found or the default value if not found
|
||||
*
|
||||
*/
|
||||
public function getCustomScriptBuilder($first, $second, $prefix = '', $note = null, $unset = null, $default = null, $sufix = '')
|
||||
{
|
||||
// check if there is any custom script
|
||||
// default is to return an empty string
|
||||
$script = '';
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second]))
|
||||
{
|
||||
// add not if set
|
||||
@ -2832,6 +2853,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
$script .= $note;
|
||||
}
|
||||
// load the actual script
|
||||
$script .= $prefix . str_replace(array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix;
|
||||
// clear some memory
|
||||
if ($unset)
|
||||
@ -3087,6 +3109,17 @@ class Interpretation extends Fields
|
||||
|
||||
public function setPrepareDocument(&$view)
|
||||
{
|
||||
// fix just incase we missed it somewhere
|
||||
$tmp = $this->lang;
|
||||
if ('site' === $this->target)
|
||||
{
|
||||
$this->lang = 'site';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang = 'admin';
|
||||
}
|
||||
|
||||
// ensure correct target is set
|
||||
$TARGET = ComponentbuilderHelper::safeString($this->target, 'U');
|
||||
|
||||
@ -3132,6 +3165,9 @@ class Interpretation extends Fields
|
||||
|
||||
// set a JavaScript file if needed
|
||||
$this->fileContentDynamic[$view['settings']->code]['###' . $TARGET . '_LIBRARIES_LOADER###'] .= $this->setJavaScriptFile($view, $TARGET);
|
||||
|
||||
// fix just incase we missed it somewhere
|
||||
$this->lang = $tmp;
|
||||
}
|
||||
|
||||
public function setGetModules($view, $TARGET)
|
||||
@ -3297,12 +3333,13 @@ class Interpretation extends Fields
|
||||
{
|
||||
foreach ($view['settings']->custom_buttons as $custom_button)
|
||||
{
|
||||
// Load to lang
|
||||
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
|
||||
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
|
||||
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
|
||||
// load the button
|
||||
if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site'))
|
||||
{
|
||||
// Load to lang
|
||||
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
|
||||
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
|
||||
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
|
||||
// add cpanel button TODO does not work well on site with permissions
|
||||
if ($custom_button['target'] == 2)
|
||||
{
|
||||
@ -3320,10 +3357,6 @@ class Interpretation extends Fields
|
||||
// load the list button
|
||||
elseif (3 == $type && $custom_button['target'] != 1)
|
||||
{
|
||||
// Load to lang
|
||||
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U');
|
||||
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
|
||||
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
|
||||
// add cpanel button TODO does not work well on site with permissions
|
||||
if (isset($custom_button['type']) && $custom_button['type'] == 2)
|
||||
{
|
||||
@ -4219,6 +4252,39 @@ class Interpretation extends Fields
|
||||
public function setMethodGetItem(&$view)
|
||||
{
|
||||
$script = '';
|
||||
// get the component name
|
||||
$Component = $this->fileContentStatic['###Component###'];
|
||||
// go from base64 to string
|
||||
if (isset($this->base64Builder[$view]) && ComponentbuilderHelper::checkArray($this->base64Builder[$view]))
|
||||
{
|
||||
foreach ($this->base64Builder[$view] as $baseString)
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . "))"; // TODO && base64_encode(base64_decode(\$item->".$baseString.", true)) === \$item->".$baseString.")";
|
||||
$script .= PHP_EOL . "\t\t\t{";
|
||||
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " base64 Decode " . $baseString . ".";
|
||||
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = base64_decode(\$item->" . $baseString . ");";
|
||||
$script .= PHP_EOL . "\t\t\t}";
|
||||
}
|
||||
}
|
||||
// decryption
|
||||
foreach ($this->cryptionTypes as $cryptionType)
|
||||
{
|
||||
if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
|
||||
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
|
||||
$script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
|
||||
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
|
||||
foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . ") && \$" . $cryptionType . "key && !is_numeric(\$item->" . $baseString . ") && \$item->" . $baseString . " === base64_encode(base64_decode(\$item->" . $baseString . ", true)))";
|
||||
$script .= PHP_EOL . "\t\t\t{";
|
||||
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $cryptionType . " decrypt data " . $baseString . ".";
|
||||
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = rtrim(\$" . $cryptionType . "->decryptString(\$item->" . $baseString . "), " . '"\0"' . ");";
|
||||
$script .= PHP_EOL . "\t\t\t}";
|
||||
}
|
||||
}
|
||||
}
|
||||
// go from json to array
|
||||
if (isset($this->jsonItemBuilder[$view]) && ComponentbuilderHelper::checkArray($this->jsonItemBuilder[$view]))
|
||||
{
|
||||
@ -4254,39 +4320,6 @@ class Interpretation extends Fields
|
||||
$script .= PHP_EOL . "\t\t\t}";
|
||||
}
|
||||
}
|
||||
// go from base64 to string
|
||||
if (isset($this->base64Builder[$view]) && ComponentbuilderHelper::checkArray($this->base64Builder[$view]))
|
||||
{
|
||||
foreach ($this->base64Builder[$view] as $baseString)
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . "))"; // TODO && base64_encode(base64_decode(\$item->".$baseString.", true)) === \$item->".$baseString.")";
|
||||
$script .= PHP_EOL . "\t\t\t{";
|
||||
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " base64 Decode " . $baseString . ".";
|
||||
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = base64_decode(\$item->" . $baseString . ");";
|
||||
$script .= PHP_EOL . "\t\t\t}";
|
||||
}
|
||||
}
|
||||
// get the component name
|
||||
$Component = $this->fileContentStatic['###Component###'];
|
||||
// decryption
|
||||
foreach ($this->cryptionTypes as $cryptionType)
|
||||
{
|
||||
if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
|
||||
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
|
||||
$script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
|
||||
$script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
|
||||
foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
|
||||
{
|
||||
$script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . ") && \$" . $cryptionType . "key && !is_numeric(\$item->" . $baseString . ") && \$item->" . $baseString . " === base64_encode(base64_decode(\$item->" . $baseString . ", true)))";
|
||||
$script .= PHP_EOL . "\t\t\t{";
|
||||
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $cryptionType . " decrypt data " . $baseString . ".";
|
||||
$script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = rtrim(\$" . $cryptionType . "->decryptString(\$item->" . $baseString . "), " . '"\0"' . ");";
|
||||
$script .= PHP_EOL . "\t\t\t}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add custom php to getitem method
|
||||
$script .= $this->getCustomScriptBuilder('php_getitem', $view, PHP_EOL . PHP_EOL);
|
||||
@ -5721,6 +5754,71 @@ class Interpretation extends Fields
|
||||
return '';
|
||||
}
|
||||
|
||||
public function setGenerateNewAlias($viewName_single)
|
||||
{
|
||||
// make sure this view has an alias
|
||||
if (isset($this->aliasBuilder[$viewName_single]))
|
||||
{
|
||||
// set the title stuff
|
||||
if (isset($this->customAliasBuilder[$viewName_single]))
|
||||
{
|
||||
$titles = array_values($this->customAliasBuilder[$viewName_single]);
|
||||
}
|
||||
elseif (isset($this->titleBuilder[$viewName_single]))
|
||||
{
|
||||
$titles = array($this->titleBuilder[$viewName_single]);
|
||||
}
|
||||
// reset the bucket
|
||||
$titleData = array();
|
||||
// load the dynamic title builder
|
||||
if (isset($titles) && ComponentbuilderHelper::checkArray($titles))
|
||||
{
|
||||
foreach ($titles as $title)
|
||||
{
|
||||
$titleData[] = "\$this->" . $title;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$titleData = array("'-'"); // just incase some mad man does not set a title/customAlias (we fall back on the date)
|
||||
}
|
||||
// rest the new function
|
||||
$newFunction = array();
|
||||
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
|
||||
$newFunction[] = "\t* Generate a valid alias from title / date.";
|
||||
$newFunction[] = "\t* Remains public to be able to check for duplicated alias before saving";
|
||||
$newFunction[] = "\t*";
|
||||
$newFunction[] = "\t* @return string";
|
||||
$newFunction[] = "\t*/";
|
||||
$newFunction[] = "\tpublic function generateAlias()";
|
||||
$newFunction[] = "\t{";
|
||||
$newFunction[] = "\t\tif (empty(\$this->alias))";
|
||||
$newFunction[] = "\t\t{";
|
||||
$newFunction[] = "\t\t\t\$this->alias = ".implode(".' '.",$titleData).';';
|
||||
$newFunction[] = "\t\t}";
|
||||
$newFunction[] = PHP_EOL ."\t\t\$this->alias = JApplication::stringURLSafe(\$this->alias);";
|
||||
$newFunction[] = PHP_EOL ."\t\tif (trim(str_replace('-', '', \$this->alias)) == '')";
|
||||
$newFunction[] = "\t\t{";
|
||||
$newFunction[] = "\t\t\t\$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');";
|
||||
$newFunction[] = "\t\t}";
|
||||
$newFunction[] = PHP_EOL ."\t\treturn \$this->alias;";
|
||||
$newFunction[] = "\t}";
|
||||
return implode(PHP_EOL, $newFunction);
|
||||
}
|
||||
// rest the new function
|
||||
$newFunction = array();
|
||||
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
|
||||
$newFunction[] = "\t* This view does not actually have an alias";
|
||||
$newFunction[] = "\t*";
|
||||
$newFunction[] = "\t* @return bool";
|
||||
$newFunction[] = "\t*/";
|
||||
$newFunction[] = "\tpublic function generateAlias()";
|
||||
$newFunction[] = "\t{";
|
||||
$newFunction[] = "\t\treturn false;";
|
||||
$newFunction[] = "\t}";
|
||||
return implode(PHP_EOL, $newFunction);
|
||||
}
|
||||
|
||||
public function setInstall()
|
||||
{
|
||||
if (isset($this->queryBuilder) && ComponentbuilderHelper::checkArray($this->queryBuilder))
|
||||
@ -6065,7 +6163,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
ksort($this->langContent['admin']);
|
||||
// load to global languages
|
||||
$this->languages['en-GB']['admin'] = $this->langContent['admin'];
|
||||
$this->languages[$this->langTag]['admin'] = $this->langContent['admin'];
|
||||
// remove tmp array
|
||||
unset($this->langContent['admin']);
|
||||
|
||||
@ -6118,7 +6216,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
ksort($this->langContent['site']);
|
||||
// load to global languages
|
||||
$this->languages['en-GB']['site'] = $this->langContent['site'];
|
||||
$this->languages[$this->langTag]['site'] = $this->langContent['site'];
|
||||
// remove tmp array
|
||||
unset($this->langContent['site']);
|
||||
|
||||
@ -6146,7 +6244,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
ksort($this->langContent['sitesys']);
|
||||
// load to global languages
|
||||
$this->languages['en-GB']['sitesys'] = $this->langContent['sitesys'];
|
||||
$this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys'];
|
||||
// remove tmp array
|
||||
unset($this->langContent['sitesys']);
|
||||
|
||||
@ -6169,7 +6267,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
ksort($this->langContent['adminsys']);
|
||||
// load to global languages
|
||||
$this->languages['en-GB']['adminsys'] = $this->langContent['adminsys'];
|
||||
$this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys'];
|
||||
// remove tmp array
|
||||
unset($this->langContent['adminsys']);
|
||||
|
||||
@ -9052,7 +9150,7 @@ class Interpretation extends Fields
|
||||
}
|
||||
}
|
||||
// minfy the script
|
||||
if ($this->params->get('minify') && isset($fileScript) && ComponentbuilderHelper::checkString($fileScript))
|
||||
if ($this->minify && isset($fileScript) && ComponentbuilderHelper::checkString($fileScript))
|
||||
{
|
||||
// minify the fielScript javscript
|
||||
$minifier = new JS;
|
||||
@ -9060,7 +9158,7 @@ class Interpretation extends Fields
|
||||
$fileScript = $minifier->minify();
|
||||
}
|
||||
// minfy the script
|
||||
if ($this->params->get('minify') && isset($footerScript) && ComponentbuilderHelper::checkString($footerScript))
|
||||
if ($this->minify && isset($footerScript) && ComponentbuilderHelper::checkString($footerScript))
|
||||
{
|
||||
// minify the footerScript javscript
|
||||
$minifier = new JS;
|
||||
@ -11817,8 +11915,16 @@ class Interpretation extends Fields
|
||||
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t//" . $this->setLine(__LINE__) . " convert " . $item['name'];
|
||||
if (isset($item['custom']['table']))
|
||||
{
|
||||
$keyTableNAme = str_replace('#__' . $this->fileContentStatic['###component###'] . '_', '', $item['custom']['table']);
|
||||
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\$item->" . $item['name'] . " = " . $Component . "Helper::jsonToString(\$item->" . $item['name'] . ", ', ', '" . $keyTableNAme . "');";
|
||||
// check if this is a local table
|
||||
if (strpos($item['custom']['table'], '#__' . $this->fileContentStatic['###component###'] . '_') !== false)
|
||||
{
|
||||
$keyTableNAme = str_replace('#__' . $this->fileContentStatic['###component###'] . '_', '', $item['custom']['table']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$keyTableNAme = $item['custom']['table'];
|
||||
}
|
||||
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\$item->" . $item['name'] . " = " . $Component . "Helper::jsonToString(\$item->" . $item['name'] . ", ', ', '" . $keyTableNAme . "', '".$item['custom']['id']."', '".$item['custom']['text']."');";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -12680,7 +12786,16 @@ class Interpretation extends Fields
|
||||
// set the code name
|
||||
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
|
||||
// set main menu name to lang
|
||||
$this->langContent['adminsys'][$lang] = '» ' . $this->componentData->name;
|
||||
$addPrefix = $this->params->get('add_menu_prefix', 1);
|
||||
if ($addPrefix == 1)
|
||||
{
|
||||
$prefix = trim($this->params->get('menu_prefix', '»'));
|
||||
$this->langContent['adminsys'][$lang] = $prefix . ' ' . $this->componentData->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->langContent['adminsys'][$lang] = $this->componentData->name;
|
||||
}
|
||||
foreach ($this->componentData->admin_views as $view)
|
||||
{
|
||||
// set custom menu
|
||||
@ -13021,12 +13136,6 @@ class Interpretation extends Fields
|
||||
$tabCode = ComponentbuilderHelper::safeString($tab) . '_custom_config';
|
||||
$tabUpper = ComponentbuilderHelper::safeString($tab, 'U');
|
||||
$tabLower = ComponentbuilderHelper::safeString($tab);
|
||||
// setup lang
|
||||
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
|
||||
// start field set
|
||||
$this->configFieldSets[] = "\t<fieldset";
|
||||
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
|
||||
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
|
||||
// remove display targeted fields
|
||||
$bucket = array();
|
||||
foreach ($tabFields as $tabField)
|
||||
@ -13038,10 +13147,20 @@ class Interpretation extends Fields
|
||||
$bucket[] = str_replace('display="config"', '', $tabField);
|
||||
}
|
||||
}
|
||||
// set the fields
|
||||
$this->configFieldSets[] = implode("", $bucket);
|
||||
// close field set
|
||||
$this->configFieldSets[] = "\t</fieldset>";
|
||||
// only add the tab if it has values
|
||||
if (ComponentbuilderHelper::checkArray($bucket))
|
||||
{
|
||||
// setup lang
|
||||
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
|
||||
// start field set
|
||||
$this->configFieldSets[] = "\t<fieldset";
|
||||
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
|
||||
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
|
||||
// set the fields
|
||||
$this->configFieldSets[] = implode("", $bucket);
|
||||
// close field set
|
||||
$this->configFieldSets[] = "\t</fieldset>";
|
||||
}
|
||||
// remove after loading
|
||||
unset($this->configFieldSetsCustomField[$tab]);
|
||||
}
|
||||
|
@ -299,14 +299,12 @@ class Infusion extends Interpretation
|
||||
// ###AJAXTOKE### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###AJAXTOKE###'] = $this->setAjaxToke($viewName_single);
|
||||
|
||||
if (isset($this->customScriptBuilder['php_document'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_document'][$viewName_single]))
|
||||
// ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
|
||||
if ($phpDocument = $this->getCustomScriptBuilder('php_document', $viewName_single, PHP_EOL, null, true, false))
|
||||
{
|
||||
// ###DOCUMENT_CUSTOM_PHP### <<<DYNAMIC>>>
|
||||
$this->customScriptBuilder['php_document'][$viewName_single] = str_replace('$document->', '$this->document->', $this->customScriptBuilder['php_document'][$viewName_single]);
|
||||
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = PHP_EOL . $this->setPlaceholders(
|
||||
$this->customScriptBuilder['php_document'][$viewName_single], $this->placeholders);
|
||||
$this->fileContentDynamic[$viewName_single]['###DOCUMENT_CUSTOM_PHP###'] = str_replace('$document->', '$this->document->', $phpDocument);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder['php_document'][$viewName_single]);
|
||||
unset($phpDocument);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -361,18 +359,9 @@ class Infusion extends Interpretation
|
||||
// ###POSTSAVEHOOK### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###POSTSAVEHOOK###'] = $this->getCustomScriptBuilder('php_postsavehook', $viewName_single, PHP_EOL, null, true, PHP_EOL . "\t\treturn;", PHP_EOL . PHP_EOL . "\t\treturn;");
|
||||
|
||||
if (isset($this->customScriptBuilder['css_view'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['css_view'][$viewName_single]))
|
||||
{
|
||||
// ###VIEWCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_view'][$viewName_single], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder['css_view'][$viewName_single]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###VIEWCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = '';
|
||||
}
|
||||
// ###VIEWCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###VIEWCSS###'] = $this->getCustomScriptBuilder('css_view', $viewName_single, '', null, true);
|
||||
|
||||
// add css to front end
|
||||
if (isset($view['edit_create_site_view']) && $view['edit_create_site_view'])
|
||||
{
|
||||
@ -489,17 +478,30 @@ class Infusion extends Interpretation
|
||||
// ###JVIEWLISTCANDO### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list]['###JVIEWLISTCANDO###'] = $this->setJviewListCanDo($viewName_single, $viewName_list);
|
||||
|
||||
if (isset($this->customScriptBuilder['css_views'][$viewName_list]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['css_views'][$viewName_list]))
|
||||
// ###VIEWSCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = $this->getCustomScriptBuilder('css_views', $viewName_list, '', null, true);
|
||||
|
||||
// ###VIEWS_FOOTER_SCRIPT### <<<DYNAMIC>>>
|
||||
$scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__) . ' ' . $viewName_list.' footer script';
|
||||
if ($footerScript = $this->getCustomScriptBuilder('views_footer', $viewName_single, '', $scriptNote, true, false, PHP_EOL))
|
||||
{
|
||||
// ###VIEWCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = $this->setPlaceholders($this->customScriptBuilder['css_views'][$viewName_list], $this->placeholders);
|
||||
// only minfy if no php is added to the footer script
|
||||
if ($this->minify && strpos($footerScript, '<?php') === false)
|
||||
{
|
||||
// minfy the script
|
||||
$minifier = new JS;
|
||||
$minifier->add($footerScript);
|
||||
$footerScript = $minifier->minify();
|
||||
// clear some memory
|
||||
unset($minifier);
|
||||
}
|
||||
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = PHP_EOL . '<script type="text/javascript">' . $footerScript . "</script>";
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder['css_views'][$viewName_list]);
|
||||
unset($footerScript);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###VIEWCSS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = '';
|
||||
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,6 +514,9 @@ class Infusion extends Interpretation
|
||||
// ###GENERATENEWTITLE### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###GENERATENEWTITLE###'] = $this->setGenerateNewTitle($viewName_single);
|
||||
|
||||
// ###GENERATENEWALIAS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###GENERATENEWALIAS###'] = $this->setGenerateNewAlias($viewName_single);
|
||||
|
||||
// ###MODEL_BATCH_COPY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_COPY###'] = $this->setBatchCopy($viewName_single);
|
||||
|
||||
@ -617,86 +622,31 @@ class Infusion extends Interpretation
|
||||
|
||||
if ($view['settings']->main_get->gettype == 1)
|
||||
{
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]))
|
||||
{
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = '';
|
||||
}
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
|
||||
|
||||
// ###CUSTOM_ADMIN_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_ITEM###'] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]))
|
||||
{
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = '';
|
||||
}
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
|
||||
}
|
||||
elseif ($view['settings']->main_get->gettype == 2)
|
||||
{
|
||||
// ###CUSTOM_ADMIN_GET_LIST_QUERY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]))
|
||||
{
|
||||
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_getlistquery'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = '';
|
||||
}
|
||||
// ###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY###'] = $this->getCustomScriptBuilder($this->target . '_php_getlistquery', $view['settings']->code, PHP_EOL, null, true);
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]))
|
||||
{
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = '';
|
||||
}
|
||||
// ###CUSTOM_ADMIN_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
|
||||
|
||||
// ###CUSTOM_ADMIN_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code);
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]))
|
||||
{
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = '';
|
||||
}
|
||||
// ###CUSTOM_ADMIN_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
|
||||
}
|
||||
|
||||
// ###CUSTOM_ADMIN_CUSTOM_METHODS### <<<DYNAMIC>>>
|
||||
@ -908,36 +858,15 @@ class Infusion extends Interpretation
|
||||
{
|
||||
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 1);
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]))
|
||||
{
|
||||
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_before_getitem'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = '';
|
||||
}
|
||||
|
||||
// ###SITE_BEFORE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitem', $view['settings']->code, '', null, true);
|
||||
|
||||
// ###SITE_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEM###'] = $this->setCustomViewGetItem($view['settings']->main_get, $view['settings']->code, "\t\t");
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]))
|
||||
{
|
||||
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_after_getitem'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = '';
|
||||
}
|
||||
// ###SITE_AFTER_GET_ITEM### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEM###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitem', $view['settings']->code, '', null, true);
|
||||
}
|
||||
elseif ($view['settings']->main_get->gettype == 2)
|
||||
{
|
||||
@ -946,36 +875,14 @@ class Infusion extends Interpretation
|
||||
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]))
|
||||
{
|
||||
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_before_getitems'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = '';
|
||||
}
|
||||
// ###SITE_BEFORE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_BEFORE_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_before_getitems', $view['settings']->code, PHP_EOL, null, true);
|
||||
|
||||
// ###SITE_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_ITEMS###'] = $this->setCustomViewGetItems($view['settings']->main_get, $view['settings']->code);
|
||||
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]))
|
||||
{
|
||||
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = PHP_EOL . $this->setPlaceholders($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code], $this->placeholders);
|
||||
// clear some memory
|
||||
unset($this->customScriptBuilder[$this->target . '_php_after_getitems'][$view['settings']->code]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = '';
|
||||
}
|
||||
// ###SITE_AFTER_GET_ITEMS### <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code]['###SITE_AFTER_GET_ITEMS###'] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
|
||||
}
|
||||
// add to lang array
|
||||
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
|
||||
@ -1174,26 +1081,26 @@ class Infusion extends Interpretation
|
||||
// check the admin lang is set
|
||||
if ($this->setLangAdmin())
|
||||
{
|
||||
$values[] = array_values($this->languages['en-GB']['admin']);
|
||||
$mainLangLoader['admin'] = count($this->languages['en-GB']['admin']);
|
||||
$values[] = array_values($this->languages[$this->langTag]['admin']);
|
||||
$mainLangLoader['admin'] = count($this->languages[$this->langTag]['admin']);
|
||||
}
|
||||
// check the admin system lang is set
|
||||
if ($this->setLangAdminSys())
|
||||
{
|
||||
$values[] = array_values($this->languages['en-GB']['adminsys']);
|
||||
$mainLangLoader['adminsys'] = count($this->languages['en-GB']['adminsys']);
|
||||
$values[] = array_values($this->languages[$this->langTag]['adminsys']);
|
||||
$mainLangLoader['adminsys'] = count($this->languages[$this->langTag]['adminsys']);
|
||||
}
|
||||
// check the site lang is set
|
||||
if (!$this->removeSiteFolder && $this->setLangSite())
|
||||
{
|
||||
$values[] = array_values($this->languages['en-GB']['site']);
|
||||
$mainLangLoader['site'] = count($this->languages['en-GB']['site']);
|
||||
$values[] = array_values($this->languages[$this->langTag]['site']);
|
||||
$mainLangLoader['site'] = count($this->languages[$this->langTag]['site']);
|
||||
}
|
||||
// check the site system lang is set
|
||||
if (!$this->removeSiteFolder && $this->setLangSiteSys())
|
||||
{
|
||||
$values[] = array_values($this->languages['en-GB']['sitesys']);
|
||||
$mainLangLoader['sitesys'] = count($this->languages['en-GB']['sitesys']);
|
||||
$values[] = array_values($this->languages[$this->langTag]['sitesys']);
|
||||
$mainLangLoader['sitesys'] = count($this->languages[$this->langTag]['sitesys']);
|
||||
}
|
||||
$values = array_unique(ComponentbuilderHelper::mergeArrays($values));
|
||||
// get the other lang strings if there is any
|
||||
@ -1214,8 +1121,8 @@ class Infusion extends Interpretation
|
||||
$tag = trim($tag);
|
||||
foreach ($areas as $area => $languageStrings)
|
||||
{
|
||||
// only log messages for none en-GB translations
|
||||
if ('en-GB' !== $tag)
|
||||
// only log messages for none $this->langTag translations
|
||||
if ($this->langTag !== $tag)
|
||||
{
|
||||
$langStringNr = count($languageStrings);
|
||||
$langStringSum = $this->bcmath('mul', $langStringNr, 100);
|
||||
@ -1228,12 +1135,12 @@ class Infusion extends Interpretation
|
||||
if ($percentage < $this->percentageLanguageAdd)
|
||||
{
|
||||
// dont add
|
||||
$this->langNot[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total en-GB strings) only <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
|
||||
$this->langNot[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total '.$this->langTag.' strings) only <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// show if it was added as well
|
||||
$this->langSet[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total en-GB strings) and <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
|
||||
$this->langSet[$area . ' ' . $tag] = '<b>' . $mainLangLoader[$area] . '</b>(total '.$this->langTag.' strings) and <b>' . $langStringNr . '</b>' . $stringNAme . ' = ' . $percentage;
|
||||
}
|
||||
// set naming convention
|
||||
$p = 'admin';
|
||||
@ -1271,7 +1178,7 @@ class Infusion extends Interpretation
|
||||
// add to language file
|
||||
$this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang));
|
||||
// set the line counter
|
||||
$this->lineCount = $this->lineCount + substr_count($lang, PHP_EOL);
|
||||
$this->lineCount = $this->lineCount + count((array)$lang);
|
||||
// build xml strings
|
||||
if (!isset($langXML[$p]))
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,7 @@ COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
|
||||
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
|
||||
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder & Sales Server <small>(if set)</small>"
|
||||
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
|
||||
COM_COMPONENTBUILDER_ADD_YOUR_OWN_JCB_PACKAGES_TO_THE_COMMUNITY_A_S_GITHUBA_REPOSITORYBR_WATCH_THIS_A_S_TUTORIALA_TO_SEE_HOW="Add your own JCB packages to the community <a %s >gitHub</a> repository.<br />Watch this <a %s >tutorial</a> to see how!"
|
||||
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
|
||||
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
|
||||
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields"
|
||||
@ -894,9 +895,10 @@ COM_COMPONENTBUILDER_ALL="All"
|
||||
COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter."
|
||||
COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time."
|
||||
COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.<br />Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import <a %s >please let us know</a>."
|
||||
COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED="All the languages found in Joomla were successfully imported."
|
||||
COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?"
|
||||
COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add"
|
||||
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b>"
|
||||
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_A_SFIND_OUT_WHYA="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> <a %s>Find out why!</a>"
|
||||
COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)"
|
||||
COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED="An error has occurred"
|
||||
COM_COMPONENTBUILDER_ARCHIVED="Archived"
|
||||
@ -923,7 +925,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_BBEST_TO_NOT_CONTINUEBBR_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="<b>Best to not continue!</b><br />This package <b>FAILED</b> checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!"
|
||||
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME="<b>Best to not continue!</b><br />We could not load the checksum for this package, and so no validation was possible. This may be due to your network, or a change to that package name."
|
||||
COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_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_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"
|
||||
@ -931,14 +933,14 @@ COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_
|
||||
COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB="<b>Field type</b> id:%s mismatch in <b>%s</b>."
|
||||
COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB="<b>Field type</b> not set for <b>%s</b>."
|
||||
COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="<b>Get the key from</b> <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
|
||||
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVE_TO_CORRECT_LOCATION="<b>Images</b> not move to correct location!"
|
||||
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION="<b>Images</b> not moved to correct location!"
|
||||
COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="<b>Multiple Field (repeatable mode)</b> id:%s mismatch in <b>field:%s</b>, and was <em>removed</em> from the field."
|
||||
COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="<b>%s</b>->%s in <b>%s</b> has id mismatch. So the <b>%s</b> was removed!"
|
||||
COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
|
||||
COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="<b>%s</b> <em>component details</em>"
|
||||
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
|
||||
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
|
||||
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
|
||||
COM_COMPONENTBUILDER_BUILD="Build"
|
||||
COM_COMPONENTBUILDER_BUILDIN="Build-in"
|
||||
COM_COMPONENTBUILDER_BULK="Bulk"
|
||||
COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets"
|
||||
@ -952,7 +954,10 @@ COM_COMPONENTBUILDER_CANCEL="Cancel"
|
||||
COM_COMPONENTBUILDER_CHAIN="Chain"
|
||||
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
|
||||
COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp"
|
||||
COM_COMPONENTBUILDER_CLONE="Clone"
|
||||
COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!"
|
||||
COM_COMPONENTBUILDER_CLOSE_NEW="Close & New"
|
||||
COM_COMPONENTBUILDER_COMMUNITY_PACKAGES="Community Packages"
|
||||
COM_COMPONENTBUILDER_COMPANY="Company"
|
||||
COM_COMPONENTBUILDER_COMPANY_NAME="Company Name"
|
||||
COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
|
||||
@ -2037,12 +2042,12 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_DESCRIPTION="<p
|
||||
<b>JPATH_BASE</b><br />
|
||||
// The path to the cache folder.<br />
|
||||
<b>JPATH_CACHE</b><br />
|
||||
// The path to the administration folder of the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br />
|
||||
// The path to the site folder of the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT_SITE</b><br />
|
||||
// The path to the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT</b><br />
|
||||
// The path to the administration folder of JCB component.<br />
|
||||
<b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
|
||||
// The path to the site folder of JCB component.<br />
|
||||
<b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
|
||||
// The path to the JCB component.<br />
|
||||
<b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
|
||||
// The path to folder containing the configuration.php file.<br />
|
||||
<b>JPATH_CONFIGURATION</b><br />
|
||||
// The path to the installation folder.<br />
|
||||
@ -2206,6 +2211,8 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version U
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_LABEL="Version Updates"
|
||||
COM_COMPONENTBUILDER_CONDITIONS="Conditions"
|
||||
COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
|
||||
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
|
||||
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
|
||||
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
|
||||
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
|
||||
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
|
||||
@ -2214,6 +2221,7 @@ COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author o
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_LABEL="Author Email"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component."
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_LABEL="Author Name"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP="Auto Backup"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTO_LOAD="Auto"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_DESCRIPTION="You can run a cronjob that will backup all your components as they are mapped in JCB.<br /><br /><b>USE THE FOLLOWING:</b> <span id='cronjob-backup'>loading...<span class='loading-dots' ></span></span><br /><br />Please note that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677
|
||||
<script type='text/javascript'>
|
||||
@ -2264,10 +2272,11 @@ function getCronPath(getType, token){
|
||||
} else {
|
||||
jQuery('#cronjob-'+getType).html('<span style=\'color: red;\'>Error loading path!</span>');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL="Backup JCB Mapped Components"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_DESCRIPTION="Enter the email where the <b>backup key</b> should be send. It will only send an email if a key change is detected, and not on every backup."
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_HINT="Email Address Here"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_LABEL="Email (backup key)"
|
||||
@ -2276,6 +2285,7 @@ COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_HINT="/home/user/backup"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_LABEL="Backup Folder Path"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_MESSAGE="Error! Please add folder path here."
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL="Add to Backup Folder & Sales Server <small>(if set)</small>"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_DESCRIPTION="Enter Package Name Here"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT="JCB_Backup_[YEAR]_[MONTH]_[DAY]"
|
||||
COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_LABEL="Package Name"
|
||||
@ -2299,7 +2309,8 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set t
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_CONFIG_CRONJOB="CronJob"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component"
|
||||
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to."
|
||||
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_HINT="/home/user/fullbackup"
|
||||
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path"
|
||||
@ -2312,6 +2323,11 @@ COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the
|
||||
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom"
|
||||
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
|
||||
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_MESSAGE="Error! Please add folder path here."
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT="Default"
|
||||
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD="Development Method"
|
||||
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION="Select what development method you would like to use."
|
||||
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_LABEL="Development Method"
|
||||
COM_COMPONENTBUILDER_CONFIG_DISPLAY_MESSAGE="Display Message"
|
||||
COM_COMPONENTBUILDER_CONFIG_DKIM="DKIM"
|
||||
COM_COMPONENTBUILDER_CONFIG_DKIM_DESCRIPTION="Set this option to Yes if you want to sign your emails using DKIM."
|
||||
COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_DESCRIPTION="Set the domain. Eg. domain.com"
|
||||
@ -2356,6 +2372,38 @@ COM_COMPONENTBUILDER_CONFIG_EVERY_TEN_HOURS="Every 10 Hours"
|
||||
COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_MINUTES="Every 30 Minutes"
|
||||
COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS="Every 30 Seconds"
|
||||
COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK="Every Week"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSION="Expansion"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_DESCRIPTION="You must run a cronjob that will trigger the expansion events for JCB.<br /><br /><b>USE THE FOLLOWING:</b> <span id='cronjob-expand'>loading...<span class='loading-dots' ></span></span><br /><br />Please note that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677
|
||||
<script type='text/javascript'>
|
||||
jQuery(document).ready(function($) {
|
||||
// get token from the form
|
||||
$('form :input').each(function(index, elm){
|
||||
if (elm.name.length == 32 && elm.type == 'hidden')
|
||||
{
|
||||
value = $(elm).val();
|
||||
if (1 == value)
|
||||
{
|
||||
token = elm.name;
|
||||
}
|
||||
}
|
||||
});
|
||||
// nice little dot trick :)
|
||||
var x=0;
|
||||
setInterval(function() {
|
||||
var dots = '';
|
||||
x++;
|
||||
for (var y=0; y < x%11; y++) {
|
||||
dots+='.';
|
||||
}
|
||||
jQuery('.loading-dots').text(dots);
|
||||
} , 500);
|
||||
// now get the Cron Path
|
||||
getCronPath('expand', token);
|
||||
});
|
||||
</script>"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_LABEL="Expansion Cronjob"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSION_DESCRIPTION="Properties for this field"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPANSION_LABEL="Expansion"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_DESCRIPTION="Enter link where your JCB package key can be bought."
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
|
||||
@ -2397,12 +2445,24 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
|
||||
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
|
||||
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
|
||||
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area. "
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories"
|
||||
COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language"
|
||||
COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder"
|
||||
COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails."
|
||||
COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer"
|
||||
COM_COMPONENTBUILDER_CONFIG_MAILONLINE_DESCRIPTION="Warning this will stop all emails from going out."
|
||||
COM_COMPONENTBUILDER_CONFIG_MAILONLINE_LABEL="Mailer Status"
|
||||
COM_COMPONENTBUILDER_CONFIG_MAIL_CONFIGURATION="Mail Configuration"
|
||||
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can choose to manually select what directories should show, or turn them off altogether."
|
||||
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL="Manage JCB Package Directories"
|
||||
COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION="Manual Selection"
|
||||
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION="Add the prefix you would like to use. Make sure that it is HTML Character Entities since it is being used in XML."
|
||||
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT="»"
|
||||
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix<br />
|
||||
<small><a href='https://dev.w3.org/html5/html-author/charref' target='_blank'>check this list out</a></small>"
|
||||
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_CONFIG_MINIFY_DESCRIPTION="Should the JavaScript be minified when compiled."
|
||||
COM_COMPONENTBUILDER_CONFIG_MINIFY_LABEL="Minify JS"
|
||||
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE="Never update"
|
||||
@ -2414,6 +2474,10 @@ COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_DESCRIPTION="The compiler
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_LABEL="Moving The Compiler Folder"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_DESCRIPTION="The custom folder is where all files and folders that you would like to include in your components are stored, the default location is [administrator/components/com_componentbuilder/custom]. You can move this folder by adding your own path here. Remember to move the content of the default custom folder to this new location."
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_LABEL="Moving The Custom Folder"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION="<p>This method is basically the way JCB has always worked by default.</p><p>You have a compiler area, once you have made changes you go to the compiler view and compile your component. Then you have the option to install and/or distribute the Joomla install package.</p><p>This can also be called the manual development method.</p>"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL="Default Development Method"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION="<p>This method adds auto expansion to the current Joomla automatically.</p><p>Below you setup the behaviour of a selected set of components that will be <b>auto build and installed</b>. So you do not need to manually compile and install those components any more, the system does all that automatically for you.</p><p>So your experience is that you change the field, view or something else in JCB and then the component in Joomla moments later reflect those changed automatically. The latency of the workflow is based on your <b>cronjob frequency</b> and the <b>size</b> of your component. You can pause the build in a few ways, one by actually <b>checking out/opening</b> the Joomla Component view of the component in JCB, or changing the state to unpublish, archive or trashed, or simply remove if from the list below.</p><p>This can also be called the automatic development method.</p>"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL="Expansion Development Method"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_DESCRIPTION="<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p>
|
||||
<script>
|
||||
jQuery(document).ready(function()
|
||||
@ -2444,24 +2508,34 @@ function vdm_dkim() {
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_LABEL="Server Configuration"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_DESCRIPTION="You must set the folder where all the components should be deployed for git. You will have to still do your git commit and other git commands yourself. Each component will create their own folder inside this git folder."
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_LABEL="Adding git to your compiler method"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION="<p>Here you can select the main/global language that you are using to build components. This is the language you use for field label, descriptions. view names and well everything language related across the whole JCB build interface.</p><p><b>You should not change this global language option once you have set it</b> as this will cause major confusion, that will cause languages to get mixed-up very badly.</p><p>Also make sure that if you import a JCB package from other developers that they use the same language as you selected here.</p><p>At this time best practice is to use <b>en-GB</b> since this has been the default language since the start of the project and will remain VDM's default for years to come, and if you import our JCB packages all the source language strings are in en-GB. English GB is also the source/main language for Joomla.</p>"
|
||||
COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL="Global Language Source"
|
||||
COM_COMPONENTBUILDER_CONFIG_OFF="Off"
|
||||
COM_COMPONENTBUILDER_CONFIG_ON="On"
|
||||
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN="Only Boolean"
|
||||
COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra"
|
||||
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_DESCRIPTION="<code>[YEAR]</code> <code>[MONTH]</code> <code>[DAY]</code> <code>[HOUR]</code> <code>[MINUTE]</code>"
|
||||
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeholders"
|
||||
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation."
|
||||
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL="Add Language if %? ready."
|
||||
COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail"
|
||||
COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
|
||||
COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL="Add Custom Code Placeholders"
|
||||
COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER="Remote Server"
|
||||
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_DESCRIPTION="Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)"
|
||||
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_HINT="Reply Name Here"
|
||||
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply to Name"
|
||||
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION="Should the component be moved to your local repository folder?"
|
||||
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL="Add to Repository Folder"
|
||||
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION="Should the system return the build info/messages, or simply 1 for success and 0 for failure."
|
||||
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL="Return Options for Build"
|
||||
COM_COMPONENTBUILDER_CONFIG_SENDMAIL="Sendmail"
|
||||
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_DESCRIPTION="Enter the path to the sendmail program directory on your host server."
|
||||
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_HINT="/usr/sbin/sendmail"
|
||||
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_LABEL="Sendmail Path"
|
||||
COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_DESCRIPTION="Select if browser storage should be used to save on Ajax calls and speed up this components site pages."
|
||||
COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
|
||||
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
|
||||
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
|
||||
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
|
||||
@ -2493,6 +2567,7 @@ COM_COMPONENTBUILDER_CONFIG_UIKIT_MIN_DESC="Should the minified version of uikit
|
||||
COM_COMPONENTBUILDER_CONFIG_UIKIT_MIN_LABEL="Load Minified"
|
||||
COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_DESC="Set the css style that should be used."
|
||||
COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_LABEL="css Style"
|
||||
COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES="VDM Packages"
|
||||
COM_COMPONENTBUILDER_CONFIG_YES="Yes"
|
||||
COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING="Confirmation Step Before Importing!"
|
||||
COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor"
|
||||
@ -3232,7 +3307,7 @@ COM_COMPONENTBUILDER_DEFAULT_LINK="Default (link)"
|
||||
COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View"
|
||||
COM_COMPONENTBUILDER_DESCRIPTION="Description"
|
||||
COM_COMPONENTBUILDER_DETAILS="Details"
|
||||
COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS="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_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."
|
||||
@ -3563,9 +3638,7 @@ COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit ver
|
||||
COM_COMPONENTBUILDER_EMAIL="Email"
|
||||
COM_COMPONENTBUILDER_EMAIL_S="Email: %s"
|
||||
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send"
|
||||
COM_COMPONENTBUILDER_EMAUTHOREM_BSB="<em>Author</em>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="<em>Company:</em> <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB="<em>Company Name</em>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="<em>Copyright:</em> <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMEMAILEM_BSB="<em>Email:</em> <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMLICENSEEM_BSB="<em>License:</em> <b>%s</b>"
|
||||
@ -3582,11 +3655,11 @@ COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 tex
|
||||
COM_COMPONENTBUILDER_EXAMPLE="Example"
|
||||
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
|
||||
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
|
||||
COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components"
|
||||
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
|
||||
COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data."
|
||||
COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed"
|
||||
COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!"
|
||||
COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES="Export JCB Packages"
|
||||
COM_COMPONENTBUILDER_EXTRA_PROPERTIES_LIKE_LISTCLASS_ESCAPE_DISPLAY_VALIDATEBR_SMALLHERE_YOU_CAN_SET_THE_EXTRA_PROPERTIES_FOR_THIS_FIELDSMALL="Extra properties like (listclass, escape, display, validate)<br /><small>Here you can set the extra properties for this field</small>"
|
||||
COM_COMPONENTBUILDER_FIELD="Field"
|
||||
COM_COMPONENTBUILDER_FIELDS="Fields"
|
||||
@ -3834,6 +3907,8 @@ COM_COMPONENTBUILDER_FIELD_NEW="A New Field"
|
||||
COM_COMPONENTBUILDER_FIELD_NO="No"
|
||||
COM_COMPONENTBUILDER_FIELD_NONE="None"
|
||||
COM_COMPONENTBUILDER_FIELD_NONE_SET="None Set"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_DESCRIPTION="<p>Set the database column for this field here. The column will have the same name as the field. Please take care to select these settings in the correct relationship. The nature of this area is to give you as much freedom/power as you would like, but with that comes responsibility.</p><p>You therefore need to insure that you know what the correct values should be. A great way to learn, is to look at the Joomla core components fields and the corresponding mySql columns.</p>"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_DATABASE_SETTINGS_NEEDED_LABEL="Database Settings"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form-horizontal'>
|
||||
<div class='span4'>
|
||||
<h1>Filter Information</h1>
|
||||
@ -3921,6 +3996,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>
|
||||
</div>"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_DESCRIPTION="This field does not require any database settings to function correctly."
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_LABEL="No Database Require"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION="Please select a field type that you would like to build."
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL="Building a field"
|
||||
COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br />
|
||||
@ -3941,6 +4018,7 @@ COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions"
|
||||
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing"
|
||||
COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias."
|
||||
COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts"
|
||||
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION="Select an option"
|
||||
COM_COMPONENTBUILDER_FIELD_SET_PROPERTIES="Set Properties"
|
||||
COM_COMPONENTBUILDER_FIELD_SEVEN="7"
|
||||
COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR="64"
|
||||
@ -3966,13 +4044,14 @@ COM_COMPONENTBUILDER_FIELD_ZERO="0"
|
||||
COM_COMPONENTBUILDER_FILE="File"
|
||||
COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED="File <b>%s</b> could not be unlocked!"
|
||||
COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_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_FILTER="Filter"
|
||||
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_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_FREEOPEN="Free/Open"
|
||||
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab"
|
||||
COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
|
||||
COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: <b>%s</b>"
|
||||
@ -4119,11 +4198,14 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_VERSION_LABEL="Revision"
|
||||
COM_COMPONENTBUILDER_HELP_MANAGER="Help"
|
||||
COM_COMPONENTBUILDER_HI="Hi"
|
||||
COM_COMPONENTBUILDER_HIDE="Hide"
|
||||
COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM="How to get <a %s >free keys</a> from VDM."
|
||||
COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>"
|
||||
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to <b>key error</b>, or 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_IAUTHORI_BSB="<i>Author</i>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB="<i>Company Name</i>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_ICON="Icon"
|
||||
COM_COMPONENTBUILDER_IMPORT_COMPONENTS="Import Components"
|
||||
COM_COMPONENTBUILDER_IEMAILI_BSB="<i>Email</i>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue"
|
||||
COM_COMPONENTBUILDER_IMPORT_DATA="Import Data"
|
||||
COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data."
|
||||
@ -4136,6 +4218,7 @@ COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD="Upload"
|
||||
COM_COMPONENTBUILDER_IMPORT_FROM_URL="URL"
|
||||
COM_COMPONENTBUILDER_IMPORT_GET_BOTTON="Get File"
|
||||
COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN="-- Ignore This Column --"
|
||||
COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES="Import JCB Packages"
|
||||
COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS="Link File to Table Columns"
|
||||
COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE="Does not have a valid file type."
|
||||
COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL="Please enter a url."
|
||||
@ -4182,8 +4265,11 @@ COM_COMPONENTBUILDER_ISOLATE="Isolate"
|
||||
COM_COMPONENTBUILDER_ISSUE="issue"
|
||||
COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)"
|
||||
COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)"
|
||||
COM_COMPONENTBUILDER_IWEBSITEI_BSB="<i>Website</i>: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community"
|
||||
COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
|
||||
COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets"
|
||||
COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you <b>not to continue</b> with the import of the selected package!"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access"
|
||||
@ -4308,6 +4394,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL="MySQL"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_DESCRIPTION="To build the component fields and back-end views dynamically using a mySQL table file."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME="Companyname"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here"
|
||||
@ -4372,8 +4460,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_DESCRIPTION="Enter link wh
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_MESSAGE="Error! Please add link here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Export Components Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export components button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY="Export Key"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_DESCRIPTION="The key used to lock the data during export."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT="Export Key Here"
|
||||
@ -4389,8 +4477,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT="Javascript"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_HINT="// JavaScript for the entire back-end"
|
||||
@ -4696,6 +4784,8 @@ COM_COMPONENTBUILDER_LANGUAGES_N_ITEMS_UNPUBLISHED="%s Languages unpublished."
|
||||
COM_COMPONENTBUILDER_LANGUAGES_N_ITEMS_UNPUBLISHED_1="%s Language unpublished."
|
||||
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu"
|
||||
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to update the submenu of the language"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_DESC="The user that created this Language."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_LABEL="Created By"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_CREATED_DATE_DESC="The date this Language was created."
|
||||
@ -4777,10 +4867,6 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_DESC="The date this Langu
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_LABEL="Created Date"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS="Details"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT="Editing the Language Translation"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION="Entranslation"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_HINT="Automatically generated!"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL="English String"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_MESSAGE="Error! Please English translated string here."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Language Translation has the same alias."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID="Id"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE="Language"
|
||||
@ -4794,6 +4880,10 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ORDERING_LABEL="Ordering"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION="Permissions"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PUBLISHING="Publishing"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Language Translation to customise the alias."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE="Source"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_HINT="Automatically generated!"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL="Source String"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE="Error! Please source translated string here."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
|
||||
@ -5171,12 +5261,12 @@ COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_CONSTANT_PATHS_DESCRIPTION=
|
||||
<b>JPATH_BASE</b><br />
|
||||
// The path to the cache folder.<br />
|
||||
<b>JPATH_CACHE</b><br />
|
||||
// The path to the administration folder of the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT_ADMINISTRATOR</b><br />
|
||||
// The path to the site folder of the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT_SITE</b><br />
|
||||
// The path to the current component being executed.<br />
|
||||
<b>JPATH_COMPONENT</b><br />
|
||||
// The path to the administration folder of JCB component.<br />
|
||||
<b>JPATH_COMPONENT_ADMINISTRATOR</b> <small>no ideal to use</small><br />
|
||||
// The path to the site folder of JCB component.<br />
|
||||
<b>JPATH_COMPONENT_SITE</b> <small>no ideal to use</small><br />
|
||||
// The path to the JCB component.<br />
|
||||
<b>JPATH_COMPONENT</b> <small>no ideal to use</small><br />
|
||||
// The path to folder containing the configuration.php file.<br />
|
||||
<b>JPATH_CONFIGURATION</b><br />
|
||||
// The path to the installation folder.<br />
|
||||
@ -5316,6 +5406,8 @@ COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour"
|
||||
COM_COMPONENTBUILDER_MATCH_FIELD="Match Field"
|
||||
COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options"
|
||||
COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)"
|
||||
COM_COMPONENTBUILDER_MERGE="Merge"
|
||||
COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT="Minify JavaScript"
|
||||
COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)"
|
||||
COM_COMPONENTBUILDER_NAME="Name"
|
||||
COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)"
|
||||
@ -5328,11 +5420,14 @@ COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_S
|
||||
COM_COMPONENTBUILDER_NEW_NOTICE="New Notice"
|
||||
COM_COMPONENTBUILDER_NO="No"
|
||||
COM_COMPONENTBUILDER_NONE_DB="None DB"
|
||||
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
|
||||
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
|
||||
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
|
||||
COM_COMPONENTBUILDER_NOT_SET="not set"
|
||||
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
|
||||
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
|
||||
COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE="No component details found, so it is not safe to continue!"
|
||||
COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN="No component was selected, please make a selection of one component and try again!"
|
||||
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)"
|
||||
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested."
|
||||
COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND="No description found."
|
||||
@ -5340,6 +5435,7 @@ COM_COMPONENTBUILDER_NO_FILES_LINKED="No Files Linked"
|
||||
COM_COMPONENTBUILDER_NO_FOUND="No Found"
|
||||
COM_COMPONENTBUILDER_NO_ITEM_FOUND="No Item Found"
|
||||
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
|
||||
COM_COMPONENTBUILDER_NO_LANGUAGES_UPDATE_SERVER_FOUND="No Languages Update server found."
|
||||
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
|
||||
COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match"
|
||||
COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
|
||||
@ -5348,6 +5444,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_VALIDATION_RULES_FOUND="No validation rules found."
|
||||
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
|
||||
COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ONE_AND_TRY_AGAIN="Only one component can be cloned at a time, please select one and try again!"
|
||||
COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the <b>None DB</b> option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database."
|
||||
COM_COMPONENTBUILDER_ON_GITHUB="on Github"
|
||||
COM_COMPONENTBUILDER_OPEN="Open"
|
||||
@ -5363,10 +5460,12 @@ COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
|
||||
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
|
||||
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
|
||||
COM_COMPONENTBUILDER_PACKAGE="Package"
|
||||
COM_COMPONENTBUILDER_PACKAGES_FROM_JCB_COMMUNITY="Packages from JCB Community"
|
||||
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
||||
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
|
||||
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>"
|
||||
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: <code>%s</code> <br />%s %s"
|
||||
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
||||
@ -5562,10 +5661,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_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
|
||||
COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?"
|
||||
COM_COMPONENTBUILDER_SHOULD_THE_JAVASCRIPT_BE_MINIFIED_IN_THE_COMPONENT="Should the JavaScript be minified in the component."
|
||||
COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set."
|
||||
COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW="Should this field be escaped in the list view."
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import."
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported."
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_MERGE_THE_COMPONENTS_WITH_SIMILAR_LOCAL_COMPONENTS_MERGING_THE_COMPONENTS_USE_TO_BE_THE_DEFAULT_BEHAVIOUR_BUT_NOW_YOU_CAN_IMPORT_THE_COMPONENTS_AND_FORCE_IT_NOT_TO_MERGE_THE_FOLLOWING_AREAS_VALIDATION_RULE_FIELDTYPE_SNIPPET_LANGUAGE_LANGUAGE_TRANSLATION_BMUST_AND_WILL_STILLB_MERGE_EVEN_OF_YOUR_SELECTION_IS_BNOB_BECAUSE_OF_THE_SINGULAR_NATURE_OF_THOSE_AREAS="Should we merge the component/s with similar local component/s. Merging the component/s use to be the default behaviour, but now you can import the component/s and force it not to merge. The following areas (validation_rule, fieldtype, snippet, language, language_translation) <b>must and will still</b> merge even of your selection is <b>No</b>, because of the singular nature of those areas."
|
||||
COM_COMPONENTBUILDER_SHOW="Show"
|
||||
COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW="Show in list view"
|
||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
|
||||
@ -6386,7 +6487,8 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no
|
||||
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
|
||||
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
|
||||
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
|
||||
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the [Get Package] button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
|
||||
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
|
||||
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
|
||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
|
||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
|
||||
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
|
||||
@ -6406,6 +6508,7 @@ COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL="The Component with all linked admin views, fields linked to admin views, custom admin views, site views, templates and layouts were cloned successful!"
|
||||
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
|
||||
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
|
||||
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
|
||||
@ -6426,7 +6529,7 @@ COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Succ
|
||||
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
|
||||
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
|
||||
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> checksum validation! Please validate this checksum: <b>%s</b> to be the same as the one found @ <a %s %s</a>"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> the checksum validation!<br /><br /><small>Manually also validate that the correct checksum was used.</small><br />This checksum: <b>%s</b> must be the same as the one found @ <a %s %s</a>"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
|
||||
COM_COMPONENTBUILDER_TITLE="Title"
|
||||
COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads"
|
||||
@ -6565,6 +6668,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_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component <b>zip</b> package you would like to import.<br /><small>Please note that smart component import only works with the following format: <b>(.zip)</b></small>"
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_SHARE_THE_SNIPPETS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to share the snippets, please contact your system administrator for more help."
|
||||
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_FIFTY_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then 50 %s is considered bad practice."
|
||||
@ -6577,6 +6681,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_WILL_NEED_TO_KNOW_HOW_S_WORKS_BASIC_YOU_WILL_ALSO_NEED_A_S_ACCOUNT_AND_KNOW_HOW_TO_MAKE_A_PULL_REQUEST_ON_GITHUB="you will need to know how %s works (basic). You will also need a %s account and know how to make a pull request on github."
|
||||
COM_COMPONENTBUILDER_ZIPPED_FILE_LOCATION="Zipped File Location"
|
||||
COM_COMPONENTBUILDER__ADD_YOUR_PHP_SCRIPT_HERE="// Add your php script here"
|
||||
COM_COMPONENTBUILDER__SELECT_COMPONENT_="- Select Component -"
|
||||
COM_COMPONENTBUILDER__SELECT_PACKAGE_="- Select Package -"
|
||||
COM_COMPONENTBUILDER__SINCE_YOU_DONT_HAVE_PERMISSION_TO_CREATE_S=", since you don't have permission to create %s!"
|
||||
|
@ -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_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Export Components Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export components button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
|
||||
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
|
||||
COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages"
|
||||
COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use"
|
||||
@ -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_SUBMENU="Languages Submenu"
|
||||
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to update the submenu of the language"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS="Language Translations Access"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC="Allows the users in this group to access access language translations"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE="Language Translations Batch Use"
|
||||
|
49
admin/layouts/field/data_base_fullwidth.php
Normal file
49
admin/layouts/field/data_base_fullwidth.php
Normal 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>
|
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
$form = $displayData->getForm();
|
||||
|
||||
$fields = $displayData->get('fields') ?: array(
|
||||
'entranslation',
|
||||
'source',
|
||||
'translation',
|
||||
'components'
|
||||
);
|
||||
|
@ -100,62 +100,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode html_import_view.
|
||||
@ -360,6 +304,62 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
|
@ -116,6 +116,29 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the JCB package info (html)
|
||||
**/
|
||||
public function getJCBpackageInfo($url)
|
||||
{
|
||||
// convert URL
|
||||
$url = str_replace('.zip', '.info', $url);
|
||||
// check if url exist
|
||||
if ($info = ComponentbuilderHelper::getFileContents($url, false))
|
||||
{
|
||||
// Get the encryption object.
|
||||
$opener = new FOFEncryptAes('V4stD3vel0pmEntMethOd@YoUrS3rv!s', 128);
|
||||
$info = rtrim($opener->decryptString($info), "\0");
|
||||
// check if we have json
|
||||
if (ComponentbuilderHelper::checkJson($info))
|
||||
{
|
||||
$info = json_decode($info, true);
|
||||
return array('owner' => ComponentbuilderHelper::getPackageOwnerDetailsDisplay($info, true), 'packages' => ComponentbuilderHelper::getPackageComponentsDetailsDisplay($info));
|
||||
}
|
||||
}
|
||||
return array('error' => JText::_('COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE'));
|
||||
}
|
||||
|
||||
/**
|
||||
* set the component display
|
||||
**/
|
||||
@ -168,6 +191,19 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
}
|
||||
$result['path'] = '<code>' . $path . '</code>';
|
||||
}
|
||||
elseif ('expand' === $type)
|
||||
{
|
||||
$result['error'] = '<span style="color: red;">' . JText::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . '</span>';
|
||||
if ($this->hasCurl())
|
||||
{
|
||||
$path = '* * * * * curl -s "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = '* * * * * wget "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand" >/dev/null 2>&1';
|
||||
}
|
||||
$result['path'] = '<code>' . $path . '</code>';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1362,14 +1398,14 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
// set table
|
||||
$table = false;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.alias','a.template','b.name')));
|
||||
$query->select($db->quoteName(array('a.id','a.alias','a.template','b.name','a.dynamic_get')));
|
||||
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
|
||||
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
@ -1377,9 +1413,20 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
{
|
||||
$results = $db->loadObjectList();
|
||||
$templateString = array();
|
||||
// get the view name & id
|
||||
$values = $this->getViewID();
|
||||
// check if we are in the correct view.
|
||||
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
|
||||
{
|
||||
// set the return ref
|
||||
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
|
||||
}
|
||||
foreach ($results as $result)
|
||||
{
|
||||
$templateString[] = "<td><b>".$result->name."</b></td><td><code><?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?></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><?php echo \$this->loadTemplate('".ComponentbuilderHelper::safeString($result->alias)."'); ?></code> ".$edit."</td>";
|
||||
}
|
||||
// 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">';
|
||||
@ -1396,14 +1443,14 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
// set table
|
||||
$table = false;
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.alias','a.layout','b.getcustom','b.gettype','b.name')));
|
||||
$query->select($db->quoteName(array('a.id','a.alias','a.layout','b.getcustom','b.gettype','b.name','a.dynamic_get')));
|
||||
$query->from($db->quoteName('#__componentbuilder_layout', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'b') . ' ON (' . $db->quoteName('b.id') . ' = ' . $db->quoteName('a.dynamic_get') . ')');
|
||||
$query->where($db->quoteName('a.id') . ' != '.(int) $id);
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
@ -1411,17 +1458,29 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
{
|
||||
$results = $db->loadObjectList();
|
||||
$layoutString = array();
|
||||
// get the view name & id
|
||||
$values = $this->getViewID();
|
||||
// check if we are in the correct view.
|
||||
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']))
|
||||
{
|
||||
// set the return ref
|
||||
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
|
||||
}
|
||||
foreach ($results as $result)
|
||||
{
|
||||
$edit = ($button = $this->addEditLink($result->id, 'layout', 'layouts')) ? $button : '';
|
||||
$editget = (isset($result->dynamic_get) && $result->dynamic_get > 0 && $button = $this->addEditLink($result->dynamic_get, 'dynamic_get', 'dynamic_gets')) ? $button : '';
|
||||
$result->name = (ComponentbuilderHelper::checkString($result->name)) ? $result->name : JText::_('COM_COMPONENTBUILDER_NONE_SELECTED');
|
||||
|
||||
switch ($result->gettype)
|
||||
{
|
||||
case 1:
|
||||
// single
|
||||
$layoutString[] = "<td><b>".$result->name."</b></td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?></code></td>";
|
||||
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->item); ?></code> ".$edit."</td>";
|
||||
break;
|
||||
case 2:
|
||||
// list
|
||||
$layoutString[] = "<td><b>".$result->name."</b></td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?></code></td>";
|
||||
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->items); ?></code> ".$edit."</td>";
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
@ -1435,7 +1494,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
{
|
||||
$varName = $result->getcustom;
|
||||
}
|
||||
$layoutString[] = "<td><b>".$result->name."</b></td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?></code></td>";
|
||||
$layoutString[] = "<td><b>".$result->name."</b> ".$editget."</td><td><code><?php echo JLayoutHelper::render('".ComponentbuilderHelper::safeString($result->alias)."', \$this->".$varName."); ?></code> ".$edit."</td>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2220,7 +2279,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
protected $extraFieldProperties = array(
|
||||
'listclass' => 'COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD',
|
||||
'escape' => 'COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW',
|
||||
'display' => 'COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS',
|
||||
'display' => 'COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA',
|
||||
'validate' => 'COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED');
|
||||
|
||||
public function getFieldOptions($fieldtype)
|
||||
@ -2244,6 +2303,20 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
// load the html
|
||||
$field['subform'] = '<div class="control-label prop_removal">'. $properties->label . '</div><div class="controls prop_removal">' . $properties->input . '</div>';
|
||||
$field['extra'] = '<div class="control-label prop_removal">'. $extras->label . '</div><div class="controls prop_removal">' . $extras->input . '</div>';
|
||||
// check if we have PHP values
|
||||
if (ComponentbuilderHelper::checkArray($field['php']))
|
||||
{
|
||||
$field['textarea'] = array();
|
||||
foreach($field['php'] as $name => $values)
|
||||
{
|
||||
$value = implode(PHP_EOL, $values['value']);
|
||||
$textarea = $this->buildFieldTexteara($name, $values['desc'], $value, substr_count( $value, PHP_EOL ));
|
||||
// load the html
|
||||
$field['textarea'][] = '<div class="control-label prop_removal">'. $textarea->label . '</div><div class="controls prop_removal">' . $textarea->input . '</div><br />';
|
||||
}
|
||||
}
|
||||
// remove some unneeded values
|
||||
unset($field['values']);
|
||||
// return found field options
|
||||
return $field;
|
||||
}
|
||||
@ -2277,6 +2350,32 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function buildFieldTexteara($name, $desc, $default, $rows)
|
||||
{
|
||||
// get the textarea
|
||||
$textarea = JFormHelper::loadFieldType('textarea', true);
|
||||
// start building the name field XML
|
||||
$textareaXML = new SimpleXMLElement('<field/>');
|
||||
// textarea attributes
|
||||
$textareaAttribute = array(
|
||||
'type' => 'textarea',
|
||||
'name' => 'property_'.$name,
|
||||
'label' => $desc,
|
||||
'rows' => (int) ($rows >= 3) ? $rows : $rows + 2,
|
||||
'cols' => '15',
|
||||
'class' => 'text_area span12',
|
||||
'filter' => 'RAW',
|
||||
'hint' => 'COM_COMPONENTBUILDER__ADD_YOUR_PHP_SCRIPT_HERE');
|
||||
// load the textarea attributes
|
||||
ComponentbuilderHelper::xmlAddAttributes($textareaXML, $textareaAttribute);
|
||||
|
||||
// setup subform with values
|
||||
$textarea->setup($textareaXML, $default);
|
||||
|
||||
// return textarea object
|
||||
return $textarea;
|
||||
}
|
||||
|
||||
protected function buildFieldOptionsSubform($values, $nameListOptions = null, $name = 'properties', $label = 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL')
|
||||
{
|
||||
// get the subform
|
||||
|
@ -151,7 +151,7 @@ class ComponentbuilderModelCompiler extends JModelList
|
||||
}
|
||||
|
||||
public $compiler;
|
||||
|
||||
|
||||
public function getComponents()
|
||||
{
|
||||
// Get a db connection.
|
||||
@ -169,17 +169,18 @@ class ComponentbuilderModelCompiler extends JModelList
|
||||
// return the result
|
||||
return $db->loadObjectList();
|
||||
}
|
||||
|
||||
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr)
|
||||
{
|
||||
$set['joomlaVersion'] = $version;
|
||||
$set['componentId'] = $id;
|
||||
$set['addBackup'] = $backup;
|
||||
$set['addRepo'] = $repo;
|
||||
$set['addPlaceholders'] = $addPlaceholders;
|
||||
$set['debugLinenr'] = $debugLinenr;
|
||||
|
||||
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
|
||||
{
|
||||
$set['version'] = $version;
|
||||
$set['component'] = $id;
|
||||
$set['backup'] = $backup;
|
||||
$set['repository'] = $repo;
|
||||
$set['placeholders'] = $addPlaceholders;
|
||||
$set['debuglinenr'] = $debugLinenr;
|
||||
$set['minify'] = $minify;
|
||||
// start up Compiler
|
||||
$this->compiler = new Compiler($set);
|
||||
$this->compiler = new Compiler($set);
|
||||
if($this->compiler)
|
||||
{
|
||||
return true;
|
||||
|
@ -95,6 +95,12 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_dashboard_methods))
|
||||
{
|
||||
// base64 Decode php_dashboard_methods.
|
||||
$item->php_dashboard_methods = base64_decode($item->php_dashboard_methods);
|
||||
}
|
||||
|
||||
if (!empty($item->dashboard_tab))
|
||||
{
|
||||
// Convert the dashboard_tab field to an array.
|
||||
@ -103,12 +109,6 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
$item->dashboard_tab = $dashboard_tab->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_dashboard_methods))
|
||||
{
|
||||
// base64 Decode php_dashboard_methods.
|
||||
$item->php_dashboard_methods = base64_decode($item->php_dashboard_methods);
|
||||
}
|
||||
|
||||
// update the fields
|
||||
$objectUpdate = new stdClass();
|
||||
$objectUpdate->id = (int) $item->id;
|
||||
|
@ -100,38 +100,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->ajax_input))
|
||||
{
|
||||
// Convert the ajax_input field to an array.
|
||||
$ajax_input = new Registry;
|
||||
$ajax_input->loadString($item->ajax_input);
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->libraries))
|
||||
{
|
||||
// Convert the libraries field to an array.
|
||||
$libraries = new Registry;
|
||||
$libraries->loadString($item->libraries);
|
||||
$item->libraries = $libraries->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_get))
|
||||
{
|
||||
// Convert the custom_get field to an array.
|
||||
$custom_get = new Registry;
|
||||
$custom_get->loadString($item->custom_get);
|
||||
$item->custom_get = $custom_get->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_button))
|
||||
{
|
||||
// Convert the custom_button field to an array.
|
||||
$custom_button = new Registry;
|
||||
$custom_button->loadString($item->custom_button);
|
||||
$item->custom_button = $custom_button->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_jview_display))
|
||||
{
|
||||
// base64 Decode php_jview_display.
|
||||
@ -204,6 +172,38 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
$item->php_model = base64_decode($item->php_model);
|
||||
}
|
||||
|
||||
if (!empty($item->ajax_input))
|
||||
{
|
||||
// Convert the ajax_input field to an array.
|
||||
$ajax_input = new Registry;
|
||||
$ajax_input->loadString($item->ajax_input);
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->libraries))
|
||||
{
|
||||
// Convert the libraries field to an array.
|
||||
$libraries = new Registry;
|
||||
$libraries->loadString($item->libraries);
|
||||
$item->libraries = $libraries->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_get))
|
||||
{
|
||||
// Convert the custom_get field to an array.
|
||||
$custom_get = new Registry;
|
||||
$custom_get->loadString($item->custom_get);
|
||||
$item->custom_get = $custom_get->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_button))
|
||||
{
|
||||
// Convert the custom_button field to an array.
|
||||
$custom_button = new Registry;
|
||||
$custom_button->loadString($item->custom_button);
|
||||
$item->custom_button = $custom_button->toArray();
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
|
@ -100,54 +100,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->filter))
|
||||
{
|
||||
// Convert the filter field to an array.
|
||||
$filter = new Registry;
|
||||
$filter->loadString($item->filter);
|
||||
$item->filter = $filter->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->where))
|
||||
{
|
||||
// Convert the where field to an array.
|
||||
$where = new Registry;
|
||||
$where->loadString($item->where);
|
||||
$item->where = $where->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->order))
|
||||
{
|
||||
// Convert the order field to an array.
|
||||
$order = new Registry;
|
||||
$order->loadString($item->order);
|
||||
$item->order = $order->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->global))
|
||||
{
|
||||
// Convert the global field to an array.
|
||||
$global = new Registry;
|
||||
$global->loadString($item->global);
|
||||
$item->global = $global->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_view_table))
|
||||
{
|
||||
// Convert the join_view_table field to an array.
|
||||
$join_view_table = new Registry;
|
||||
$join_view_table->loadString($item->join_view_table);
|
||||
$item->join_view_table = $join_view_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_db_table))
|
||||
{
|
||||
// Convert the join_db_table field to an array.
|
||||
$join_db_table = new Registry;
|
||||
$join_db_table->loadString($item->join_db_table);
|
||||
$item->join_db_table = $join_db_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_custom_get))
|
||||
{
|
||||
// base64 Decode php_custom_get.
|
||||
@ -196,6 +148,54 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$item->php_calculation = base64_decode($item->php_calculation);
|
||||
}
|
||||
|
||||
if (!empty($item->filter))
|
||||
{
|
||||
// Convert the filter field to an array.
|
||||
$filter = new Registry;
|
||||
$filter->loadString($item->filter);
|
||||
$item->filter = $filter->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->where))
|
||||
{
|
||||
// Convert the where field to an array.
|
||||
$where = new Registry;
|
||||
$where->loadString($item->where);
|
||||
$item->where = $where->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->order))
|
||||
{
|
||||
// Convert the order field to an array.
|
||||
$order = new Registry;
|
||||
$order->loadString($item->order);
|
||||
$item->order = $order->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->global))
|
||||
{
|
||||
// Convert the global field to an array.
|
||||
$global = new Registry;
|
||||
$global->loadString($item->global);
|
||||
$item->global = $global->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_view_table))
|
||||
{
|
||||
// Convert the join_view_table field to an array.
|
||||
$join_view_table = new Registry;
|
||||
$join_view_table->loadString($item->join_view_table);
|
||||
$item->join_view_table = $join_view_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_db_table))
|
||||
{
|
||||
// Convert the join_db_table field to an array.
|
||||
$join_db_table = new Registry;
|
||||
$join_db_table->loadString($item->join_db_table);
|
||||
$item->join_db_table = $join_db_table->toArray();
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
|
@ -100,18 +100,6 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode css_views.
|
||||
@ -124,12 +112,24 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode 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))
|
||||
{
|
||||
@ -893,6 +893,10 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$properties = $input->get('properties', null, 'ARRAY');
|
||||
// get the extra properties
|
||||
$extraproperties = $input->get('extraproperties', null, 'ARRAY');
|
||||
// get the type phpx property
|
||||
$typephpx = $input->get('property_type_phpx', null, 'RAW');
|
||||
// get the type php property
|
||||
$typephp = $input->get('property_type_php', null, 'RAW');
|
||||
// make sure we have an array
|
||||
if (ComponentbuilderHelper::checkArray($properties))
|
||||
{
|
||||
@ -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 (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']);
|
||||
}
|
||||
|
||||
// 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.
|
||||
if (isset($data['css_views']))
|
||||
{
|
||||
@ -962,6 +972,12 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$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.
|
||||
if (isset($data['javascript_views_footer']))
|
||||
{
|
||||
|
@ -184,6 +184,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
if ($name === 'datatype')
|
||||
{
|
||||
$datatypeArray = array(
|
||||
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
|
||||
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
|
||||
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
|
||||
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',
|
||||
@ -431,12 +432,12 @@ class ComponentbuilderModelFields extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode css_views
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// decode css_view
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode javascript_views_footer
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// unset the values we don't want exported.
|
||||
|
@ -150,23 +150,24 @@ class JFormFieldComponent extends JFormFieldList
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->component_system_name);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->component_system_name);
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -49,23 +49,23 @@ class JFormFieldLang extends JFormFieldList
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_language', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.langtag ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','language_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_language', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.langtag ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
if ($name === 'datatype')
|
||||
{
|
||||
$datatypeArray = array(
|
||||
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
|
||||
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
|
||||
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
|
||||
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',
|
||||
|
@ -105,7 +105,8 @@
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION"
|
||||
icon="list">
|
||||
icon="list"
|
||||
min="1">
|
||||
<form hidden="true" name="list_addfields_modal" repeat="true">
|
||||
<!-- Field Field. Type: Fields. (custom) -->
|
||||
<field
|
||||
@ -158,6 +159,7 @@
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION"
|
||||
class="inputbox"
|
||||
onchange="checkTitle(this)"
|
||||
/>
|
||||
<!-- Alias Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
@ -168,6 +170,7 @@
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION"
|
||||
class="inputbox"
|
||||
onchange="checkAlias(this)"
|
||||
/>
|
||||
<!-- Sort Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
|
@ -1140,7 +1140,8 @@
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
icon="list">
|
||||
icon="list"
|
||||
max="20">
|
||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||
<field
|
||||
|
@ -105,7 +105,8 @@
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
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">
|
||||
<!-- Adminview Field. Type: Adminviews. (custom) -->
|
||||
<field
|
||||
|
@ -544,7 +544,7 @@ function getDynamicValues(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
@ -570,7 +570,7 @@ function getLayoutDetails(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
|
@ -611,7 +611,8 @@
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_BUTTON_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
icon="list">
|
||||
icon="list"
|
||||
max="20">
|
||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||
<field
|
||||
|
@ -521,6 +521,10 @@ jQuery(document).ready(function()
|
||||
getValidationRulesTable();
|
||||
// set button to create more fields
|
||||
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){
|
||||
@ -601,6 +605,13 @@ function getFieldOptions(fieldtype){
|
||||
// append to note_filter_information class
|
||||
jQuery('.note_filter_information').closest('.control-group').prepend(result.extra);
|
||||
// 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);
|
||||
// add the watcher
|
||||
rowWatcher();
|
||||
@ -763,4 +774,51 @@ function getValidationRulesTable(){
|
||||
jQuery('#display_validation_rules').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -122,6 +122,8 @@
|
||||
multiple="false"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION</option>
|
||||
<option value="CHAR">
|
||||
COM_COMPONENTBUILDER_FIELD_CHAR</option>
|
||||
<option value="VARCHAR">
|
||||
@ -217,33 +219,6 @@
|
||||
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
|
||||
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) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -298,64 +273,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||
</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" />
|
||||
<!-- 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"
|
||||
/>
|
||||
<!-- Note_database_settings_needed Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<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" />
|
||||
<!-- Datalenght Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
@ -404,8 +323,95 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_FIELD_NO</option>
|
||||
</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) -->
|
||||
<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) -->
|
||||
<field
|
||||
type="textarea"
|
||||
|
@ -85,18 +85,18 @@
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Entranslation Field. Type: Textarea. (joomla) -->
|
||||
<!-- Source Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="entranslation"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL"
|
||||
name="source"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL"
|
||||
rows="4"
|
||||
cols="5"
|
||||
description="JFIELD_TITLE_DESC"
|
||||
message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_MESSAGE"
|
||||
message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE"
|
||||
class="text_area span12"
|
||||
filter="STRING"
|
||||
hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_HINT"
|
||||
filter="safehtml"
|
||||
hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_HINT"
|
||||
readonly="true"
|
||||
disabled="true"
|
||||
/>
|
||||
|
@ -178,7 +178,7 @@ function getDynamicValues(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ function getDynamicValues(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
@ -611,7 +611,7 @@ function getLayoutDetails(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
|
@ -630,7 +630,8 @@
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_BUTTON_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
icon="list">
|
||||
icon="list"
|
||||
max="20">
|
||||
<form hidden="true" name="list_custom_button_modal" repeat="true">
|
||||
<!-- Icomoon Field. Type: List. (joomla) -->
|
||||
<field
|
||||
|
@ -178,7 +178,7 @@ function getDynamicValues(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
@ -204,7 +204,7 @@ function getLayoutDetails(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){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
|
@ -80,21 +80,25 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
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 $data = false;
|
||||
protected $target = false;
|
||||
protected $newID = array();
|
||||
protected $forceUpdate = 0;
|
||||
protected $hasKey = 0;
|
||||
protected $sleutle = null;
|
||||
protected $updateAfter = array('field' => array(), 'adminview' => array());
|
||||
protected $divergedDataMover = array();
|
||||
protected $fieldTypes = array();
|
||||
protected $isMultiple = array();
|
||||
protected $specialValue = false;
|
||||
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/', 'jcb' => 'https://raw.githubusercontent.com/vdm-io/JCB-Community-Packages/master/');
|
||||
protected $mustMerge = array('validation_rule', 'fieldtype', 'snippet', 'language', 'language_translation');
|
||||
|
||||
/**
|
||||
* 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);
|
||||
// show more information
|
||||
$this->moreInfo = $this->app->input->getInt('more_info', 0);
|
||||
// allow merge
|
||||
$this->canmerge = $this->app->input->getInt('canmerge', 1);
|
||||
// has a key
|
||||
$this->hasKey = $this->app->input->getInt('haskey', 0);
|
||||
// die sleutle
|
||||
@ -298,7 +304,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
if ($checksums[$packageName] === sha1_file($package['dir']))
|
||||
{
|
||||
$validator = $this->checksumURLs[$this->checksum].str_replace('.zip', '.sha', $packageName);
|
||||
$checksumMessage = JText::sprintf('COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA', $checksums[$packageName], 'href="'.$validator.'" target="_blank" title="verify checksum">', $validator);
|
||||
$checksumMessage = JText::sprintf('COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA', $checksums[$packageName], 'href="'.$validator.'" target="_blank" title="verify checksum">', $validator);
|
||||
$checksumStatus = 'Success';
|
||||
$checksum = true;
|
||||
}
|
||||
@ -676,7 +682,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$this->data = $data;
|
||||
return true;
|
||||
}
|
||||
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE'), 'error');
|
||||
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE'), 'error');
|
||||
return false;
|
||||
}
|
||||
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE'), 'error');
|
||||
@ -695,6 +701,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
// set some defaults
|
||||
$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
|
||||
$tables = array(
|
||||
'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
|
||||
$this->updateAfter();
|
||||
$this->updateAfterAll();
|
||||
// finally move the old datasets
|
||||
$this->moveDivergedData();
|
||||
// lets move all the files to its correct location
|
||||
@ -727,12 +739,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
/**
|
||||
* Save the smart items
|
||||
*
|
||||
* @param string $type The type of values
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return boolean false on failure
|
||||
*
|
||||
**/
|
||||
protected function saveSmartItems($table)
|
||||
public function saveSmartItems($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');
|
||||
$canState = $canDo->get('core.edit.state');
|
||||
$canCreate = $canDo->get('core.create');
|
||||
// check if we should allow merge of local values
|
||||
$canmerge = $this->allowMerge($table);
|
||||
// set id keeper
|
||||
if (!isset($this->newID[$table]))
|
||||
{
|
||||
@ -750,7 +764,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
$oldID = (int) $item->id;
|
||||
// first check if exist
|
||||
if ($local = $this->getLocalItem($item, $table, 1))
|
||||
if ($canmerge && $local = $this->getLocalItem($item, $table, 1))
|
||||
{
|
||||
// display more import info
|
||||
if ($this->moreInfo)
|
||||
@ -821,6 +835,21 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
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
|
||||
*
|
||||
@ -844,7 +873,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
// great we have some custom stuff lets move it
|
||||
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;
|
||||
}
|
||||
// display more import info
|
||||
@ -860,7 +889,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
// great we have some images lets move them
|
||||
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;
|
||||
}
|
||||
// display more import info
|
||||
@ -884,7 +913,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
|
||||
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;
|
||||
}
|
||||
// display more import info
|
||||
@ -905,7 +934,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
|
||||
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;
|
||||
}
|
||||
// display more import info
|
||||
@ -989,7 +1018,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
protected function updateAfter()
|
||||
public function updateAfterAll()
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($this->updateAfter['field']))
|
||||
{
|
||||
@ -1068,7 +1097,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
if (ComponentbuilderHelper::checkJson($addlinked_views))
|
||||
{
|
||||
$addlinked_views = json_decode($addlinked_views, true);
|
||||
// convert Repetable Fields
|
||||
// convert Repeatable Fields
|
||||
if (ComponentbuilderHelper::checkArray($addlinked_views) && isset($addlinked_views['adminview']))
|
||||
{
|
||||
$addlinked_views = ComponentbuilderHelper::convertRepeatable($addlinked_views, 'addlinked_views');
|
||||
@ -1097,7 +1126,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
protected function moveDivergedData()
|
||||
public function moveDivergedData()
|
||||
{
|
||||
// check if there is data to move
|
||||
if (ComponentbuilderHelper::checkArray($this->divergedDataMover))
|
||||
@ -1356,7 +1385,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* object on success
|
||||
*
|
||||
**/
|
||||
protected function prepItem($item, &$type, $action, $diverged = false)
|
||||
protected function prepItem($item, $type, $action, $diverged = false)
|
||||
{
|
||||
// remove 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');
|
||||
return false;
|
||||
}
|
||||
// if we can't merge add postfix to name
|
||||
if ($this->postfix)
|
||||
{
|
||||
$item->name = $item->name.$this->postfix;
|
||||
}
|
||||
break;
|
||||
case 'dynamic_get':
|
||||
// update the view_table_main ID
|
||||
@ -1455,6 +1489,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
);
|
||||
// update the subform ids
|
||||
$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;
|
||||
case 'layout':
|
||||
case 'template':
|
||||
@ -1462,6 +1501,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$item = $this->setNewID($item, 'dynamic_get', 'dynamic_get', $type);
|
||||
// update the snippet
|
||||
$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;
|
||||
case 'custom_admin_view':
|
||||
case 'site_view':
|
||||
@ -1481,6 +1525,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
);
|
||||
// update the repeatable fields
|
||||
$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;
|
||||
case 'admin_view':
|
||||
// set the getters anchors
|
||||
@ -1530,6 +1579,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
);
|
||||
// update the repeatable fields
|
||||
$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;
|
||||
case 'joomla_component':
|
||||
// set the anchors getters
|
||||
@ -1656,6 +1710,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
);
|
||||
// update the repeatable fields
|
||||
$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;
|
||||
case 'component_admin_views':
|
||||
// diverged id already updated
|
||||
@ -1747,9 +1806,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
}
|
||||
// repeatable fields to update
|
||||
$updaterR = array(
|
||||
// repeatablefield => checker
|
||||
'sql_tweak' => 'adminview'
|
||||
);
|
||||
// repeatablefield => checker
|
||||
'sql_tweak' => 'adminview'
|
||||
);
|
||||
// update the repeatable fields
|
||||
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
|
||||
// subform fields to target
|
||||
@ -1947,6 +2006,13 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
{
|
||||
unset($item->localTranslation);
|
||||
}
|
||||
// move entranslation to source
|
||||
if (isset($item->entranslation))
|
||||
{
|
||||
$item->source = $item->entranslation;
|
||||
// also remove the old field
|
||||
unset($item->entranslation);
|
||||
}
|
||||
break;
|
||||
case 'admin_fields':
|
||||
case 'admin_fields_conditions':
|
||||
@ -2158,7 +2224,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* ID int on success
|
||||
*
|
||||
**/
|
||||
protected function updateLocalItem(&$item, &$type, &$canState)
|
||||
protected function updateLocalItem(&$item, $type, &$canState)
|
||||
{
|
||||
// prep the item
|
||||
if ($update = $this->prepItem($item, $type, 'update'))
|
||||
@ -2189,7 +2255,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* ID int on success
|
||||
*
|
||||
**/
|
||||
protected function addLocalItem(&$item, &$type, $diverged = false)
|
||||
protected function addLocalItem(&$item, $type, $diverged = false)
|
||||
{
|
||||
// prep the item
|
||||
if ($add = $this->prepItem($item, $type, 'add', $diverged))
|
||||
@ -2220,15 +2286,26 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
* 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->select('a.*');
|
||||
$query->from($this->_db->quoteName('#__componentbuilder_' . $type, 'a'));
|
||||
// only run query if where is set
|
||||
$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.id') .' = '. (int) $item->id);
|
||||
$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)
|
||||
{
|
||||
// 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}))
|
||||
elseif (isset($item->{$get}))
|
||||
{
|
||||
// set the value
|
||||
$value = $item->{$get};
|
||||
@ -2293,14 +2358,18 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
$value = $this->specialValue[$get];
|
||||
}
|
||||
// load to query
|
||||
if (is_int($value))
|
||||
if (is_numeric($value) && is_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);
|
||||
}
|
||||
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
|
||||
{
|
||||
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];
|
||||
}
|
||||
// (TODO) I have seen this happen, seems dangerous!
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'validation_rule':
|
||||
case 'fieldtype':
|
||||
@ -2490,27 +2564,31 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
|
||||
case 'component_config':
|
||||
case 'component_dashboard':
|
||||
case 'component_files_folders':
|
||||
// get by joomla_component (since there should only be one of each component)
|
||||
$getter = array('joomla_component');
|
||||
$this->specialValue = array();
|
||||
// Yet if diverged it makes sense that the ID is updated.
|
||||
if ($diverged)
|
||||
{
|
||||
$this->specialValue['joomla_component'] = (int) $item->joomla_component;
|
||||
}
|
||||
elseif (isset($this->newID['joomla_component'][(int) $item->joomla_component]))
|
||||
{
|
||||
$this->specialValue['joomla_component'] = $this->newID['joomla_component'][(int) $item->joomla_component];
|
||||
}
|
||||
// (TODO) I have seen this happen, seems dangerous!
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// get by joomla_component (since there should only be one of each component)
|
||||
$getter = array('joomla_component');
|
||||
$this->specialValue = array();
|
||||
// Yet if diverged it makes sense that the ID is updated.
|
||||
if ($diverged)
|
||||
{
|
||||
$this->specialValue['joomla_component'] = (int) $item->joomla_component;
|
||||
}
|
||||
elseif (isset($this->newID['joomla_component'][(int) $item->joomla_component]))
|
||||
{
|
||||
$this->specialValue['joomla_component'] = $this->newID['joomla_component'][(int) $item->joomla_component];
|
||||
}
|
||||
// (TODO) I have seen this happen, seems dangerous!
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'language_translation':
|
||||
// get by English translation since there should just be one
|
||||
$getter = 'entranslation';
|
||||
// get by source translation since there should just be one
|
||||
$getter = 'source';
|
||||
if (isset($item->entranslation))
|
||||
{
|
||||
$item->source = $item->entranslation;
|
||||
}
|
||||
break;
|
||||
case 'language':
|
||||
// get by language tag since there should just be one
|
||||
|
@ -470,12 +470,19 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
|
||||
$user = JFactory::getUser();
|
||||
// remove header if it has headers
|
||||
$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
|
||||
$firstSet = reset($data['array']);
|
||||
|
||||
// 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']);
|
||||
}
|
||||
@ -504,7 +511,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
|
||||
->select($db->quoteName(array('version', 'translation')))
|
||||
->from($db->quoteName('#__componentbuilder_'.$table))
|
||||
->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.
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
@ -538,7 +545,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
@ -100,14 +100,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode php_postflight_update.
|
||||
@ -221,6 +213,14 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
|
@ -80,18 +80,300 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
protected $params;
|
||||
protected $tempPath;
|
||||
protected $customPath;
|
||||
protected $smartExport = array();
|
||||
protected $exportIDs = array();
|
||||
protected $smartBox = array();
|
||||
protected $smartIDs = array();
|
||||
protected $customCodeM = array();
|
||||
protected $fieldTypes = 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
|
||||
*
|
||||
* @return bool on success.
|
||||
*/
|
||||
public function getSmartExport($pks)
|
||||
{
|
||||
// get the components
|
||||
if ($items = $this->getComponents($pks))
|
||||
{
|
||||
// set custom folder path
|
||||
$this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
|
||||
// check what type of export or backup this is
|
||||
if ('backup' === $this->activeType || 'manualBackup' === $this->activeType)
|
||||
{
|
||||
// set the paths
|
||||
if (!$this->backupPath = $this->params->get('cronjob_backup_folder_path', null))
|
||||
{
|
||||
// set the paths
|
||||
$comConfig = JFactory::getConfig();
|
||||
$this->backupPath = $comConfig->get('tmp_path');
|
||||
}
|
||||
// check what backup type we are working with here
|
||||
$this->backupType = $this->params->get('cronjob_backup_type', 1); // 1 = local folder; 2 = remote server (default is local)
|
||||
// if remote server get the ID
|
||||
if (2 == $this->backupType)
|
||||
{
|
||||
$this->backupServer = $this->params->get('cronjob_backup_server', null);
|
||||
}
|
||||
// set the date array
|
||||
$date = JFactory::getDate();
|
||||
$placeholderDate = array();
|
||||
$placeholderDate['[YEAR]'] = $date->format('Y');
|
||||
$placeholderDate['[MONTH]'] = $date->format('m');
|
||||
$placeholderDate['[DAY]'] = $date->format('d');
|
||||
$placeholderDate['[HOUR]'] = $date->format('H');
|
||||
$placeholderDate['[MINUTE]'] = $date->format('i');
|
||||
// get the package name
|
||||
$packageName = $this->params->get('backup_package_name', 'JCB_Backup_[YEAR]_[MONTH]_[DAY]');
|
||||
$this->packageName = str_replace(array_keys($placeholderDate), array_values($placeholderDate), $packageName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the paths
|
||||
$comConfig = JFactory::getConfig();
|
||||
$this->backupPath = $comConfig->get('tmp_path');
|
||||
// set the package name
|
||||
if (count($items) == 1)
|
||||
{
|
||||
$this->packageName = 'JCB_' . $this->getPackageName($items);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->packageName = 'JCB_smartPackage';
|
||||
}
|
||||
}
|
||||
// set the package path
|
||||
$this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName;
|
||||
$this->zipPath = $this->packagePath .'.zip';
|
||||
if (JFolder::exists($this->packagePath))
|
||||
{
|
||||
// remove if old folder is found
|
||||
ComponentbuilderHelper::removeFolder($this->packagePath);
|
||||
}
|
||||
// create the folders
|
||||
JFolder::create($this->packagePath);
|
||||
// Get the basic encryption.
|
||||
$basickey = ComponentbuilderHelper::getCryptKey('basic');
|
||||
// Get the encription object.
|
||||
if ($basickey)
|
||||
{
|
||||
$basic = new FOFEncryptAes($basickey, 128);
|
||||
}
|
||||
// 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);
|
||||
// build information data set
|
||||
$this->info['name'][$item->id] = $item->name;
|
||||
$this->info['short_description'][$item->id] = $item->short_description;
|
||||
$this->info['component_version'][$item->id] = $item->component_version;
|
||||
$this->info['companyname'][$item->id] = $item->companyname;
|
||||
$this->info['author'][$item->id] = $item->author;
|
||||
$this->info['email'][$item->id] = $item->email;
|
||||
$this->info['website'][$item->id] = $item->website;
|
||||
$this->info['license'][$item->id] = $item->license;
|
||||
$this->info['copyright'][$item->id] = $item->copyright;
|
||||
// set the keys
|
||||
if (isset($item->export_key) && ComponentbuilderHelper::checkString($item->export_key))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$export_key = $item->export_key;
|
||||
if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
|
||||
{
|
||||
$export_key = rtrim($basic->decryptString($item->export_key), "\0");
|
||||
}
|
||||
// make sure we have a string
|
||||
if (strlen($export_key) > 4 )
|
||||
{
|
||||
$this->key[$item->id] = $export_key;
|
||||
}
|
||||
}
|
||||
// get name of this item key_name
|
||||
if (isset($item->system_name))
|
||||
{
|
||||
$keyName = ComponentbuilderHelper::safeString($item->system_name, 'cAmel');
|
||||
}
|
||||
else
|
||||
{
|
||||
$keyName = ComponentbuilderHelper::safeString($item->name_code);
|
||||
}
|
||||
// set the export buy links
|
||||
if (isset($item->export_buy_link) && ComponentbuilderHelper::checkString($item->export_buy_link))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$this->exportBuyLinks[$keyName] = $item->export_buy_link;
|
||||
}
|
||||
// set the export buy links
|
||||
if (isset($item->export_package_link) && ComponentbuilderHelper::checkString($item->export_package_link))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$this->exportPackageLinks[$keyName] = $item->export_package_link;
|
||||
}
|
||||
// component image
|
||||
$this->moveIt(array($item->image), 'image');
|
||||
// set the custom code ID's
|
||||
$this->setCustomCodeIds($item, 'joomla_component');
|
||||
// set the language strings for this component
|
||||
$this->setLanguageTranslation($item->id);
|
||||
// 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->smartExportBuilder();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Everything Linked to Components
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getLinkedToComponents($pks)
|
||||
{
|
||||
// array of tables linked to joomla_component
|
||||
$linkedTables = array(
|
||||
'custom_code' => 'component',
|
||||
'component_files_folders' => 'joomla_component',
|
||||
'component_admin_views' => 'joomla_component',
|
||||
'component_config' => 'joomla_component',
|
||||
'component_site_views' => 'joomla_component',
|
||||
'component_custom_admin_views' => 'joomla_component',
|
||||
'component_updates' => 'joomla_component',
|
||||
'component_mysql_tweaks' => 'joomla_component',
|
||||
'component_custom_admin_menus' => 'joomla_component',
|
||||
'component_dashboard' => 'joomla_component' );
|
||||
// load all tables linked to joomla_component
|
||||
foreach($linkedTables as $table => $field)
|
||||
{
|
||||
$this->setData($table, $pks, $field);
|
||||
}
|
||||
// add fields and conditions
|
||||
if (isset($this->smartIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->smartIDs['admin_view']))
|
||||
{
|
||||
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
}
|
||||
// add validation rules
|
||||
if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule']))
|
||||
{
|
||||
$this->setData('validation_rule', array_values($this->smartIDs['validation_rule']), 'name');
|
||||
}
|
||||
// add field types
|
||||
if (isset($this->smartIDs['fieldtype']) && ComponentbuilderHelper::checkArray($this->smartIDs['fieldtype']))
|
||||
{
|
||||
$this->setData('fieldtype', array_values($this->smartIDs['fieldtype']), 'id');
|
||||
}
|
||||
// add templates
|
||||
if (isset($this->smartIDs['template']) && ComponentbuilderHelper::checkArray($this->smartIDs['template']))
|
||||
{
|
||||
$this->setData('template', array_values($this->smartIDs['template']), 'id');
|
||||
}
|
||||
// add layouts
|
||||
if (isset($this->smartIDs['layout']) && ComponentbuilderHelper::checkArray($this->smartIDs['layout']))
|
||||
{
|
||||
$this->setData('layout', array_values($this->smartIDs['layout']), 'id');
|
||||
}
|
||||
// add dynamic get
|
||||
if (isset($this->smartIDs['dynamic_get']) && ComponentbuilderHelper::checkArray($this->smartIDs['dynamic_get']))
|
||||
{
|
||||
$this->setData('dynamic_get', array_values($this->smartIDs['dynamic_get']), 'id');
|
||||
}
|
||||
// only if exporting
|
||||
if ('clone' !== $this->activeType)
|
||||
{
|
||||
// add snippets
|
||||
if (isset($this->smartIDs['snippet']) && ComponentbuilderHelper::checkArray($this->smartIDs['snippet']))
|
||||
{
|
||||
$this->setData('snippet', array_values($this->smartIDs['snippet']), 'id');
|
||||
}
|
||||
// add custom code
|
||||
if (isset($this->smartIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->smartIDs['custom_code']))
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Components
|
||||
*
|
||||
* @return array of objects.
|
||||
*/
|
||||
protected function getComponents($pks)
|
||||
{
|
||||
// setup the query
|
||||
if (ComponentbuilderHelper::checkArray($pks))
|
||||
@ -140,233 +422,45 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
{
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// set custom folder path
|
||||
$this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
|
||||
// check what type of export or backup this is
|
||||
if ('backup' === $this->activeType || 'manualBackup' === $this->activeType)
|
||||
{
|
||||
// set the paths
|
||||
if (!$this->backupPath = $this->params->get('cronjob_backup_folder_path', null))
|
||||
{
|
||||
// set the paths
|
||||
$comConfig = JFactory::getConfig();
|
||||
$this->backupPath = $comConfig->get('tmp_path');
|
||||
}
|
||||
// check what backup type we are working with here
|
||||
$this->backupType = $this->params->get('cronjob_backup_type', 1); // 1 = local folder; 2 = remote server (default is local)
|
||||
// if remote server get the ID
|
||||
if (2 == $this->backupType)
|
||||
{
|
||||
$this->backupServer = $this->params->get('cronjob_backup_server', null);
|
||||
}
|
||||
// set the date array
|
||||
$date = JFactory::getDate();
|
||||
$placeholderDate = array();
|
||||
$placeholderDate['[YEAR]'] = $date->format('Y');
|
||||
$placeholderDate['[MONTH]'] = $date->format('m');
|
||||
$placeholderDate['[DAY]'] = $date->format('d');
|
||||
$placeholderDate['[HOUR]'] = $date->format('H');
|
||||
$placeholderDate['[MINUTE]'] = $date->format('i');
|
||||
// get the package name
|
||||
$packageName = $this->params->get('backup_package_name', 'JCB_Backup_[YEAR]_[MONTH]_[DAY]');
|
||||
$this->packageName = str_replace(array_keys($placeholderDate), array_values($placeholderDate), $packageName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the paths
|
||||
$comConfig = JFactory::getConfig();
|
||||
$this->backupPath = $comConfig->get('tmp_path');
|
||||
// set the package name
|
||||
if (count($items) == 1)
|
||||
{
|
||||
$this->packageName = 'JCB_' . $this->getPackageName($items);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->packageName = 'JCB_smartPackage';
|
||||
}
|
||||
}
|
||||
// set the package path
|
||||
$this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName;
|
||||
$this->zipPath = $this->packagePath .'.zip';
|
||||
if (JFolder::exists($this->packagePath))
|
||||
{
|
||||
// remove if old folder is found
|
||||
ComponentbuilderHelper::removeFolder($this->packagePath);
|
||||
}
|
||||
// create the folders
|
||||
JFolder::create($this->packagePath);
|
||||
// Get the basic encryption.
|
||||
$basickey = ComponentbuilderHelper::getCryptKey('basic');
|
||||
// Get the encription object.
|
||||
if ($basickey)
|
||||
{
|
||||
$basic = new FOFEncryptAes($basickey, 128);
|
||||
}
|
||||
// update $pks with returned IDs
|
||||
$pks = array();
|
||||
// start loading the components
|
||||
$this->smartExport['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
|
||||
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);
|
||||
// build information data set
|
||||
$this->info['name'][$item->id] = $item->name;
|
||||
$this->info['short_description'][$item->id] = $item->short_description;
|
||||
$this->info['component_version'][$item->id] = $item->component_version;
|
||||
$this->info['companyname'][$item->id] = $item->companyname;
|
||||
$this->info['author'][$item->id] = $item->author;
|
||||
$this->info['email'][$item->id] = $item->email;
|
||||
$this->info['website'][$item->id] = $item->website;
|
||||
$this->info['license'][$item->id] = $item->license;
|
||||
$this->info['copyright'][$item->id] = $item->copyright;
|
||||
// set the keys
|
||||
if (isset($item->export_key) && ComponentbuilderHelper::checkString($item->export_key))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$export_key = $item->export_key;
|
||||
if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
|
||||
{
|
||||
$export_key = rtrim($basic->decryptString($item->export_key), "\0");
|
||||
}
|
||||
// make sure we have a string
|
||||
if (strlen($export_key) > 4 )
|
||||
{
|
||||
$this->key[$item->id] = $export_key;
|
||||
}
|
||||
}
|
||||
// get name of this item key_name
|
||||
if (isset($item->system_name))
|
||||
{
|
||||
$keyName = ComponentbuilderHelper::safeString($item->system_name, 'cAmel');
|
||||
}
|
||||
else
|
||||
{
|
||||
$keyName = ComponentbuilderHelper::safeString($item->name_code);
|
||||
}
|
||||
// set the export buy links
|
||||
if (isset($item->export_buy_link) && ComponentbuilderHelper::checkString($item->export_buy_link))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$this->exportBuyLinks[$keyName] = $item->export_buy_link;
|
||||
}
|
||||
// set the export buy links
|
||||
if (isset($item->export_package_link) && ComponentbuilderHelper::checkString($item->export_package_link))
|
||||
{
|
||||
// keep the key locked for exported data set
|
||||
$this->exportPackageLinks[$keyName] = $item->export_package_link;
|
||||
}
|
||||
// component image
|
||||
$this->moveIt(array($item->image), 'image');
|
||||
// set the custom code ID's
|
||||
$this->setCustomCodeIds($item, 'joomla_component');
|
||||
// set the language strings for this component
|
||||
$this->setLanguageTranslation($item->id);
|
||||
// load to global object
|
||||
$this->smartExport['joomla_component'][$item->id] = $item;
|
||||
// add to pks
|
||||
$pks[] = $item->id;
|
||||
}
|
||||
// array of tables linked to joomla_component
|
||||
$linkedTables = array(
|
||||
'custom_code' => 'component',
|
||||
'component_files_folders' => 'joomla_component',
|
||||
'component_admin_views' => 'joomla_component',
|
||||
'component_config' => 'joomla_component',
|
||||
'component_site_views' => 'joomla_component',
|
||||
'component_custom_admin_views' => 'joomla_component',
|
||||
'component_updates' => 'joomla_component',
|
||||
'component_mysql_tweaks' => 'joomla_component',
|
||||
'component_custom_admin_menus' => 'joomla_component',
|
||||
'component_dashboard' => 'joomla_component' );
|
||||
// load all tables linked to joomla_component
|
||||
foreach($linkedTables as $table => $field)
|
||||
{
|
||||
$this->setData($table, $pks, $field);
|
||||
}
|
||||
// add fields and conditions
|
||||
if (isset($this->exportIDs['admin_view']) && ComponentbuilderHelper::checkArray($this->exportIDs['admin_view']))
|
||||
{
|
||||
$this->setData('admin_fields', array_values($this->exportIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_conditions', array_values($this->exportIDs['admin_view']), 'admin_view');
|
||||
}
|
||||
// add validation rules
|
||||
if (isset($this->exportIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->exportIDs['validation_rule']))
|
||||
{
|
||||
$this->setData('validation_rule', array_values($this->exportIDs['validation_rule']), 'name');
|
||||
}
|
||||
// add field types
|
||||
if (isset($this->exportIDs['fieldtype']) && ComponentbuilderHelper::checkArray($this->exportIDs['fieldtype']))
|
||||
{
|
||||
$this->setData('fieldtype', array_values($this->exportIDs['fieldtype']), 'id');
|
||||
}
|
||||
// add templates
|
||||
if (isset($this->exportIDs['template']) && ComponentbuilderHelper::checkArray($this->exportIDs['template']))
|
||||
{
|
||||
$this->setData('template', array_values($this->exportIDs['template']), 'id');
|
||||
}
|
||||
// add layouts
|
||||
if (isset($this->exportIDs['layout']) && ComponentbuilderHelper::checkArray($this->exportIDs['layout']))
|
||||
{
|
||||
$this->setData('layout', array_values($this->exportIDs['layout']), 'id');
|
||||
}
|
||||
// add dynamic get
|
||||
if (isset($this->exportIDs['dynamic_get']) && ComponentbuilderHelper::checkArray($this->exportIDs['dynamic_get']))
|
||||
{
|
||||
$this->setData('dynamic_get', array_values($this->exportIDs['dynamic_get']), 'id');
|
||||
}
|
||||
// add snippets
|
||||
if (isset($this->exportIDs['snippet']) && ComponentbuilderHelper::checkArray($this->exportIDs['snippet']))
|
||||
{
|
||||
$this->setData('snippet', array_values($this->exportIDs['snippet']), 'id');
|
||||
}
|
||||
// add custom code
|
||||
if (isset($this->exportIDs['custom_code']) && ComponentbuilderHelper::checkArray($this->exportIDs['custom_code']))
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->exportIDs['custom_code']), 'id');
|
||||
}
|
||||
|
||||
// has any data been set for this component
|
||||
if (isset($this->smartExport['joomla_component']) && ComponentbuilderHelper::checkArray($this->smartExport['joomla_component']))
|
||||
{
|
||||
// set the folder and move the files of each component to the folder
|
||||
return $this->smartExportBuilder();
|
||||
}
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
}
|
||||
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.
|
||||
*
|
||||
* @return void.
|
||||
*/
|
||||
protected function setExportIDs($value, $table, $int = true)
|
||||
protected function setSmartIDs($value, $table, $int = true)
|
||||
{
|
||||
// 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
|
||||
if (ComponentbuilderHelper::checkJson($value))
|
||||
@ -380,21 +474,21 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
{
|
||||
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))
|
||||
{
|
||||
$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)
|
||||
{
|
||||
$this->exportIDs[$table][(int) $value] = (int) $value;
|
||||
$this->smartIDs[$table][(int) $value] = (int) $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
|
||||
if ('template' === $table)
|
||||
{
|
||||
$this->exportIDs['template'] = array();
|
||||
$this->smartIDs['template'] = array();
|
||||
}
|
||||
elseif ('layout' === $table)
|
||||
{
|
||||
$this->exportIDs['layout'] = array();
|
||||
$this->smartIDs['layout'] = array();
|
||||
}
|
||||
// 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
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
@ -571,11 +665,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
unset($item->addconditions);
|
||||
}
|
||||
// load to global object
|
||||
$this->smartExport[$table][$item->id] = $item;
|
||||
$this->smartBox[$table][$item->id] = $item;
|
||||
// set the custom code ID's
|
||||
$this->setCustomCodeIds($item, $table);
|
||||
// actions to take if table is component_files_folders
|
||||
if ('component_files_folders' === $table)
|
||||
if ('component_files_folders' === $table && 'clone' !== $this->activeType)
|
||||
{
|
||||
// build files
|
||||
$this->moveIt($this->getValues($item->addfiles, 'subform', 'file', null), 'file');
|
||||
@ -614,13 +708,17 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
if ('admin_view' === $table)
|
||||
{
|
||||
// add fields & conditions
|
||||
$this->setExportIDs($item->id, 'admin_view');
|
||||
// admin icon
|
||||
$this->moveIt(array($item->icon), 'image');
|
||||
// admin icon_add
|
||||
$this->moveIt(array($item->icon_add), 'image');
|
||||
// admin icon_category
|
||||
$this->moveIt(array($item->icon_category), 'image');
|
||||
$this->setSmartIDs($item->id, 'admin_view');
|
||||
// do not move anything if clone
|
||||
if ('clone' !== $this->activeType)
|
||||
{
|
||||
// admin icon
|
||||
$this->moveIt(array($item->icon), 'image');
|
||||
// admin icon_add
|
||||
$this->moveIt(array($item->icon_add), 'image');
|
||||
// admin icon_category
|
||||
$this->moveIt(array($item->icon_category), 'image');
|
||||
}
|
||||
}
|
||||
// actions to take if table is admin_fields
|
||||
if ('admin_fields' === $table)
|
||||
@ -639,7 +737,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
if ('field' === $table)
|
||||
{
|
||||
// add field types
|
||||
$this->setExportIDs($item->fieldtype, 'fieldtype');
|
||||
$this->setSmartIDs($item->fieldtype, 'fieldtype');
|
||||
// check if this field has multiple fields
|
||||
if ($this->checkMultiFields($item->fieldtype))
|
||||
{
|
||||
@ -674,7 +772,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
if (!in_array($validationRule, (array) $coreValidationRules))
|
||||
{
|
||||
// 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
|
||||
$this->setExportIDs($item->main_get, 'dynamic_get');
|
||||
$this->setExportIDs($item->custom_get, 'dynamic_get');
|
||||
$this->setExportIDs($item->dynamic_get, 'dynamic_get');
|
||||
$this->setSmartIDs($item->main_get, 'dynamic_get');
|
||||
$this->setSmartIDs($item->custom_get, 'dynamic_get');
|
||||
$this->setSmartIDs($item->dynamic_get, 'dynamic_get');
|
||||
// move the icon
|
||||
if ('custom_admin_view' === $table && isset($item->icon))
|
||||
if ('custom_admin_view' === $table && isset($item->icon) && 'clone' !== $this->activeType)
|
||||
{
|
||||
// view icon
|
||||
$this->moveIt(array($item->icon), 'image');
|
||||
@ -705,7 +803,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// add snippets (was removed please use snippet importer)
|
||||
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
|
||||
@ -714,7 +812,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// add snippets (was removed please use snippet importer)
|
||||
if (isset($item->snippet) && is_numeric($item->snippet))
|
||||
{
|
||||
$this->setExportIDs((int) $item->snippet, 'snippet');
|
||||
$this->setSmartIDs((int) $item->snippet, 'snippet');
|
||||
}
|
||||
// search for templates & layouts
|
||||
$this->getTemplateLayout(base64_decode($item->$table), $this->user);
|
||||
@ -724,40 +822,103 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$this->getTemplateLayout($item->php_view, $this->user);
|
||||
}
|
||||
// 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
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
protected function smartExportBuilder()
|
||||
{
|
||||
// check if data is set
|
||||
if (isset($this->smartExport) && ComponentbuilderHelper::checkArray($this->smartExport))
|
||||
if (isset($this->smartBox) && ComponentbuilderHelper::checkArray($this->smartBox))
|
||||
{
|
||||
// set db data
|
||||
$data = serialize($this->smartExport);
|
||||
$data = serialize($this->smartBox);
|
||||
// Set the key owner information
|
||||
$this->info['source'] = array();
|
||||
$this->info['source']['company'] = $this->params->get('export_company', null);
|
||||
$this->info['source']['owner'] = $this->params->get('export_owner', null);
|
||||
$this->info['source']['email'] = $this->params->get('export_email', null);
|
||||
$this->info['source']['website'] = $this->params->get('export_website', null);
|
||||
$this->info['source']['license'] = $this->params->get('export_license', null);
|
||||
$this->info['source']['copyright'] = $this->params->get('export_copyright', null);
|
||||
// lock the data if set
|
||||
if (ComponentbuilderHelper::checkArray($this->key))
|
||||
{
|
||||
// lock the data
|
||||
$this->key = md5(implode('', $this->key));
|
||||
$locker = new FOFEncryptAes($this->key, 128);
|
||||
$data = $locker->encryptString($data);
|
||||
$data = $locker->encryptString($data);
|
||||
// Set the key owner information
|
||||
$this->info['getKeyFrom'] = array();
|
||||
$this->info['getKeyFrom']['company'] = $this->params->get('export_company', null);
|
||||
$this->info['getKeyFrom']['owner'] = $this->params->get('export_owner', null);
|
||||
$this->info['getKeyFrom']['email'] = $this->params->get('export_email', null);
|
||||
$this->info['getKeyFrom']['website'] = $this->params->get('export_website', null);
|
||||
$this->info['getKeyFrom']['license'] = $this->params->get('export_license', null);
|
||||
$this->info['getKeyFrom']['copyright'] = $this->params->get('export_copyright', null);
|
||||
$this->info['getKeyFrom']['company'] = $this->info['source']['company'];
|
||||
$this->info['getKeyFrom']['owner'] = $this->info['source']['owner'];
|
||||
$this->info['getKeyFrom']['email'] = $this->info['source']['email'];
|
||||
$this->info['getKeyFrom']['website'] = $this->info['source']['website'];
|
||||
$this->info['getKeyFrom']['license'] = $this->info['source']['license'];
|
||||
$this->info['getKeyFrom']['copyright'] = $this->info['source']['copyright'];
|
||||
// making provision for future changes
|
||||
if (count($this->exportBuyLinks) == 1)
|
||||
{
|
||||
@ -769,9 +930,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$this->info['getKeyFrom']['buy_link'] = $this->params->get('export_buy_link', null);
|
||||
}
|
||||
$this->info['getKeyFrom']['package_links'] = $this->exportPackageLinks;
|
||||
// we started adding this at v2.7.7
|
||||
$this->info['key'] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we started adding this at v2.7.7
|
||||
$this->info['key'] = false;
|
||||
// Set the owner information
|
||||
$data = base64_encode($data);
|
||||
}
|
||||
@ -1096,9 +1261,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$data = $this->getDataWithAlias($template, 'template');
|
||||
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
|
||||
$again[] = $data['html'];
|
||||
$again[] = $data['php_view'];
|
||||
@ -1131,9 +1296,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
$data = $this->getDataWithAlias($layout, 'layout');
|
||||
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
|
||||
$again[] = $data['html'];
|
||||
$again[] = $data['php_view'];
|
||||
@ -1152,14 +1317,14 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
if ($user)
|
||||
{
|
||||
// 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
|
||||
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 +1412,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// if numeric add to ids
|
||||
if (is_numeric($func))
|
||||
{
|
||||
$this->setExportIDs($func, 'custom_code');
|
||||
$this->setSmartIDs($func, 'custom_code');
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($func))
|
||||
{
|
||||
if ($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id'))
|
||||
{
|
||||
$this->setExportIDs($funcID, 'custom_code');
|
||||
$this->setSmartIDs($funcID, 'custom_code');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1296,19 +1461,19 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
||||
// check if we have 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)
|
||||
{
|
||||
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);
|
||||
if (in_array($id, $components))
|
||||
{
|
||||
// load to global object
|
||||
$this->smartExport['language_translation'][$item->id] = $item;
|
||||
$this->smartBox['language_translation'][$item->id] = $item;
|
||||
// add languages
|
||||
if (isset($item->translation))
|
||||
{
|
||||
|
@ -614,9 +614,9 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
}
|
||||
|
||||
// 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
|
||||
|
@ -44,7 +44,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.entranslation','entranslation'
|
||||
'a.source','source'
|
||||
);
|
||||
}
|
||||
|
||||
@ -65,8 +65,8 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$entranslation = $this->getUserStateFromRequest($this->context . '.filter.entranslation', 'filter_entranslation');
|
||||
$this->setState('filter.entranslation', $entranslation);
|
||||
$source = $this->getUserStateFromRequest($this->context . '.filter.source', 'filter_source');
|
||||
$this->setState('filter.source', $source);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
@ -153,11 +153,11 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
// load the languages to the string
|
||||
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
|
||||
{
|
||||
$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} = '';
|
||||
}
|
||||
// now adapt the entranslation
|
||||
// now adapt the source
|
||||
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
|
||||
{
|
||||
$translations = json_decode($item->translation, true);
|
||||
@ -268,7 +268,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
else
|
||||
{
|
||||
$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
|
||||
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
|
||||
{
|
||||
$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} = '';
|
||||
}
|
||||
// now adapt the entranslation
|
||||
// now adapt the source
|
||||
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
|
||||
{
|
||||
$translations = json_decode($item->translation, true);
|
||||
@ -458,7 +458,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
// start setup of headers
|
||||
$headers = new stdClass();
|
||||
$headers->id = 'id';
|
||||
$headers->English = 'English';
|
||||
$headers->Source = 'Source';
|
||||
// add the languages
|
||||
if (ComponentbuilderHelper::checkArray($languages))
|
||||
{
|
||||
@ -485,7 +485,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.entranslation');
|
||||
$id .= ':' . $this->getState('filter.source');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -50,6 +50,129 @@ class ComponentbuilderModelLanguages extends JModelList
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,6 +64,11 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
public function getTable($type = 'layout', $prefix = 'ComponentbuilderTable', $config = array())
|
||||
{
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,14 +100,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode php_view.
|
||||
@ -113,6 +110,35 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
{
|
||||
// base64 Decode 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))
|
||||
|
@ -100,6 +100,12 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// Convert the libraries field to an array.
|
||||
@ -116,12 +122,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
|
@ -100,38 +100,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->ajax_input))
|
||||
{
|
||||
// Convert the ajax_input field to an array.
|
||||
$ajax_input = new Registry;
|
||||
$ajax_input->loadString($item->ajax_input);
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->libraries))
|
||||
{
|
||||
// Convert the libraries field to an array.
|
||||
$libraries = new Registry;
|
||||
$libraries->loadString($item->libraries);
|
||||
$item->libraries = $libraries->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_get))
|
||||
{
|
||||
// Convert the custom_get field to an array.
|
||||
$custom_get = new Registry;
|
||||
$custom_get->loadString($item->custom_get);
|
||||
$item->custom_get = $custom_get->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_button))
|
||||
{
|
||||
// Convert the custom_button field to an array.
|
||||
$custom_button = new Registry;
|
||||
$custom_button->loadString($item->custom_button);
|
||||
$item->custom_button = $custom_button->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_document))
|
||||
{
|
||||
// base64 Decode php_document.
|
||||
@ -204,6 +172,38 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
$item->php_model = base64_decode($item->php_model);
|
||||
}
|
||||
|
||||
if (!empty($item->ajax_input))
|
||||
{
|
||||
// Convert the ajax_input field to an array.
|
||||
$ajax_input = new Registry;
|
||||
$ajax_input->loadString($item->ajax_input);
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->libraries))
|
||||
{
|
||||
// Convert the libraries field to an array.
|
||||
$libraries = new Registry;
|
||||
$libraries->loadString($item->libraries);
|
||||
$item->libraries = $libraries->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_get))
|
||||
{
|
||||
// Convert the custom_get field to an array.
|
||||
$custom_get = new Registry;
|
||||
$custom_get->loadString($item->custom_get);
|
||||
$item->custom_get = $custom_get->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_button))
|
||||
{
|
||||
// Convert the custom_button field to an array.
|
||||
$custom_button = new Registry;
|
||||
$custom_button->loadString($item->custom_button);
|
||||
$item->custom_button = $custom_button->toArray();
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
|
@ -64,6 +64,11 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
public function getTable($type = 'template', $prefix = 'ComponentbuilderTable', $config = array())
|
||||
{
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,14 +100,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
$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))
|
||||
{
|
||||
// base64 Decode php_view.
|
||||
@ -113,6 +110,35 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
{
|
||||
// base64 Decode 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))
|
||||
|
File diff suppressed because one or more lines are too long
1
admin/sql/updates/mysql/2.7.5.sql
Normal file
1
admin/sql/updates/mysql/2.7.5.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE `#__componentbuilder_language_translation` CHANGE `entranslation` `source` TEXT NOT NULL;
|
@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_fields extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_fields_conditions extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_view extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_admin_views extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_config extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_custom_admin_menus extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_custom_admin_views extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_dashboard extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_files_folders extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_mysql_tweaks extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_site_views extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_updates extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableCustom_admin_view extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableCustom_code extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableDynamic_get extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableField extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableFieldtype extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,29 @@ class ComponentbuilderTableHelp_document extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->title;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableJoomla_component extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableLanguage extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableLanguage_translation extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,29 @@ class ComponentbuilderTableLayout extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary_config extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary_files_folders_urls extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableServer extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableSite_view extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableSnippet extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableSnippet_type extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,29 @@ class ComponentbuilderTableTemplate extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -323,29 +323,16 @@ class ComponentbuilderTableValidation_rule extends JTable
|
||||
$asset->loadByName('com_componentbuilder');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* This view does not actually have an alias
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -236,4 +236,50 @@ function fanAsgfdSffsAbsent(arr){
|
||||
}
|
||||
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>
|
||||
|
@ -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
|
||||
jQuery(document).ready(function(){
|
||||
|
@ -186,6 +186,32 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
// add to form
|
||||
$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
|
||||
$component = JFormHelper::loadFieldType('list',true);
|
||||
// start component xml
|
||||
|
@ -82,6 +82,11 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
<?php echo JLayoutHelper::render('field.data_base_right', $this); ?>
|
||||
</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.addTab', 'fieldTab', 'scripts', JText::_('COM_COMPONENTBUILDER_FIELD_SCRIPTS', true)); ?>
|
||||
@ -343,6 +348,10 @@ jQuery('#adminForm').on('change', '#jform_fieldtype',function (e) {
|
||||
// get type value
|
||||
var fieldId = jQuery("#jform_fieldtype option:selected").val();
|
||||
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);
|
||||
});
|
||||
|
||||
|
||||
|
@ -105,11 +105,33 @@ JHtml::_('behavior.keepalive');
|
||||
// set the url
|
||||
form.import_url.value = form.vdm_package.value;
|
||||
jQuery('#loading').css('display', 'block');
|
||||
jQuery('#noticeboard').show();
|
||||
jQuery('#installer-import').hide();
|
||||
form.checksum.value = 'vdm';
|
||||
form.gettype.value = 'url';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
Joomla.submitbuttonJCB = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
// do field validation
|
||||
if (form.jcb_package.value == "" || form.jcb_package.value == "http://")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the url
|
||||
form.import_url.value = form.jcb_package.value;
|
||||
jQuery('#loading').css('display', 'block');
|
||||
jQuery('#noticeboard').show();
|
||||
jQuery('#installer-import').hide();
|
||||
form.checksum.value = 'jcb';
|
||||
form.gettype.value = 'url';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@ -117,7 +139,6 @@ JHtml::_('behavior.keepalive');
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $('body');
|
||||
|
||||
|
||||
$('<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 - $(window).scrollTop())
|
||||
@ -134,8 +155,7 @@ jQuery(document).ready(function($) {
|
||||
</script>
|
||||
|
||||
<?php $formats = ($this->dataType === 'smart_package') ? '.zip' : 'none'; ?>
|
||||
|
||||
<div id="installer-import" class="clearfix">
|
||||
<div class="clearfix">
|
||||
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
|
||||
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
@ -146,6 +166,12 @@ jQuery(document).ready(function($) {
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="noticeboard" class="well well-small" style="display: none;">
|
||||
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD'); ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?php echo JText::_('COM_COMPONENTBUILDER_NEW_NOTICE'); ?>)</span></h2>
|
||||
<div class="noticeboard-md"><small><?php echo JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING'); ?><span class="loading-dots">.</span></small></div>
|
||||
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray"><<ewe>>yn</a></small></div>
|
||||
</div>
|
||||
<div id="installer-import">
|
||||
<?php if ($this->hasPackage && $this->dataType === 'smart_package') : ?>
|
||||
<?php
|
||||
if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name']))
|
||||
@ -190,97 +216,14 @@ jQuery(document).ready(function($) {
|
||||
</div>
|
||||
<?php if ($hasOwner): ?>
|
||||
<div class="well span6">
|
||||
<?php
|
||||
$ownerDetails = '<h2 class="module-title nav-header">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
|
||||
$ownerDetails .= '<ul>';
|
||||
if (isset($this->packageInfo['getKeyFrom']['company']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['company']))
|
||||
{
|
||||
$owner = $this->packageInfo['getKeyFrom']['company'];
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $this->packageInfo['getKeyFrom']['company']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($this->packageInfo['getKeyFrom']['owner']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['owner']))
|
||||
{
|
||||
if (!isset($owner))
|
||||
{
|
||||
$owner = $this->packageInfo['getKeyFrom']['owner'];
|
||||
}
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $this->packageInfo['getKeyFrom']['owner']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($this->packageInfo['getKeyFrom']['website']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['website']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $this->packageInfo['getKeyFrom']['website']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($this->packageInfo['getKeyFrom']['email']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['email']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $this->packageInfo['getKeyFrom']['email']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($this->packageInfo['getKeyFrom']['license']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['license']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $this->packageInfo['getKeyFrom']['license']) . '</li>';
|
||||
}
|
||||
// add value only if set
|
||||
if (isset($this->packageInfo['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['copyright']))
|
||||
{
|
||||
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $this->packageInfo['getKeyFrom']['copyright']) . '</li>';
|
||||
}
|
||||
$ownerDetails .= '</ul>';
|
||||
|
||||
// provide some details to how the user can get a key
|
||||
if (isset($this->packageInfo['getKeyFrom']['buy_link']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['buy_link']))
|
||||
{
|
||||
$ownerDetails .= '<hr />';
|
||||
$ownerDetails .= JText::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $this->packageInfo['getKeyFrom']['buy_link'], $owner, $owner);
|
||||
}
|
||||
// add more custom links
|
||||
elseif (isset($this->packageInfo['getKeyFrom']['buy_links']) && componentbuilderHelper::checkArray($this->packageInfo['getKeyFrom']['buy_links']))
|
||||
{
|
||||
$buttons = array();
|
||||
foreach ($this->packageInfo['getKeyFrom']['buy_links'] as $keyName => $link)
|
||||
{
|
||||
$buttons[] = JText::sprintf('COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $owner, $link, $owner, $keyName);
|
||||
}
|
||||
$ownerDetails .= '<hr />';
|
||||
$ownerDetails .= implode('<br />', $buttons);
|
||||
}
|
||||
|
||||
// return the owner details
|
||||
if (!isset($owner))
|
||||
{
|
||||
$ownerDetails = '<h2 style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '</h2>';
|
||||
$ownerDetails .= '<p style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '</p>';
|
||||
}
|
||||
echo $ownerDetails;
|
||||
?>
|
||||
<?php echo ComponentbuilderHelper::getPackageOwnerDetailsDisplay($this->packageInfo); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'info', JText::sprintf('COM_COMPONENTBUILDER_S_BEING_IMPORTED', $comP)); ?>
|
||||
<?php $class2 = ($cAmount == 1) ? 'span12' : 'span6'; ?>
|
||||
<?php $counter = 1; foreach ($this->packageInfo['name'] as $key => $value): ?>
|
||||
<?php if ($cAmount > 1 && $counter == 3) { echo '</div>'; $counter = 1;} ?>
|
||||
<?php if ($cAmount > 1 && $counter == 1) { echo '<div>'; } ?>
|
||||
<div class="well well-small <?php echo $class2; ?>">
|
||||
<h2 class="module-title nav-header"><?php echo JText::sprintf('COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM', $value . ' v' . $this->packageInfo['component_version'][$key]); ?></h2>
|
||||
<p><?php echo $this->packageInfo['short_description'][$key]; ?></p>
|
||||
<ul>
|
||||
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB', $this->packageInfo['companyname'][$key]); ?></li>
|
||||
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMAUTHOREM_BSB', $this->packageInfo['author'][$key]); ?></li>
|
||||
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $this->packageInfo['email'][$key]); ?></li>
|
||||
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $this->packageInfo['website'][$key]); ?></li>
|
||||
</ul>
|
||||
<h2 class="nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_LICENSE'); ?></h2>
|
||||
<p><?php echo $this->packageInfo['license'][$key]; ?></p>
|
||||
<h2 class="nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_COPYRIGHT'); ?></h2>
|
||||
<p><?php echo $this->packageInfo['copyright'][$key]; ?></p>
|
||||
</div>
|
||||
<?php $counter++; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo ComponentbuilderHelper::getPackageComponentsDetailsDisplay($this->packageInfo); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -289,7 +232,7 @@ jQuery(document).ready(function($) {
|
||||
<?php else: ?>
|
||||
<?php if ($this->dataType === 'smart_package'): ?>
|
||||
<h1 style="color: #922924;"><?php echo JText::_('COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST'); ?></h1>
|
||||
<p style="color: #922924;"><?php echo JText::_('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'); ?></p>
|
||||
<p style="color: #922924;"><?php echo JText::sprintf('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_A_SFIND_OUT_WHYA', 'href="https://vdm.bz/jcb-package-import-safety" target="_blank" title="Watch tutorial"'); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => 'upload')); ?>
|
||||
|
||||
@ -338,25 +281,65 @@ jQuery(document).ready(function($) {
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->vdmPackages): ?>
|
||||
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_vdm', JText::_('COM_COMPONENTBUILDER_VDM_PACKAGES', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
|
||||
<div class="span12" id="vdm_packages_installer">
|
||||
<div class="alert alert-success">
|
||||
<p><?php echo JText::sprintf('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', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
|
||||
<p><?php echo JText::sprintf('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', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM', 'href="https://vdm.bz/how-to-get-free-vdm-package-keys" target="_blank" title="see how easy it is to get access keys from VDM"'); ?></p>
|
||||
</div>
|
||||
<?php foreach ($this->vdmPackages as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
|
||||
<?php foreach ($this->vdmPackages as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonVDM()" /> <small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES'); ?></small>
|
||||
</div>
|
||||
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="vdm_packages_display">
|
||||
<div id="vdm_packages_details">
|
||||
</div><br />
|
||||
<div id="vdm_package_owner_details">
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonVDM()" /> <small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES'); ?></small>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_jcb', JText::_('COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES', true)); ?>
|
||||
<div class="span12" id="jcb_packages_installer">
|
||||
<div class="alert alert-success">
|
||||
<p><?php echo JText::sprintf('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', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE', 'href="https://github.com/vdm-io/JCB-Community-Packages" target="_blank" title="gitHub Reposetory"'); ?></p>
|
||||
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ADD_YOUR_OWN_JCB_PACKAGES_TO_THE_COMMUNITY_A_S_GITHUBA_REPOSITORYBR_WATCH_THIS_A_S_TUTORIALA_TO_SEE_HOW', 'href="https://github.com/vdm-io/JCB-Community-Packages" target="_blank" title="gitHub Reposetory"', 'href="https://vdm.bz/add-jcb-community-package" target="_blank" title="watch the quick tutorial on how to add your own packages to this list of community packages"'); ?></p>
|
||||
</div>
|
||||
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
|
||||
</fieldset>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_JCB_COMMUNITY"); ?></legend>
|
||||
<?php foreach ($this->jcbPackages as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonJCB()" /> <small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_COMMUNITY_PACKAGES'); ?></small>
|
||||
</div>
|
||||
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="jcb_packages_display">
|
||||
<div id="jcb_packages_details">
|
||||
</div><br />
|
||||
<div id="jcb_package_owner_details">
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -366,9 +349,167 @@ jQuery(document).ready(function($) {
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="import_joomla_components.import" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<?php if (($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)) || ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages))): ?>
|
||||
// set packages that are on the page
|
||||
var packages = {};
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)): ?>
|
||||
// get all jcb packages
|
||||
jQuery("#jcb_package option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
packages[key] = 'jcb';
|
||||
});
|
||||
<?php endif; ?>
|
||||
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
|
||||
// get all vdm packages
|
||||
jQuery("#vdm_package option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
packages[key] = 'vdm';
|
||||
});
|
||||
<?php endif; ?>
|
||||
// no start behind the scene getting of package info
|
||||
autoJCBpackageInfo();
|
||||
});
|
||||
|
||||
function autoJCBpackageInfo(){
|
||||
jQuery.each( packages, function( url, type ) {
|
||||
var key = url.replace(/\W/g, '');
|
||||
// check if the values are local
|
||||
var result = jQuery.jStorage.get('JCB-packages-details'+key, null);
|
||||
if (!result && url.length > 0) {
|
||||
autoJCBpackageInfoAgain(url, key, type);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function autoJCBpackageInfoAgain(url, key,type){
|
||||
getJCBpackageInfo_server(url).done(function(result) {
|
||||
if(result.owner || result.packages){
|
||||
jQuery.jStorage.set('JCB-packages-details'+key, result, {TTL: expire});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getJCBpackageInfo(type){
|
||||
// show spinner
|
||||
jQuery('#loading').css('display', 'block');
|
||||
jQuery('#noticeboard').show();
|
||||
jQuery('#installer-import').hide();
|
||||
// get value
|
||||
var url = jQuery('#'+type+'_package').val();
|
||||
if (url) {
|
||||
var key = url.replace(/\W/g, '');
|
||||
// check if the values are local
|
||||
var result = jQuery.jStorage.get('JCB-packages-details'+key, null);
|
||||
if (result) {
|
||||
showJCBpackageInfo(result, key, type);
|
||||
} else {
|
||||
getJCBpackageInfoAgain(url, key, type);
|
||||
}
|
||||
} else {
|
||||
// hide spinner
|
||||
jQuery('#loading').hide();
|
||||
jQuery('#noticeboard').hide();
|
||||
jQuery('#installer-import').show();
|
||||
jQuery('#'+type+'_package_owner_details').html(' ');
|
||||
jQuery('#'+type+'_packages_details').html(' ');
|
||||
// some display moves
|
||||
jQuery('#'+type+'_packages_installer').removeClass('span6').addClass('span12');
|
||||
jQuery('#'+type+'_packages_display').removeClass('span6');
|
||||
}
|
||||
}
|
||||
|
||||
function getJCBpackageInfoAgain(url, key,type){
|
||||
getJCBpackageInfo_server(url).done(function(result) {
|
||||
showJCBpackageInfo(result, key,type);
|
||||
});
|
||||
}
|
||||
|
||||
function showJCBpackageInfo(result, key,type){
|
||||
if(result.owner || result.packages){
|
||||
jQuery('#'+type+'_packages_details').html(result.packages);
|
||||
jQuery('#'+type+'_package_owner_details').html(result.owner);
|
||||
jQuery.jStorage.set('JCB-packages-details'+key, result, {TTL: expire});
|
||||
// some display moves
|
||||
jQuery('#'+type+'_packages_installer').removeClass('span12').addClass('span6');
|
||||
jQuery('#'+type+'_packages_display').addClass('span6');
|
||||
} else {
|
||||
if (result.error) {
|
||||
jQuery('#'+type+'_packages_details').html(result.error);
|
||||
}
|
||||
jQuery('#'+type+'_package_owner_details').html(' ');
|
||||
jQuery('#'+type+'_noticeboard').show();
|
||||
// some display moves
|
||||
jQuery('#'+type+'_packages_installer').removeClass('span6').addClass('span12');
|
||||
jQuery('#'+type+'_packages_display').removeClass('span6');
|
||||
}
|
||||
// stop spinner
|
||||
jQuery('#loading').hide();
|
||||
jQuery('#noticeboard').hide();
|
||||
jQuery('#installer-import').show();
|
||||
}
|
||||
|
||||
function getJCBpackageInfo_server(url){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getJCBpackageInfo&format=json";
|
||||
if(token.length > 0 && url.length > 0){
|
||||
var request = 'token='+token+'&url=' + url;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
var noticeboard = "https://www.vdm.io/componentbuilder-noticeboard-md";
|
||||
jQuery(document).ready(function () {
|
||||
jQuery.get(noticeboard)
|
||||
.success(function(board) {
|
||||
if (board.length > 5) {
|
||||
jQuery(".noticeboard-md").html(marked(board));
|
||||
getIS(1,board).done(function(result) {
|
||||
if (result){
|
||||
jQuery(".vdm-new-notice").show();
|
||||
getIS(2,board);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery(".noticeboard-md").html(all_is_good);
|
||||
}
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery(".noticeboard-md").html(all_is_good);
|
||||
});
|
||||
});
|
||||
// to check is READ/NEW
|
||||
function getIS(type,notice){
|
||||
if (type == 1) {
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json");
|
||||
} else if (type == 2) {
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json");
|
||||
}
|
||||
if(token.length > 0 && notice.length){
|
||||
var request = "token="+token+"¬ice="+notice;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: "POST",
|
||||
url: getUrl,
|
||||
dataType: "jsonp",
|
||||
data: request,
|
||||
jsonp: "callback"
|
||||
});
|
||||
}
|
||||
|
||||
jQuery('#adminForm').on('change', '#haskey',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
@ -379,4 +520,34 @@ jQuery('#adminForm').on('change', '#haskey',function (e)
|
||||
jQuery("#sleutle").closest('.control-group').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
var x=0;
|
||||
setInterval(function() {
|
||||
var dots = "";
|
||||
x++;
|
||||
for (var y=0; y < x%8; y++) {
|
||||
dots+=".";
|
||||
}
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -42,7 +42,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
protected $packageInfo;
|
||||
protected $formPackage;
|
||||
protected $vdmPackages = false;
|
||||
protected $freePackages = array('JCB_demo.zip', 'JCB_helloWorld.zip');
|
||||
protected $directories = array();
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
@ -51,6 +51,8 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
// Include helper submenu
|
||||
ComponentbuilderHelper::addSubmenu('import');
|
||||
}
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
$paths = new stdClass;
|
||||
$paths->first = '';
|
||||
@ -78,15 +80,30 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
{
|
||||
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', null);
|
||||
}
|
||||
|
||||
// get the management input from global settings
|
||||
$manageDirectories = $this->params->get('manage_jcb_package_directories', 2);
|
||||
if ($manageDirectories == 2)
|
||||
{
|
||||
$this->directories = array('vdm','jcb');
|
||||
}
|
||||
elseif ($manageDirectories == 1)
|
||||
{
|
||||
$this->directories = (array) $this->params->get('jcb_package_directories');
|
||||
}
|
||||
|
||||
// set form only if smart package
|
||||
if ($this->dataType === 'smart_package')
|
||||
{
|
||||
$this->packageInfo = json_decode($session->get('smart_package_info', false), true);
|
||||
|
||||
// add the form class
|
||||
jimport('joomla.form.form');
|
||||
|
||||
// load the forms
|
||||
$this->formPackage = $this->_getForm($this->dataType);
|
||||
$this->vdmPackages = $this->_getForm('vdm_package');
|
||||
$this->jcbPackages = $this->_getForm('jcb_package');
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -95,10 +112,73 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// always make sure jquery is loaded.
|
||||
JHtml::_('jquery.framework');
|
||||
|
||||
// Add the JavaScript for JStore
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js');
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js');
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js');
|
||||
// add marked library
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js");
|
||||
// check if we should use browser storage
|
||||
$setBrowserStorage = $this->params->get('set_browser_storage', null);
|
||||
if ($setBrowserStorage)
|
||||
{
|
||||
// check what (Time To Live) show we use
|
||||
$storageTimeToLive = $this->params->get('storage_time_to_live', 'global');
|
||||
if ('global' == $storageTimeToLive)
|
||||
{
|
||||
// use the global session time
|
||||
$session = JFactory::getSession();
|
||||
// must have itin milliseconds
|
||||
$expire = ($session->getExpire()*60)* 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the Componentbuilder Global setting
|
||||
if (0 != $storageTimeToLive)
|
||||
{
|
||||
// this will convert the time into milliseconds
|
||||
$storageTimeToLive = $storageTimeToLive * 1000;
|
||||
}
|
||||
$expire = $storageTimeToLive;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// set to use no storage
|
||||
$expire = 30000; // only 30 seconds
|
||||
}
|
||||
|
||||
// Set the Time To Live To JavaScript
|
||||
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
|
||||
$this->document->addScriptDeclaration("var all_is_good = '".JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME')."';");
|
||||
// add a token on the page for javascript
|
||||
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
|
||||
// add the Uikit v2 style sheets
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
|
||||
// add Uikit v2 JavaScripts
|
||||
$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/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);
|
||||
}
|
||||
|
||||
public function _getForm($type)
|
||||
{
|
||||
$form = array();
|
||||
@ -153,8 +233,33 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
$more_info->setup($more_infoXML,0);
|
||||
// add to form
|
||||
$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 || ComponentbuilderHelper::getPackageComponentsKeyStatus($this->packageInfo))
|
||||
{
|
||||
// set required field
|
||||
$required = true;
|
||||
@ -218,9 +323,9 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
$form[] = $sleutle;
|
||||
}
|
||||
}
|
||||
elseif ('vdm_package' === $type && $listObjects = ComponentbuilderHelper::getGithubRepoFileList('jcbGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
||||
elseif ('vdm_package' === $type && in_array('vdm', $this->directories) && $vdmListObjects = ComponentbuilderHelper::getGithubRepoFileList('vdmGithubPackages', ComponentbuilderHelper::$vdmGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($listObjects))
|
||||
if (ComponentbuilderHelper::checkArray($vdmListObjects))
|
||||
{
|
||||
// get the vdm_package list field
|
||||
$vdm_package = JFormHelper::loadFieldType('list',true);
|
||||
@ -232,7 +337,8 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
'name' => 'vdm_package',
|
||||
'label' => 'COM_COMPONENTBUILDER_PACKAGE',
|
||||
'class' => 'list_class',
|
||||
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT');
|
||||
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT',
|
||||
'onchange' => "getJCBpackageInfo('vdm')");
|
||||
// load the list
|
||||
$load = false;
|
||||
// load the vdm_package attributes
|
||||
@ -241,11 +347,11 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
$vdm_packageOptions = array();
|
||||
$vdm_packageOptions[''] = 'COM_COMPONENTBUILDER__SELECT_PACKAGE_';
|
||||
// load vdm_package options from array
|
||||
foreach($listObjects as $listObject)
|
||||
foreach($vdmListObjects as $vdmListObject)
|
||||
{
|
||||
if (strpos($listObject->path, '.zip') !== false)
|
||||
if (strpos($vdmListObject->path, '.zip') !== false)
|
||||
{
|
||||
$vdm_packageOptions[ComponentbuilderHelper::$jcbGithubPackageUrl.$listObject->path] = $this->setPackageName($listObject->path);
|
||||
$vdm_packageOptions[ComponentbuilderHelper::$vdmGithubPackageUrl.$vdmListObject->path] = $this->setPackageName($vdmListObject->path);
|
||||
$load = true;
|
||||
}
|
||||
}
|
||||
@ -261,22 +367,57 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ('jcb_package' === $type && in_array('jcb', $this->directories) && $jcbListObjects = ComponentbuilderHelper::getGithubRepoFileList('communityGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($jcbListObjects))
|
||||
{
|
||||
// get the jcb_package list field
|
||||
$jcb_package = JFormHelper::loadFieldType('list',true);
|
||||
// start jcb_package xml
|
||||
$jcb_packageXML = new SimpleXMLElement('<field/>');
|
||||
// jcb_package attributes
|
||||
$jcb_packageAttributes = array(
|
||||
'type' => 'list',
|
||||
'name' => 'jcb_package',
|
||||
'label' => 'COM_COMPONENTBUILDER_PACKAGE',
|
||||
'class' => 'list_class',
|
||||
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT',
|
||||
'onchange' => "getJCBpackageInfo('jcb')");
|
||||
// load the list
|
||||
$load = false;
|
||||
// load the jcb_package attributes
|
||||
ComponentbuilderHelper::xmlAddAttributes($jcb_packageXML, $jcb_packageAttributes);
|
||||
// start the jcb_package options
|
||||
$jcb_packageOptions = array();
|
||||
$jcb_packageOptions[''] = 'COM_COMPONENTBUILDER__SELECT_PACKAGE_';
|
||||
// load jcb_package options from array
|
||||
foreach($jcbListObjects as $jcbListObject)
|
||||
{
|
||||
if (strpos($jcbListObject->path, '.zip') !== false)
|
||||
{
|
||||
$jcb_packageOptions[ComponentbuilderHelper::$jcbGithubPackageUrl.$jcbListObject->path] = $this->setPackageName($jcbListObject->path);
|
||||
$load = true;
|
||||
}
|
||||
}
|
||||
// only load if at least one item was found
|
||||
if ($load)
|
||||
{
|
||||
// load the jcb_package options
|
||||
ComponentbuilderHelper::xmlAddOptions($jcb_packageXML, $jcb_packageOptions);
|
||||
// setup the jcb_package radio field
|
||||
$jcb_package->setup($jcb_packageXML,'');
|
||||
// add to form
|
||||
$form[] = $jcb_package;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $form;
|
||||
}
|
||||
|
||||
public function setPackageName($name)
|
||||
{
|
||||
// the free switch
|
||||
if (in_array($name, $this->freePackages))
|
||||
{
|
||||
$type = ' - free';
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = ' - paid';
|
||||
}
|
||||
// return the name
|
||||
return ComponentbuilderHelper::safeString( preg_replace('/(?<!^)([A-Z])/', '-\ \1', str_replace(array('.zip', 'JCB_'), '', $name)), 'W').$type;
|
||||
return ComponentbuilderHelper::safeString( preg_replace('/(?<!^)([A-Z])/', '-\ \1', str_replace(array('.zip', 'JCB_'), '', $name)), 'W');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,4 +96,36 @@ if ($this->saveOrder)
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?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>
|
@ -134,15 +134,20 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$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.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENTS', false);
|
||||
// add Export JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
|
||||
{
|
||||
// add Backup button.
|
||||
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))
|
||||
@ -159,10 +164,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
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.
|
||||
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_COMPONENTS', false);
|
||||
// add Import JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))
|
||||
|
@ -96,4 +96,27 @@ if ($this->saveOrder)
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?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>
|
@ -77,13 +77,13 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('language_translation.edit')): ?>
|
||||
<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 echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_translations.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="name"><?php echo $item->entranslation; ?></div>
|
||||
<div class="name"><?php echo $item->source; ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user