Fixed #884 so we will have correct pagination in admin area J3. Imporved the import of powers JCB-pro.

This commit is contained in:
Llewellyn van der Merwe 2022-05-16 06:25:03 +02:00
parent c5be4ff5fa
commit 1e0533ffa5
Signed by: Llewellyn
GPG Key ID: A9201372263741E7
30 changed files with 855 additions and 554 deletions

View File

@ -12,7 +12,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 save 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.12.16) 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.12.17) 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)
@ -143,13 +143,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 4th April, 2022
+ *Version*: 2.12.16
+ *Last Build*: 9th May, 2022
+ *Version*: 2.12.17
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286290**
+ *Field count*: **1580**
+ *File count*: **1850**
+ *Line count*: **286508**
+ *Field count*: **1581**
+ *File count*: **1851**
+ *Folder count*: **260**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -12,7 +12,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 save 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.12.16) 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.12.17) 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)
@ -143,13 +143,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 4th April, 2022
+ *Version*: 2.12.16
+ *Last Build*: 9th May, 2022
+ *Version*: 2.12.17
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286290**
+ *Field count*: **1580**
+ *File count*: **1850**
+ *Line count*: **286508**
+ *Field count*: **1581**
+ *File count*: **1851**
+ *Folder count*: **260**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -134,18 +134,20 @@
folder="editors"
filter="cmd"
/>
<!-- Github_access_token Field. Type: Text. (joomla) -->
<!-- Github_access_token Field. Type: Password. (joomla) -->
<field
type="text"
type="password"
name="github_access_token"
label="COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_LABEL"
size="128"
maxlength="128"
default="secret"
description="COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_DESCRIPTION"
class="text_area full-width"
message="Error! Please add token here."
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_HINT"
autocomplete="off"
/>
@ -664,6 +666,16 @@
size="60"
default=""
/>
<field type="note" name="medium_key_note" class="alert alert-info" label="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_DESC" />
<field name="medium_key_path"
type="text"
label="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_DESC"
size="160"
filter="PATH"
hint="/home/user/hiddenfolder123/"
default=""
/>
</fieldset>
<fieldset
name="compiler_custom_config"

View File

@ -89,12 +89,13 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$addBackup = $jinput->post->get('backup', 0, 'INT');
$addRepo = $jinput->post->get('repository', 0, 'INT');
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
$addPowers = $jinput->post->get('powers', 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, $minify))
if ($model->builder($version, $componentId, $addBackup, $addRepo, $addPlaceholders, $addPowers, $debugLinenr, $minify))
{
$cache = JFactory::getCache('mod_menu');
$cache->clean();

View File

@ -240,7 +240,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
if (componentbuilderHelper::checkString($model->key) && strlen($model->key) == 32)
{
$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>';
$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_KEY') . '</h1>';
// set the package owner info
if (componentbuilderHelper::getPackageOwnerValue('owner', $model->info) || componentbuilderHelper::getPackageOwnerValue('company', $model->info))
{

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper;
@ -188,7 +189,7 @@ class Get
*
* @var boolean
*/
protected $addPower;
public $addPower;
/**
* The Powers data
@ -1053,7 +1054,10 @@ class Get
$this->debugLinenr = ((int) $config['debuglinenr'] == 0) ? false
: (((int) $config['debuglinenr'] == 1) ? true : $global);
// set if powers should be added to component (default is true)
$global = true;
$global = ((int) GetHelper::var(
'joomla_component', $this->componentID, 'id',
'add_powers'
) == 1) ? true : false;
$this->addPower = (isset($config['powers']) && (int) $config['powers'] == 0)
? false : ((isset($config['powers']) && (int) $config['powers'] == 1) ? true : $global);
// set the current user
@ -6872,8 +6876,10 @@ class Get
// return the select query
return array('select' => $querySelect,
'from' => $queryFrom,
'name' => $queryName, 'table' => $table,
'type' => $type, 'select_gets' => $gets,
'name' => $queryName,
'table' => $table,
'type' => $type,
'select_gets' => $gets,
'select_keys' => $keys);
}
}
@ -8613,13 +8619,13 @@ class Get
* @return void
*
*/
protected function getPowers($ids)
protected function getPowers($guids)
{
if (ArrayHelper::check($ids, true))
if (ArrayHelper::check($guids, true))
{
foreach ($ids as $id)
foreach ($guids as $guid)
{
$this->getPower($id);
$this->getPower($guid);
}
}
}
@ -8630,11 +8636,11 @@ class Get
* @return mixed
*
*/
public function getPower($id)
public function getPower($guid)
{
if ($this->addPower && $this->setPower($id))
if ($this->addPower && $this->setPower($guid))
{
return $this->powers[$id];
return $this->powers[$guid];
}
return false;
@ -8646,14 +8652,14 @@ class Get
* @return bool
*
*/
protected function setPower($id)
protected function setPower($guid)
{
// check if we have been here before
if (isset($this->statePowers[$id]))
if (isset($this->statePowers[$guid]))
{
return $this->statePowers[$id];
return $this->statePowers[$guid];
}
elseif (is_numeric($id) && $id > 0)
elseif (GuidHelper::valid($guid))
{
// Create a new query object.
$query = $this->db->getQuery(true);
@ -8661,20 +8667,20 @@ class Get
$query->select('a.*');
// from these tables
$query->from('#__componentbuilder_power AS a');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
$query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid));
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows())
{
// make sure that in recursion we
// don't try to load this power again
$this->statePowers[$id] = true;
$this->statePowers[$guid] = true;
// get the power data
$power = $this->db->loadObject();
// we set the fix usr if needed
$fix_url
= '"index.php?option=com_componentbuilder&view=powers&task=power.edit&id='
. $id . '" target="_blank"';
// get the power data
$power = $this->db->loadObject();
. $power->id . '" target="_blank"';
// set some keys
$power->target_type = 'P0m3R!';
$power->key = $power->id . '_' . $power->target_type;
@ -8706,7 +8712,7 @@ class Get
$fix_url),
'Error'
);
$this->statePowers[$id] = false;
$this->statePowers[$guid] = false;
// we break out here
return false;
@ -8728,7 +8734,7 @@ class Get
$fix_url),
'Error'
);
$this->statePowers[$id] = false;
$this->statePowers[$guid] = false;
// we break out here
return false;
@ -8765,7 +8771,7 @@ class Get
$fix_url),
'Error'
);
$this->statePowers[$id] = false;
$this->statePowers[$guid] = false;
// we break out here
return false;
@ -8845,7 +8851,7 @@ class Get
unset($power->implements_custom);
}
// does this extend existing
elseif ($implement >= 1)
elseif (GuidHelper::valid($implement))
{
// check if it was set
if ($this->setPower($implement))
@ -8872,7 +8878,7 @@ class Get
unset($power->extends_custom);
}
// does this extend existing
elseif ($power->extends >= 1)
elseif (GuidHelper::valid($power->extends))
{
// check if it was set
if ($this->setPower($power->extends))
@ -8884,7 +8890,7 @@ class Get
}
}
// set GUI mapper
$guiMapper = array('table' => 'power', 'id' => (int) $id, 'type' => 'php');
$guiMapper = array('table' => 'power', 'id' => (int) $power->id, 'type' => 'php');
// add the header script
if ($power->add_head == 1)
{
@ -8941,23 +8947,23 @@ class Get
);
}
// store the power
$this->powers[$id] = $power;
$this->powers[$guid] = $power;
return true;
}
}
// we failed to get the power,
// so we raise an error message
// only if id exist
if ($id > 0)
// only if guid is valid
if (GuidHelper::valid($guid))
{
$this->app->enqueueMessage(
JText::sprintf('<p>Power <b>id:%s</b> not found!</p>', $id),
JText::sprintf('<p>Power <b>guid:%s</b> not found!</p>', $guid),
'Error'
);
}
// let's not try again
$this->statePowers[$id] = false;
$this->statePowers[$guid] = false;
return false;
}

View File

@ -6971,10 +6971,20 @@ class Interpretation extends Fields
// only add if no custom page link is found
if (!$has_pageslinks)
{
$this->placeholders[$this->bbb . 'PAGINATIONEND'
. $this->ddd]
.= PHP_EOL . $this->_t(2)
. '<?php echo $this->pagination->getPagesLinks(); ?>';
if ($this->target === 'custom_admin')
{
$this->placeholders[$this->bbb . 'PAGINATIONEND'
. $this->ddd]
.= PHP_EOL . $this->_t(2)
. '<?php echo $this->pagination->getListFooter(); ?>';
}
else
{
$this->placeholders[$this->bbb . 'PAGINATIONEND'
. $this->ddd]
.= PHP_EOL . $this->_t(2)
. '<?php echo $this->pagination->getPagesLinks(); ?>';
}
}
$this->placeholders[$this->bbb . 'PAGINATIONEND' . $this->ddd]
.= PHP_EOL . $this->_t(1) . '</div>';
@ -6990,8 +7000,16 @@ class Interpretation extends Fields
= '<?php echo $this->pagination->getPagesCounter(); ?>';
// add pages links
$this->placeholders[$this->bbb . 'PAGESLINKS' . $this->ddd]
= '<?php echo $this->pagination->getPagesLinks(); ?>';
if ($this->target === 'custom_admin')
{
$this->placeholders[$this->bbb . 'PAGESLINKS' . $this->ddd]
= '<?php echo $this->pagination->getListFooter(); ?>';
}
else
{
$this->placeholders[$this->bbb . 'PAGESLINKS' . $this->ddd]
= '<?php echo $this->pagination->getPagesLinks(); ?>';
}
// build body
$body = array();
@ -12071,10 +12089,19 @@ class Interpretation extends Fields
&& !$item['title']
&& isset($item['id_code']))
{
// build GUID link
if ($item['custom']['id'] !== 'id')
{
// link to that linked item
return 'index.php?option=' . $item['custom']['component'] . '&view='
. $item['custom']['views'] . '&task=' . $item['custom']['view']
. '.edit&id=<?php echo $item->' . $item['id_code'] . '_id; ?>'
. $ref;
}
// link to that linked item
return 'index.php?option=' . $item['custom']['component'] . '&view='
. $item['custom']['views'] . '&task=' . $item['custom']['view']
. '.edit&id=<?php echo $item->' . $item['id_code'] . '; ?>'
. '.edit&id=<?php echo $item->' . $item['id_code'] . '_id; ?>'
. $ref;
}
elseif (isset($item['custom'])
@ -12156,16 +12183,37 @@ class Interpretation extends Fields
$this->permissionBuilder[$coreLink['core.edit']]
))
{
return $user . "->authorise('" . $coreLink['core.edit']
. "', 'com_" . $this->componentCodeName . "."
. $item['custom']['view'] . ".' . (int)\$item->"
. $item['id_code'] . ")";
// do this with GUID
if (isset($item['custom']['id']) && $item['custom']['id'] !== 'id')
{
return $user . "->authorise('" . $coreLink['core.edit']
. "', 'com_" . $this->componentCodeName . "."
. $item['custom']['view'] . ".' . (int) \$item->"
. $item['id_code'] . "_id)";
}
else
{
return $user . "->authorise('" . $coreLink['core.edit']
. "', 'com_" . $this->componentCodeName . "."
. $item['custom']['view'] . ".' . (int) \$item->"
. $item['id_code'] . ")";
}
}
// do not do this with GUID
if (isset($item['custom']['id']) && $item['custom']['id'] !== 'id')
{
// return default for this external item
return $user . "->authorise('core.edit', 'com_"
. $this->componentCodeName . "." . $item['custom']['view']
. ".' . (int) \$item->" . $item['id_code'] . "_id)";
}
else
{
// return default for this external item
return $user . "->authorise('core.edit', 'com_"
. $this->componentCodeName . "." . $item['custom']['view']
. ".' . (int) \$item->" . $item['id_code'] . ")";
}
// return default for this external item
return $user . "->authorise('core.edit', 'com_"
. $this->componentCodeName . "." . $item['custom']['view']
. ".' . (int)\$item->" . $item['id_code'] . ")";
}
elseif (isset($item['custom'])
&& ArrayHelper::check(
@ -16188,23 +16236,52 @@ class Interpretation extends Fields
$filter['custom']['table'], 'w'
)
) . " table.";
// we want to at times just have the words and not the ids as well
if ($just_text)
// we must add some fix for none ID keys (I know this is horrible... but we need it)
// TODO we assume that all tables in admin has ids
if ($filter['custom']['id'] !== 'id')
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['code'] . "'));";
// we want to at times just have the words and not the ids as well
if ($just_text)
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName(['"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['custom']['db'] . ".id'],['"
. $filter['code'] . "','"
. $filter['code'] . "_id']));";
}
else
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName(['"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['custom']['db'] . ".id'],['"
. $filter['code'] . "_" . $filter['custom']['text']
. "','" . $filter['code'] . "_id']));";
}
}
else
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['code'] . "_" . $filter['custom']['text']
. "'));";
// we want to at times just have the words and not the ids as well
if ($just_text)
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['code'] . "'));";
}
else
{
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
. $filter['code'] . "_" . $filter['custom']['text']
. "'));";
}
}
$query .= PHP_EOL . $this->_t(2) . $tab
. "\$query->join('LEFT', \$db->quoteName('"

View File

@ -14,6 +14,7 @@ COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW="Add more fields to this admin view"
COM_COMPONENTBUILDER_ADD_POWERS="Add Powers"
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder &amp; Sales Server <small>(if set)</small>"
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
COM_COMPONENTBUILDER_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!"
@ -3489,7 +3490,6 @@ COM_COMPONENTBUILDER_CONFIG_FROMNAME_LABEL="From Name"
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_DESCRIPTION="This is only needed when you are on a shared IP or/and have reached the public free limit of API queries to gitHub. So unless you have seen some kind of error that directed you here to add an <b>access token</b> you can just ignore this field."
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_HINT="OAUTH-TOKEN"
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_LABEL="gitHub Access Token<br /><small>Check <a href='https://developer.github.com/v3/#authentication' target='_blank'>https://developer.github.com/v3/#authentication</a> for more info.</small>"
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_MESSAGE="Error! Please add token here."
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_DESCRIPTION="Here you can set the path to the git folder."
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_HINT="/home/user/git"
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_LABEL="Git Folder Path"
@ -3521,6 +3521,11 @@ 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_MEDIUM_KEY_DESC="Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible."
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_LABEL="Medium Key (Path)"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_DESC="When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.<br />Never change this key once it is set, or remove the key file! <b>DATA WILL GET CORRUPTED IF YOU DO!</b> Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a <b>secure connection</b> is recommended!"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_LABEL="Medium Encryption"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_PATH_ERROR="Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."
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="&#187;"
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix<br />
@ -5575,6 +5580,8 @@ COM_COMPONENTBUILDER_HTHREESHTHREEPCUSTOM_CODE_CAN_ONLY_BE_USED_IN_OTHER_CUSTOM_
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_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB="<h2>We could not open the encrypt data!</h2> This could be due to the FOFEncryption that is no longer supported in Joomla.<br />Please export your packages with JCB v3.0.11(pro) or v2.12.17(public) or higher to be able to import it into this version of JCB."
COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLA_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB="<h2>We could not open the package!</h2>This could be due to the FOFEncryption that is no longer supported in Joomla. Please export your packages with JCB v3.0.11(pro) or v2.12.17(public) or higher to be able to import it into this version of JCB."
COM_COMPONENTBUILDER_IAUTHORI_BSB="<i>Author:</i> <b>%s</b>"
COM_COMPONENTBUILDER_ICOMPANYI_BSB="<i>Company:</i> <b>%s</b>"
COM_COMPONENTBUILDER_ICON="Icon"
@ -5732,6 +5739,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_PREFLIGHT_INSTALL_LABEL="Add PHP P
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_PREFLIGHT_UPDATE_LABEL="Add PHP Preflight (update)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL="Custom Code Placeholders"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_DESCRIPTION="Should JCB add any powers that are connected to this component? This may be helpful if you are loading powers via another component, and would like to avoid adding it to both, just remember that in this case you need to load the powers via a plugin."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL="Add Powers"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL="Add Sales Server"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SITE_EVENT_LABEL="Add Global Site Event"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL="Add MySQL - (Install)"
@ -8096,6 +8105,7 @@ COM_COMPONENTBUILDER_SERVER_VERSION_DESC="A count of the number of times this Se
COM_COMPONENTBUILDER_SERVER_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_SET_A_CLASS_VALUE_FOR_THE_LIST_VIEW_OF_THIS_FIELD="Set a class value for the list view of this field."
COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets"
COM_COMPONENTBUILDER_SHOULD_JCB_ADD_ANY_POWERS_THAT_ARE_CONNECTED_TO_THIS_COMPONENT_THIS_MAY_BE_HELPFUL_IF_YOU_ARE_LOADING_POWERS_VIA_ANOTHER_COMPONENT_AND_WOULD_LIKE_TO_AVOID_ADDING_IT_TO_BOTH_JUST_REMEMBER_THAT_IN_THIS_CASE_YOU_NEED_TO_LOAD_THE_POWERS_VIA_A_PLUGIN="Should JCB add any powers that are connected to this component? This may be helpful if you are loading powers via another component, and would like to avoid adding it to both, just remember that in this case you need to load the powers via a plugin."
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."
@ -9146,7 +9156,6 @@ COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL="View Snippet Reference URL"
COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details"
COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION="View Usage of community version"
COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed to this snippet"
COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAENINEKQFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE9kQFlvVXJTM3J2IXM="
COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM="
COM_COMPONENTBUILDER_WEBSITE="Website"
COM_COMPONENTBUILDER_WEBSITE_OF_S="Website of %s"
@ -9156,7 +9165,7 @@ COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move <b>%s</b>!"
COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved <b>%s</b>!"
COM_COMPONENTBUILDER_WHILE_WE_DOWNLOAD_ALL_TWENTY_SIX_COMPILER_GIF_ANIMATIONS_RANDOMLY_USED_IN_THE_COMPILER_GUI_DURING_COMPILATION="While we download all 26 compiler GIF animations randomly used in the compiler GUI during compilation"
COM_COMPONENTBUILDER_YES="Yes"
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key.<br />Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically."
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key."
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_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"

View File

@ -27,7 +27,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'system_name'
'system_name',
'add_powers'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -167,10 +167,36 @@ class ComponentbuilderModelAjax extends JModelList
{
// Get the encryption object.
$db = 'COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM';
$opener = new FOFEncryptAes(base64_decode(JText::sprintf($db, 'QzdmV', '9kQ')), 128);
$info = rtrim($opener->decryptString($info), "\0");
$password = base64_decode(JText::sprintf($db, 'QzdmV', '9kQ'));
// we first use the new encryption
// load phpseclib <https://phpseclib.com/docs/symmetric>
$opened = false;
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// load the system password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
// open the info block
$_info = ComponentbuilderHelper::crypt('AES', 'CBC')->decrypt(base64_decode($info));
// check if we had success
if ($_info !== false)
{
$opened = true;
}
}
// check if we had success
if (!$opened && class_exists('FOFEncryptAes'))
{
$opener = new FOFEncryptAes($password, 128);
$_info = $opener->decryptString($info);
// check if we had success
if ($_info !== false)
{
$opened = true;
$_info = rtrim($_info, "\0");
}
}
// check if we have json
if (ComponentbuilderHelper::checkJson($info))
if ($opened && ComponentbuilderHelper::checkJson($_info))
{
$info = json_decode($info, true);
return array('owner' => ComponentbuilderHelper::getPackageOwnerDetailsDisplay($info, true), 'packages' => ComponentbuilderHelper::getPackageComponentsDetailsDisplay($info));
@ -1065,7 +1091,7 @@ class ComponentbuilderModelAjax extends JModelList
array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('params' => 'custom_admin_view_headers:power_', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW'),
array('table' => 'joomla_component', 'tables' => 'joomla_components', 'fields' => array('params' => 'joomla_component_headers:power_', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT'),
array('table' => 'component_dashboard', 'tables' => 'components_dashboard', 'fields' => array('params' => 'component_dashboard_headers:power_', 'joomla_component' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD', 'linked_name' => 'system_name'),
array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'INT', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER')
array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'GUID', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER')
)
);
@ -1095,8 +1121,14 @@ class ComponentbuilderModelAjax extends JModelList
}
// make sure the ref is set
$this->ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'] . '&return=' . urlencode(base64_encode($return_url));
// specail treatment of powers
$guid = false;
if ('power' === $values['a_view'])
{
$guid = $values['a_guid'];
}
// get the linked to
if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id']))
if ($linked = $this->getLinkedTo($values['a_view'], $values['a_id'], $guid))
{
// just return it for now a table
$table = '<div class="control-group"><table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">';
@ -1119,13 +1151,14 @@ class ComponentbuilderModelAjax extends JModelList
/**
* Get Linked to Items
*
* @param string $view View that is being searched for
* @param int $id ID
* @param string $view View that is being searched for
* @param int $id ID
* @param string $guid GUID
*
* @return array Found items
*
*/
protected function getLinkedTo($view, $id)
protected function getLinkedTo($view, $id, $guid)
{
// reset bucket
$linked = array();
@ -1174,6 +1207,14 @@ class ComponentbuilderModelAjax extends JModelList
$found = true;
}
}
elseif ('GUID' === $target)
{
// check if GUID match
if ($this->linkedGuid($guid, $item->{$key}))
{
$found = true;
}
}
else
{
// check if we have a json
@ -1189,7 +1230,7 @@ class ComponentbuilderModelAjax extends JModelList
// check if ID match
foreach ($item->{$key} as $_id)
{
if ($_id == $id)
if ($_id == $id || $this->linkedGuid($guid, $_id))
{
$found = true;
}
@ -1208,7 +1249,7 @@ class ComponentbuilderModelAjax extends JModelList
{
if ($_size == 2)
{
if (isset($row[$_target[0]]) && isset($row[$_target[0]][$_target[1]]) && $row[$_target[0]][$_target[1]] == $id)
if (isset($row[$_target[0]]) && isset($row[$_target[0]][$_target[1]]) && ($row[$_target[0]][$_target[1]] == $id || $this->linkedGuid($guid, $row[$_target[0]][$_target[1]])))
{
$found = true;
}
@ -1217,7 +1258,7 @@ class ComponentbuilderModelAjax extends JModelList
{
foreach ($row[$_target[0]] as $_row)
{
if (!$found && isset($_row[$_target[2]]) && $_row[$_target[2]] == $id)
if (!$found && isset($_row[$_target[2]]) && ($_row[$_target[2]] == $id || $this->linkedGuid($guid, $_row[$_target[2]])))
{
$found = true;
}
@ -1238,7 +1279,7 @@ class ComponentbuilderModelAjax extends JModelList
{
foreach ($row as $key => $_ids)
{
if (!$found && strpos($key, $_target[1]) !== false && in_array($id, $_ids))
if (!$found && strpos($key, $_target[1]) !== false && (in_array($id, $_ids) || $this->linkedGuid($guid, $_ids)))
{
$found = true;
}
@ -1251,7 +1292,7 @@ class ComponentbuilderModelAjax extends JModelList
{
foreach ($item->{$key} as $row)
{
if (!$found && isset($row[$target]) && $row[$target] == $id)
if (!$found && isset($row[$target]) && ($row[$target] == $id || $this->linkedGuid($guid, $row[$target])))
{
$found = true;
}
@ -1275,7 +1316,7 @@ class ComponentbuilderModelAjax extends JModelList
{
foreach ($_fields as $_field)
{
if ($_field == $id)
if ($_field == $id || $this->linkedGuid($guid, $_field))
{
$found = true;
}
@ -1330,6 +1371,32 @@ class ComponentbuilderModelAjax extends JModelList
}
return false;
}
/**
* Check if we have a GUID match
*
* @param string|bool $guid The active power guid
* @param string|array $setGuid The linked power guid
*
* @return bool true if match is found
*
*/
protected function linkedGuid($guid, $setGuid): bool
{
// check if GUID is valid
if ($guid && ComponentbuilderHelper::validGUID($guid))
{
if (is_string($setGuid) && ComponentbuilderHelper::validGUID($setGuid) && $guid === $setGuid)
{
return true;
}
elseif (is_array($setGuid) && in_array($guid, $setGuid))
{
return true;
}
}
return false;
}
protected $viewid = array();
@ -1356,13 +1423,13 @@ class ComponentbuilderModelAjax extends JModelList
}
}
// set GUID if found (TODO we will later move over to GUID)
// if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false && method_exists('ComponentbuilderHelper', 'validGUID'))
//{
// if (ComponentbuilderHelper::validGUID($guid))
// {
// $this->viewid[$call]['a_guid'] = $guid;
// }
//}
if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false && method_exists('ComponentbuilderHelper', 'validGUID'))
{
if (ComponentbuilderHelper::validGUID($guid))
{
$this->viewid[$call]['a_guid'] = $guid;
}
}
// set return if found
if (($return = ComponentbuilderHelper::get($vdm . '__return')) !== false)
{
@ -1627,11 +1694,11 @@ class ComponentbuilderModelAjax extends JModelList
// set the key get value
$key_get_value = $values['a_id'];
// check if we have a GUID
if (isset($values['a_guid']))
{
$this->ref .= '&guid=' . (string) $values['a_guid'];
$key_get_value = $values['a_guid'];
}
//if (isset($values['a_guid']))
//{
//$this->ref .= '&guid=' . (string) $values['a_guid'];
//$key_get_value = $values['a_guid'];
//}
// load the results
$result = array();
// return field table
@ -2703,7 +2770,7 @@ class ComponentbuilderModelAjax extends JModelList
'name' => 'name'
),
// #__componentbuilder_power (v)
'class_method' => array(
'power' => array(
'search' => array('id', 'system_name', 'name', 'description', 'head', 'namespace', 'main_class_code'),
'views' => 'powers',
'not_base64' => array('description'),

View File

@ -202,13 +202,14 @@ class ComponentbuilderModelCompiler extends JModelList
return true;
}
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
public function builder($version, $id, $backup, $repo, $addPlaceholders, $addPowers, $debugLinenr, $minify)
{
$set['version'] = $version;
$set['component'] = $id;
$set['backup'] = $backup;
$set['repository'] = $repo;
$set['placeholders'] = $addPlaceholders;
$set['powers'] = $addPowers;
$set['debuglinenr'] = $debugLinenr;
$set['minify'] = $minify;
// run compiler

View File

@ -156,48 +156,6 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT"
/>
<!-- Php_admin_event Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_admin_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Php_site_event Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_site_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Created Field. Type: Calendar. (joomla) -->
<field
type="calendar"
name="created"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DESCRIPTION"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
size="22"
/>
<!-- Php_helper_both Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -214,39 +172,33 @@
filter="raw"
validate="code"
/>
<!-- Created Field. Type: Calendar. (joomla) -->
<field
type="calendar"
name="created"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DESCRIPTION"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
size="22"
/>
<!-- Crowdin_project_identifier Field. Type: Text. (joomla) -->
<field
type="text"
name="crowdin_project_identifier"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_MESSAGE"
autocomplete="off"
onchange="getTranslationToolDetails()"
/>
<!-- Note_readme Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_readme" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_DESCRIPTION" heading="h4" class="note_readme" />
<!-- Debug_linenr Field. Type: Radio. (joomla) -->
<field
type="radio"
name="debug_linenr"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Php_preflight_install Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_install"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Php_method_uninstall Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -263,8 +215,22 @@
filter="raw"
validate="code"
/>
<!-- Note_version_options_3 Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_3" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_3_DESCRIPTION" class="alert alert-info note_version_options_3" showon="mvc_versiondate:3" />
<!-- Php_preflight_install Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_install"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Css_admin Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -281,6 +247,8 @@
filter="raw"
validate="code"
/>
<!-- Note_version_options_3 Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_3" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_3_DESCRIPTION" class="alert alert-info note_version_options_3" showon="mvc_versiondate:3" />
<!-- Note_version_options_2 Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_2" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_2_DESCRIPTION" class="alert alert-info note_version_options_2" showon="mvc_versiondate:2" />
<!-- Note_version_options_1 Field. Type: Note. A None Database Field. (joomla) -->
@ -336,8 +304,38 @@
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_dynamic_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_dynamic_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_dynamic_dashboard" />
<!-- Php_admin_event Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_admin_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Php_site_event Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_site_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Description Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -350,6 +348,24 @@
filter="HTML"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_HINT"
/>
<!-- Note_dynamic_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_dynamic_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_dynamic_dashboard" />
<!-- Author Field. Type: Text. (joomla) -->
<field
type="text"
name="author"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL"
size="10"
maxlength="120"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="HTML"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT"
/>
<!-- Php_postflight_install Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -366,35 +382,6 @@
filter="raw"
validate="code"
/>
<!-- Author Field. Type: Text. (joomla) -->
<field
type="text"
name="author"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL"
size="10"
maxlength="120"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="HTML"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT"
/>
<!-- Sql_uninstall Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="sql_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_HINT"
required="true"
/>
<!-- Email Field. Type: Text. (joomla) -->
<field
type="text"
@ -410,8 +397,19 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT"
/>
<!-- Note_update_server_note_ftp Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_ftp" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_ftp" />
<!-- Sql_uninstall Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="sql_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_HINT"
required="true"
/>
<!-- Website Field. Type: Url. (joomla) -->
<field
type="url"
@ -428,8 +426,21 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT"
/>
<!-- Note_buildcomp_dynamic_mysql Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_buildcomp_dynamic_mysql" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION" heading="h4" class="alert alert-info note_buildcomp_dynamic_mysql" />
<!-- Debug_linenr Field. Type: Radio. (joomla) -->
<field
type="radio"
name="debug_linenr"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Add_license Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -445,21 +456,8 @@
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Add_email_helper Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_email_helper"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_buildcomp_dynamic_mysql Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_buildcomp_dynamic_mysql" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION" heading="h4" class="alert alert-info note_buildcomp_dynamic_mysql" />
<!-- License_type Field. Type: List. (joomla) -->
<field
type="list"
@ -481,6 +479,23 @@
<option value="4">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE</option>
</field>
<!-- Add_email_helper Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_email_helper"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_whmcs_lisencing_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_lisencing_note" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_lisencing_note" />
<!-- Php_helper_admin Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -497,24 +512,6 @@
filter="raw"
validate="code"
/>
<!-- Note_whmcs_lisencing_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_lisencing_note" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_lisencing_note" />
<!-- Php_helper_site Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_helper_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_DESCRIPTION"
width="100%"
height="550px"
cols="15"
rows="80"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Whmcs_key Field. Type: Text. (joomla) -->
<field
type="text"
@ -528,18 +525,18 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_HINT"
/>
<!-- Javascript Field. Type: Editor. (joomla) -->
<!-- Php_helper_site Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION"
name="php_helper_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_DESCRIPTION"
width="100%"
height="450px"
height="550px"
cols="15"
rows="30"
rows="80"
buttons="no"
syntax="javascript"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
@ -559,18 +556,18 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_HINT"
/>
<!-- Css_site Field. Type: Editor. (joomla) -->
<!-- Javascript Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_DESCRIPTION"
name="javascript"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
syntax="javascript"
editor="codemirror|none"
filter="raw"
validate="code"
@ -590,8 +587,22 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_HINT"
/>
<!-- Note_botton_component_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_botton_component_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_botton_component_dashboard" />
<!-- Css_site Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- License Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -606,22 +617,8 @@
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_HINT"
required="true"
/>
<!-- Php_preflight_update Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Note_botton_component_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_botton_component_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_botton_component_dashboard" />
<!-- Bom Field. Type: Filelist. (joomla) -->
<field
type="filelist"
@ -634,12 +631,12 @@
hide_none="true"
hide_default="true"
/>
<!-- Php_postflight_update Field. Type: Editor. (joomla) -->
<!-- Php_preflight_update Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_postflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_DESCRIPTION"
name="php_preflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
@ -658,18 +655,21 @@
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION"
directory=""
/>
<!-- Sql Field. Type: Textarea. (joomla) -->
<!-- Php_postflight_update Field. Type: Editor. (joomla) -->
<field
type="textarea"
name="sql"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL"
rows="30"
type="editor"
name="php_postflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_DESCRIPTION"
class="text_area span12"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_HINT"
required="true"
validate="code"
/>
<!-- Copyright Field. Type: Textarea. (joomla) -->
<field
@ -685,6 +685,21 @@
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_HINT"
required="true"
/>
<!-- Sql Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="sql"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_HINT"
required="true"
/>
<!-- Note_update_server_note_ftp Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_ftp" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_ftp" />
<!-- Addreadme Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -727,23 +742,6 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_HINT"
/>
<!-- Crowdin_project_identifier Field. Type: Text. (joomla) -->
<field
type="text"
name="crowdin_project_identifier"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_MESSAGE"
autocomplete="off"
onchange="getTranslationToolDetails()"
/>
<!-- Note_update_server_note_other Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_other" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_other" />
<!-- Component_version Field. Type: Text. (joomla) -->
<field
type="text"
@ -759,6 +757,23 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_HINT"
/>
<!-- Note_update_server_note_other Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_other" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_other" />
<!-- Add_powers Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_powers"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Translation_tool Field. Type: List. (joomla) -->
<field
type="list"

View File

@ -84,6 +84,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected $dir = false;
protected $target = false;
protected $newID = array();
protected $packageInfo = null;
protected $noopmaker;
protected $updateAfter = array('field' => array(), 'adminview' => array());
protected $divergedDataMover = array();
protected $fieldTypes = array();
@ -151,7 +153,15 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
// before we clear this, we add it locally
$packageInfo = $session->get('smart_package_info', null);
// now clear it
$session->clear('smart_package_info');
// convert to an array if found
if ($packageInfo && ComponentbuilderHelper::checkJson($packageInfo))
{
$this->packageInfo = json_decode($packageInfo, true);
}
break;
default:
@ -185,7 +195,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$session->clear('backto_VDM_IMPORT');
if ($back)
{
$this->app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
$this->app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view=' . $back);
}
$session->clear('backto_VDM_IMPORT');
return false;
@ -335,18 +345,18 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// load the data
if ($info = @file_get_contents($infoFile))
{
// remove all line breaks
$info = str_replace("\n", '', $info);
// make sure we have base64
if ($info === base64_encode(base64_decode($info, true)))
// Get the password.
$db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM';
$password = base64_decode(JText::sprintf($db, 'VjR', 'WV0aE9k'));
// unlock the info data
if (($info = $this->unlock($info, $password, true)) !== false && ComponentbuilderHelper::checkJson($info))
{
// Get the encryption object.
$db = 'COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAENINEKQFLVVXJTMTHREEJTWOIXM';
$opener = new FOFEncryptAes(base64_decode(JText::sprintf($db, 'QzdmV')), 128);
$info = rtrim($opener->decryptString($info), "\0");
// we only continue if info could be opened
$session->set('smart_package_info', $info);
return true;
}
// do not have check sum validation
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLA_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error');
}
}
ComponentbuilderHelper::removeFolder($this->dir);
@ -656,24 +666,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected function extractData($data)
{
// remove all line breaks
$data = str_replace("\n", '', $data);
// make sure we have base64
if ($data === base64_encode(base64_decode($data, true)))
if (($data = $this->unlock($data, $this->sleutle)) !== false)
{
// open the data
if(ComponentbuilderHelper::checkString($this->sleutle) && strlen($this->sleutle) == 32)
{
// Get the encryption object.
$opener = new FOFEncryptAes($this->sleutle, 128);
$data = rtrim($opener->decryptString($data), "\0");
}
else
{
$data = base64_decode($data);
}
// final check if we have success
$data = @unserialize($data);
if ($data !== false)
if (ComponentbuilderHelper::checkArray($data))
{
// set the data global
$this->data = $data;
@ -1005,7 +1002,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
/**
* Method to unlock all files
* Method to unlock all files in all folders of this package
*
* @return void
*/
@ -1014,7 +1011,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// lock the data if set
if(ComponentbuilderHelper::checkString($this->sleutle) && strlen($this->sleutle) == 32)
{
$unlocker = new FOFEncryptAes($this->sleutle, 128);
// we must first store the current working directory
$joomla = getcwd();
// to avoid that it decrypt the db and info file again we must move per/folder
@ -1026,7 +1022,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// go to the package sub folder if found
if (JFolder::exists($subPath))
{
$this->unlock($subPath, $unlocker);
$this->unLockFile($subPath);
}
}
// change back to working dir
@ -1035,11 +1031,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
/**
* The Unlocker
* The unlocking files
*
* @return void
*/
protected function unlock(&$tmpPath, &$unlocker)
protected function unLockFile(&$tmpPath)
{
// we are changing the working directory to the tmp path (important)
chdir($tmpPath);
@ -1048,12 +1044,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// read in the file content
foreach ($files as $file)
{
// check that the string is base64
$data = str_replace("\n", '', file_get_contents($file));
if ($data === base64_encode(base64_decode($data, true)))
// open the file content
if (($data = $this->unlock(file_get_contents($file), $this->sleutle)) !== false)
{
// write the decrypted data back to file
if (!ComponentbuilderHelper::writeFile($file, rtrim($unlocker->decryptString($data), "\0")))
if (!ComponentbuilderHelper::writeFile($file, $data))
{
// in case file could not be unlocked
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error');
@ -1064,9 +1059,79 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED', $file), 'success');
}
}
else
{
// in case file could not be unlocked
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED', $file), 'error');
}
}
}
/**
* unlock data
*
* @param string $data The data string
* @param string $password The key to unlock
* @param bool $force Should we force phpseclib decryption
*
* @return mixed the data, or false
*
* @since 3.0.11
**/
protected function unlock(string $data, string $password, bool $force = false)
{
// remove all line breaks
$data = str_replace("\n", '', $data);
// make sure we have base64
if ($data === base64_encode(base64_decode($data, true)))
{
// open the data
if(ComponentbuilderHelper::checkString($password) && strlen($password) == 32)
{
// check if we should use the phpseclib decryption
$phpseclip = (isset($this->packageInfo['phpseclib']) && $this->packageInfo['phpseclib']) ? true : $force;
// load phpseclib <https://phpseclib.com/docs/symmetric>
if($phpseclip && ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// load the system password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
// open the data block
$data = ComponentbuilderHelper::crypt('AES', 'CBC')->decrypt(base64_decode($data));
// check if we had success
if ($data !== false)
{
return $data;
}
}
// check if we had success
if (class_exists('FOFEncryptAes'))
{
// Get the encryption object.
if (!$this->noopmaker instanceof FOFEncryptAes)
{
$this->noopmaker = new FOFEncryptAes($password, 128);
}
// open the data block
$data = $this->noopmaker->decryptString($data);
// check if we had success
if ($data !== false)
{
return $data;
}
else
{
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_ENCRYPT_DATAHTWO_THIS_COULD_BE_DUE_TO_THE_FOFENCRYPTION_THAT_IS_NO_LONGER_SUPPORTED_IN_JOOMLABR_PLEASE_EXPORT_YOUR_PACKAGES_WITH_JCB_VTHREEZEROELEVENPRO_OR_VTWOONETWOSEVENTEENPUBLIC_OR_HIGHER_TO_BE_ABLE_TO_IMPORT_IT_INTO_THIS_VERSION_OF_JCB'), 'error');
}
}
}
else
{
return base64_decode($data);
}
}
return false;
}
/**
* Update some items after all
*
@ -1323,7 +1388,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// get the power
$query = $this->_db->getQuery(true);
$query->select(array('a.id', 'a.extends', 'a.implements', 'a.use_selection', 'a.property_selection', 'a.method_selection'));
$query->select(array('a.id', 'a.property_selection', 'a.method_selection'));
$query->from($this->_db->quoteName('#__componentbuilder_power', 'a'));
$query->where($this->_db->quoteName('a.id') . ' = '. (int) $power);
// see if we get an item
@ -1332,14 +1397,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if ($this->_db->getNumRows())
{
$item = $this->_db->loadObject();
// now update extends
$item = $this->setNewID($item, 'extends', 'power', 'power');
// now update implements
$item = $this->setNewID($item, 'implements', 'power', 'power');
// subform fields to target
$updaterT = array(
// subformfield => array( field => type_value )
'use_selection' => array('use' => 'power'),
'property_selection' => array('property' => 'class_property'),
'method_selection' => array('method' => 'class_method')
);
@ -1828,37 +1888,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
$item->system_name = $item->system_name.$this->postfix;
}
// param fields to target
if ($type === 'site_view')
{
$updaterP = array(
// param_field => field* => field_table
'site_view_headers' => array(
'power_site_view_model' => 'power',
'power_site_view' => 'power',
'power_site_view_controller' => 'power',
'power_site_views_model' => 'power',
'power_site_views' => 'power',
'power_site_views_controller' => 'power'
)
);
}
else
{
$updaterP = array(
// param_field => field* => field_table
'custom_admin_view_headers' => array(
'power_custom_admin_view_model' => 'power',
'power_custom_admin_view' => 'power',
'power_custom_admin_view_controller' => 'power',
'power_custom_admin_views_model' => 'power',
'power_custom_admin_views' => 'power',
'power_custom_admin_views_controller' => 'power'
)
);
}
// update the params ids
$this->updateParamIDs($item, $type, $updaterP);
break;
case 'admin_view':
// set the getters anchors
@ -1911,14 +1940,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// param fields to target
$updaterP = array(
// param_field => field* => field_table
'admin_view_headers' => array(
'power_admin_view_model' => 'power',
'power_admin_view' => 'power',
'power_admin_view_controller' => 'power',
'power_admin_views_model' => 'power',
'power_admin_views' => 'power',
'power_admin_views_controller' => 'power'
),
'fieldordering' => array(
'admin_ordering_fields.field' => 'field',
'linked_ordering_fields.field' => 'field'
@ -2073,18 +2094,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
);
// update the repeatable fields
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
// param fields to target
$updaterP = array(
// param_field => field* => field_table
'joomla_component_headers' => array(
'power_admin_component' => 'power',
'power_site_component' => 'power',
'power_admin_helper' => 'power',
'power_site_helper' => 'power'
)
);
// update the params ids
$this->updateParamIDs($item, $type, $updaterP);
// if we can't merge add postfix to name
if ($this->postfix)
{

View File

@ -60,7 +60,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'copyright'
),
'above' => array(
'system_name'
'system_name',
'add_powers'
),
'under' => array(
'not_required'
@ -90,6 +91,27 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'css_site'
)
),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
),
'right' => array(
'translation_tool',
'note_crowdin',
'crowdin_project_identifier',
'crowdin_project_api_key',
'crowdin_username',
'crowdin_account_api_key'
)
),
'readme' => array(
'left' => array(
'addreadme',
@ -130,27 +152,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'assets_table_fix'
)
),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
),
'right' => array(
'translation_tool',
'note_crowdin',
'crowdin_project_identifier',
'crowdin_project_api_key',
'crowdin_username',
'crowdin_account_api_key'
)
),
'dynamic_build_beta' => array(
'fullwidth' => array(
'note_buildcomp_dynamic_mysql',
@ -341,6 +342,30 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_helper_both))
{
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_method_uninstall))
{
// base64 Decode php_method_uninstall.
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
}
if (!empty($item->php_preflight_install))
{
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
}
if (!empty($item->css_admin))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->php_admin_event))
{
// base64 Decode php_admin_event.
@ -353,30 +378,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->php_site_event = base64_decode($item->php_site_event);
}
if (!empty($item->php_helper_both))
{
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_preflight_install))
{
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
}
if (!empty($item->php_method_uninstall))
{
// base64 Decode php_method_uninstall.
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
}
if (!empty($item->css_admin))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->php_postflight_install))
{
// base64 Decode php_postflight_install.
@ -1408,6 +1409,30 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['addcontributors'] = '';
}
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
// Set the php_method_uninstall string to base64 string.
if (isset($data['php_method_uninstall']))
{
$data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
}
// Set the php_preflight_install string to base64 string.
if (isset($data['php_preflight_install']))
{
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the php_admin_event string to base64 string.
if (isset($data['php_admin_event']))
{
@ -1420,30 +1445,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['php_site_event'] = base64_encode($data['php_site_event']);
}
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
// Set the php_preflight_install string to base64 string.
if (isset($data['php_preflight_install']))
{
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
}
// Set the php_method_uninstall string to base64 string.
if (isset($data['php_method_uninstall']))
{
$data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the php_postflight_install string to base64 string.
if (isset($data['php_postflight_install']))
{

View File

@ -104,6 +104,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->removeOldComponentValues($item);
// load to global object
$this->smartBox['joomla_component'][$item->id] = $item;
// set the powers linked to this joomla component
$this->setSmartIDs($this->getValues($item->params, 'power', 'joomla_component_headers', null), 'power', false);
// add to pks
$pks[] = $item->id;
}
@ -266,6 +268,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->setLanguageTranslation($item->id);
// load to global object
$this->smartBox['joomla_component'][$item->id] = $item;
// set the powers linked to this joomla component
$this->setSmartIDs($this->getValues($item->params, 'power', 'joomla_component_headers', null), 'power', false);
// add to pks
$pks[] = $item->id;
}
@ -402,7 +406,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add powers
if (isset($this->smartIDs['power']) && ComponentbuilderHelper::checkArray($this->smartIDs['power']))
{
$this->setData('power', array_values($this->smartIDs['power']), 'id');
$this->setData('power', array_values($this->smartIDs['power']), 'guid');
}
// set limiter
$limit = 0;
@ -697,8 +701,24 @@ class ComponentbuilderModelJoomla_components extends JModelList
$query->select(array('a.*'));
// From the componentbuilder_ANY table
$query->from($this->_db->quoteName('#__componentbuilder_'. $table, 'a'));
// set the where query
$query->where('a.'.$key.' IN (' . implode(',',$values) . ')');
// check if this is an array of integers
if ($this->is_numeric($values))
{
// set the where query
$query->where('a.'.$key.' IN (' . implode(',', $values) . ')');
}
else
{
// set the where query
$query->where('a.'.$key.' IN (' . implode(',', array_map( function ($var) {
// check if already quoted
if (preg_match('/^(["\']).*\1$/m', $var))
{
return $var;
}
return $this->_db->quote($var);
}, $values)) . ')');
}
// Implement View Level Access
if (!$this->user->authorise('core.options', 'com_componentbuilder'))
{
@ -806,19 +826,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
if ('joomla_component' === $table)
{
// 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);
// set the powers linked to this admin view
$this->setSmartIDs($this->getValues($item->params, 'power', 'joomla_component_headers', null), 'power');
$this->removeOldComponentValues($item);
// set the powers linked to this joomla component
$this->setSmartIDs($this->getValues($item->params, 'power', 'joomla_component_headers', null), 'power', false);
}
// actions to take before storing the item if table is admin_view
if ('admin_view' === $table)
@ -845,6 +855,12 @@ class ComponentbuilderModelJoomla_components extends JModelList
// build full path folders
$this->moveIt($this->getValues($item->addfoldersfullpath, 'subform', 'folderpath', null), 'folder', true);
}
// actions to take if table is component_dashboard
if ('component_dashboard' === $table)
{
// set the powers linked to this dashboard
$this->setSmartIDs($this->getValues($item->params, 'power', 'component_dashboard_headers', null), 'power', false);
}
// actions to take if table is component_config
if ('component_config' === $table)
{
@ -917,7 +933,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add fields & conditions
$this->setSmartIDs($item->id, 'admin_view');
// set the powers linked to this admin view
$this->setSmartIDs($this->getValues($item->params, 'power', 'admin_view_headers', null), 'power');
$this->setSmartIDs($this->getValues($item->params, 'power', 'admin_view_headers', null), 'power', false);
// do not move anything if clone
if ('clone' !== $this->activeType)
{
@ -1027,13 +1043,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
if ('site_view' === $table)
{
// set the powers linked to this admin view
$this->setSmartIDs($this->getValues($item->params, 'power', 'site_view_headers', null), 'power');
$this->setSmartIDs($this->getValues($item->params, 'power', 'site_view_headers', null), 'power', false);
}
// actions to take if table is custom_admin_view
elseif ('custom_admin_view' === $table)
{
// set the powers linked to this admin view
$this->setSmartIDs($this->getValues($item->params, 'power', 'custom_admin_view_headers', null), 'power');
$this->setSmartIDs($this->getValues($item->params, 'power', 'custom_admin_view_headers', null), 'power', false);
}
}
// actions to take if table is template and layout
@ -1098,17 +1114,23 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add joomla_plugin_group
$this->setSmartIDs((int) $item->joomla_plugin_group, 'joomla_plugin_group');
}
// actions to take if table is dynamic_get
if ('dynamic_get' === $table)
{
// add dynamic_get_headers
$this->setSmartIDs($this->getValues($item->params, 'power', 'dynamic_get_headers', null), 'power', false);
}
// actions to take if table is power
if ('power' === $table)
{
// add the extended class (powers)
$this->setData('power', $item->extends, 'id');
$this->setData('power', $item->extends, 'guid');
// add implements interfaces (powers)
$this->setData('power', $item->implements, 'id');
$this->setData('power', $item->implements, 'guid');
// add use classes (powers)
$this->setData('power', $this->getValues($item->use_selection, 'subform', 'use'), 'id');
$this->setData('power', $this->getValues($item->use_selection, 'subform', 'use'), 'guid');
// add load classes (powers)
$this->setData('power', $this->getValues($item->load_selection, 'subform', 'load'), 'id');
$this->setData('power', $this->getValues($item->load_selection, 'subform', 'load'), 'guid');
// add property_selection
$this->setData('class_property', $this->getValues($item->property_selection, 'subform', 'property'), 'id');
// add class_method
@ -1119,6 +1141,23 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
}
/**
* Method to check if array has only numiric values
*
* @return bool
**/
protected function is_numeric($array)
{
foreach ($array as $value)
{
if (!is_numeric($value))
{
return false;
}
}
return true;
}
/**
* Method to do the smart cloning
*
@ -1202,8 +1241,21 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
// lock the data
$this->key = md5(implode('', $this->key));
$locker = new FOFEncryptAes($this->key, 128);
$data = $locker->encryptString($data);
// April 20, 2022 we moved away from FOF for good... sorry that it took this long
// $locker = new FOFEncryptAes($this->key, 128);
// $data = $locker->encryptString($data);
// load phpseclib <https://phpseclib.com/docs/symmetric>
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// set the password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($this->key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
// lock the data
$data = base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt($data));
}
else
{
return false;
}
// Set the key owner information
$this->info['getKeyFrom'] = array();
$this->info['getKeyFrom']['company'] = $this->info['source']['company'];
@ -1227,12 +1279,16 @@ class ComponentbuilderModelJoomla_components extends JModelList
// if we have multi links add them also
// we started adding this at v2.7.7
$this->info['key'] = true;
// we started adding this at v3.0.11 and v2.12.17
$this->info['phpseclib'] = true;
}
else
{
// we started adding this at v2.7.7
$this->info['key'] = false;
// Set the owner information
// we started adding this at v3.0.11 and v2.12.17
$this->info['phpseclib'] = false;
// base 64 encode the data
$data = base64_encode($data);
}
// set the path
@ -1243,15 +1299,26 @@ class ComponentbuilderModelJoomla_components extends JModelList
return false;
}
// set info data
$db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM';
$locker = new FOFEncryptAes(base64_decode(JText::sprintf($db, 'VjR', 'WV0aE9k')), 128);
$info = $locker->encryptString(json_encode($this->info));
// set the path
$infoPath = $this->packagePath . '/info.vdm';
// write the db data to file in package
if (!ComponentbuilderHelper::writeFile($infoPath, wordwrap($info, 128, "\n", true)))
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
return false;
// set system password
$db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM';
$password = base64_decode(JText::sprintf($db, 'VjR', 'WV0aE9k'));
// set the password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
// lock the data
$info = base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt(json_encode($this->info)));
// set the path
$infoPath = $this->packagePath . '/info.vdm';
// write the info data to file in package
if (!ComponentbuilderHelper::writeFile($infoPath, wordwrap($info, 128, "\n", true)))
{
return false;
}
}
else
{
return false;
}
// lock all files
$this->lockFiles();
@ -1296,7 +1363,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
// lock the data if set
if (ComponentbuilderHelper::checkString($this->key) && strlen($this->key) == 32)
{
$locker = new FOFEncryptAes($this->key, 128);
// set secure password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($this->key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
// we must first store the current working directory
$joomla = getcwd();
// to avoid that it encrypt the db and info file again we must move per/folder
@ -1309,7 +1377,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// go to the package sub folder if found
if (JFolder::exists($subPath))
{
$this->lock($subPath, $locker);
$this->lock($subPath);
}
}
// change back to working dir
@ -1322,7 +1390,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
*
* @return void
*/
protected function lock(&$tmpPath, &$locker)
protected function lock(&$tmpPath)
{
// we are changing the working directory to the tmp path (important)
chdir($tmpPath);
@ -1332,7 +1400,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
foreach ($files as $file)
{
// write the encrypted string back to file
if (!ComponentbuilderHelper::writeFile($file, wordwrap($locker->encryptString(file_get_contents($file)), 128, "\n", true)))
if (!ComponentbuilderHelper::writeFile($file, wordwrap(base64_encode(ComponentbuilderHelper::crypt('AES', 'CBC')->encrypt(file_get_contents($file))), 128, "\n", true)))
{
// we should add error handler here in case file could not be locked
}
@ -2141,7 +2209,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
'name' => 'name'
),
// #__componentbuilder_power (v)
'class_method' => array(
'power' => array(
'search' => array('id', 'system_name', 'name', 'description', 'head', 'namespace', 'main_class_code'),
'views' => 'powers',
'not_base64' => array('description'),
@ -2576,31 +2644,31 @@ class ComponentbuilderModelJoomla_components extends JModelList
continue;
}
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_method_uninstall
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// decode php_preflight_install
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode php_admin_event
$item->php_admin_event = base64_decode($item->php_admin_event);
// decode php_site_event
$item->php_site_event = base64_decode($item->php_site_event);
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_preflight_install
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// decode php_method_uninstall
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode php_postflight_install
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// decode sql_uninstall
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// decode php_helper_admin
$item->php_helper_admin = base64_decode($item->php_helper_admin);
// decode php_helper_site
$item->php_helper_site = base64_decode($item->php_helper_site);
if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
{
// decrypt whmcs_key
$item->whmcs_key = $basic->decryptString($item->whmcs_key);
}
// decode php_helper_site
$item->php_helper_site = base64_decode($item->php_helper_site);
// decode javascript
$item->javascript = base64_decode($item->javascript);
// decode css_site

View File

@ -17,6 +17,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`add_php_preflight_install` TINYINT(1) NOT NULL DEFAULT 0,
`add_php_preflight_update` TINYINT(1) NOT NULL DEFAULT 0,
`add_placeholders` TINYINT(1) NOT NULL DEFAULT 0,
`add_powers` TINYINT(1) NOT NULL DEFAULT 1,
`add_sales_server` TINYINT(1) NOT NULL DEFAULT 0,
`add_site_event` TINYINT(1) NOT NULL DEFAULT 0,
`add_sql` TINYINT(1) NOT NULL DEFAULT 0,
@ -104,15 +105,16 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
PRIMARY KEY (`id`),
KEY `idx_system_name` (`system_name`),
KEY `idx_name_code` (`name_code`),
KEY `idx_debug_linenr` (`debug_linenr`),
KEY `idx_mvc_versiondate` (`mvc_versiondate`),
KEY `idx_remove_line_breaks` (`remove_line_breaks`),
KEY `idx_add_placeholders` (`add_placeholders`),
KEY `idx_debug_linenr` (`debug_linenr`),
KEY `idx_add_license` (`add_license`),
KEY `idx_add_email_helper` (`add_email_helper`),
KEY `idx_license_type` (`license_type`),
KEY `idx_add_email_helper` (`add_email_helper`),
KEY `idx_addreadme` (`addreadme`),
KEY `idx_add_sales_server` (`add_sales_server`),
KEY `idx_add_powers` (`add_powers`),
KEY `idx_translation_tool` (`translation_tool`),
KEY `idx_add_php_helper_both` (`add_php_helper_both`),
KEY `idx_add_php_helper_admin` (`add_php_helper_admin`),

View File

@ -0,0 +1 @@
ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_powers` TINYINT(1) NOT NULL DEFAULT 1 AFTER `add_placeholders`;

View File

@ -173,6 +173,20 @@ class ComponentbuilderViewCompiler extends JViewLegacy
'0' => 'COM_COMPONENTBUILDER_NO');
// add to form
$form[] = ComponentbuilderHelper::getFieldObject($attributes, 2, $options);
// powers attributes
$attributes = array(
'type' => 'radio',
'name' => 'powers',
'label' => 'COM_COMPONENTBUILDER_ADD_POWERS',
'class' => 'btn-group btn-group-yesno',
'description' => 'COM_COMPONENTBUILDER_SHOULD_JCB_ADD_ANY_POWERS_THAT_ARE_CONNECTED_TO_THIS_COMPONENT_THIS_MAY_BE_HELPFUL_IF_YOU_ARE_LOADING_POWERS_VIA_ANOTHER_COMPONENT_AND_WOULD_LIKE_TO_AVOID_ADDING_IT_TO_BOTH_JUST_REMEMBER_THAT_IN_THIS_CASE_YOU_NEED_TO_LOAD_THE_POWERS_VIA_A_PLUGIN',
'default' => '2');
$options = array(
'2' => 'COM_COMPONENTBUILDER_GLOBAL',
'1' => 'COM_COMPONENTBUILDER_YES',
'0' => 'COM_COMPONENTBUILDER_NO');
// add to form
$form[] = ComponentbuilderHelper::getFieldObject($attributes, 2, $options);
// component attributes
$attributes = array(
'type' => 'list',

View File

@ -94,8 +94,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $item->main_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->main_get_name); ?>
<?php endif; ?>

View File

@ -72,8 +72,8 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int)$item->fieldtype)): ?>
<a href="index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id=<?php echo $item->fieldtype; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->fieldtype_name); ?></a>
<?php if ($this->user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int) $item->fieldtype)): ?>
<a href="index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id=<?php echo $item->fieldtype_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->fieldtype_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->fieldtype_name); ?>
<?php endif; ?>

View File

@ -72,8 +72,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=jo
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int)$item->class_extends)): ?>
<a href="index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id=<?php echo $item->class_extends; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->class_extends_name); ?></a>
<?php if ($this->user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int) $item->class_extends)): ?>
<a href="index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id=<?php echo $item->class_extends_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->class_extends_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->class_extends_name); ?>
<?php endif; ?>

View File

@ -101,8 +101,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int)$item->class_extends)): ?>
<a href="index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id=<?php echo $item->class_extends; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->class_extends_name); ?></a>
<?php if ($this->user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int) $item->class_extends)): ?>
<a href="index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id=<?php echo $item->class_extends_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->class_extends_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->class_extends_name); ?>
<?php endif; ?>
@ -110,8 +110,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.' . (int)$item->joomla_plugin_group)): ?>
<a href="index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=joomla_plugin_group.edit&id=<?php echo $item->joomla_plugin_group; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->joomla_plugin_group_name); ?></a>
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.' . (int) $item->joomla_plugin_group)): ?>
<a href="index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=joomla_plugin_group.edit&id=<?php echo $item->joomla_plugin_group_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->joomla_plugin_group_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->joomla_plugin_group_name); ?>
<?php endif; ?>

View File

@ -82,8 +82,8 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $item->dynamic_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->dynamic_get_name); ?>
<?php endif; ?>

View File

@ -94,8 +94,8 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $item->main_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->main_get_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->main_get_name); ?>
<?php endif; ?>

View File

@ -81,8 +81,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?>
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->library_name); ?></a>
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int) $item->library)): ?>
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->library_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->library_name); ?>
<?php endif; ?>

View File

@ -82,8 +82,8 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit
</td>
<td class="nowrap">
<div class="name">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $item->dynamic_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get_id; ?>&return=<?php echo $this->return_here; ?>"><?php echo $this->escape($item->dynamic_get_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->dynamic_get_name); ?>
<?php endif; ?>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>4th April, 2022</creationDate>
<creationDate>9th May, 2022</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.12.16</version>
<version>2.12.17</version>
<description><![CDATA[
<h1>Component Builder (v.2.12.16)</h1>
<h1>Component Builder (v.2.12.17)</h1>
<div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

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

View File

@ -283,9 +283,9 @@ abstract class FileHelper
// Get basic key
$basickey = 'Th!s_iS_n0t_sAfe_buT_b3tter_then_n0thiug';
if (method_exists('ComponentbuilderHelper', "getCryptKey"))
if (method_exists('\ComponentbuilderHelper', "getCryptKey"))
{
$basickey = ComponentbuilderHelper::getCryptKey('basic', $basickey);
$basickey = \ComponentbuilderHelper::getCryptKey('basic', $basickey);
}
// check the key

View File

@ -6028,9 +6028,9 @@ class com_componentbuilderInstallerScript
$joomla_component->type_title = 'Componentbuilder Joomla_component';
$joomla_component->type_alias = 'com_componentbuilder.joomla_component';
$joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_admin_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_admin_event":"php_admin_event","php_site_event":"php_site_event","php_helper_both":"php_helper_both","debug_linenr":"debug_linenr","php_preflight_install":"php_preflight_install","php_method_uninstall":"php_method_uninstall","css_admin":"css_admin","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","description":"description","php_postflight_install":"php_postflight_install","author":"author","sql_uninstall":"sql_uninstall","email":"email","website":"website","add_license":"add_license","add_email_helper":"add_email_helper","license_type":"license_type","php_helper_admin":"php_helper_admin","php_helper_site":"php_helper_site","whmcs_key":"whmcs_key","javascript":"javascript","whmcs_url":"whmcs_url","css_site":"css_site","whmcs_buy_link":"whmcs_buy_link","license":"license","php_preflight_update":"php_preflight_update","bom":"bom","php_postflight_update":"php_postflight_update","image":"image","sql":"sql","copyright":"copyright","addreadme":"addreadme","add_sales_server":"add_sales_server","update_server_url":"update_server_url","crowdin_project_identifier":"crowdin_project_identifier","component_version":"component_version","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_menu_prefix":"add_menu_prefix","add_css_admin":"add_css_admin","menu_prefix":"menu_prefix","add_css_site":"add_css_site","dashboard_type":"dashboard_type","dashboard":"dashboard","toignore":"toignore","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","export_key":"export_key","add_php_postflight_update":"add_php_postflight_update","joomla_source_link":"joomla_source_link","add_php_method_uninstall":"add_php_method_uninstall","export_buy_link":"export_buy_link","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","emptycontributors":"emptycontributors","add_update_server":"add_update_server","number":"number","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","crowdin_project_api_key":"crowdin_project_api_key","crowdin_account_api_key":"crowdin_account_api_key","creatuserhelper":"creatuserhelper","buildcomp":"buildcomp","adduikit":"adduikit","guid":"guid","addfootable":"addfootable","name":"name"}}';
$joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_helper_both","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_helper_both":"php_helper_both","crowdin_project_identifier":"crowdin_project_identifier","php_method_uninstall":"php_method_uninstall","php_preflight_install":"php_preflight_install","css_admin":"css_admin","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_admin_event":"php_admin_event","php_site_event":"php_site_event","description":"description","author":"author","php_postflight_install":"php_postflight_install","email":"email","sql_uninstall":"sql_uninstall","website":"website","debug_linenr":"debug_linenr","add_license":"add_license","license_type":"license_type","add_email_helper":"add_email_helper","php_helper_admin":"php_helper_admin","whmcs_key":"whmcs_key","php_helper_site":"php_helper_site","whmcs_url":"whmcs_url","javascript":"javascript","whmcs_buy_link":"whmcs_buy_link","css_site":"css_site","license":"license","bom":"bom","php_preflight_update":"php_preflight_update","image":"image","php_postflight_update":"php_postflight_update","copyright":"copyright","sql":"sql","addreadme":"addreadme","add_sales_server":"add_sales_server","update_server_url":"update_server_url","component_version":"component_version","add_powers":"add_powers","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_menu_prefix":"add_menu_prefix","add_css_admin":"add_css_admin","menu_prefix":"menu_prefix","add_css_site":"add_css_site","dashboard_type":"dashboard_type","dashboard":"dashboard","toignore":"toignore","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","export_key":"export_key","add_php_postflight_update":"add_php_postflight_update","joomla_source_link":"joomla_source_link","add_php_method_uninstall":"add_php_method_uninstall","export_buy_link":"export_buy_link","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","emptycontributors":"emptycontributors","add_update_server":"add_update_server","number":"number","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","crowdin_project_api_key":"crowdin_project_api_key","crowdin_account_api_key":"crowdin_account_api_key","creatuserhelper":"creatuserhelper","buildcomp":"buildcomp","adduikit":"adduikit","guid":"guid","addfootable":"addfootable","name":"name"}}';
$joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute';
$joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","debug_linenr","mvc_versiondate","remove_line_breaks","add_placeholders","add_license","add_email_helper","license_type","addreadme","add_sales_server","translation_tool","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","assets_table_fix","emptycontributors","add_update_server","number","update_server_target","update_server","sales_server","creatuserhelper","buildcomp","adduikit","addfootable"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}';
$joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_license","license_type","add_email_helper","addreadme","add_sales_server","add_powers","translation_tool","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","assets_table_fix","emptycontributors","add_update_server","number","update_server_target","update_server","sales_server","creatuserhelper","buildcomp","adduikit","addfootable"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$joomla_component_Inserted = $db->insertObject('#__content_types', $joomla_component);
@ -6616,7 +6616,7 @@ class com_componentbuilderInstallerScript
$query = $db->getQuery(true);
// Field to update.
$fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","builder_gif_size":"480-272","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","github_access_token":"secret","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","builder_gif_size":"480-272","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
);
// Condition.
$conditions = array(
@ -7469,9 +7469,9 @@ class com_componentbuilderInstallerScript
$joomla_component->type_title = 'Componentbuilder Joomla_component';
$joomla_component->type_alias = 'com_componentbuilder.joomla_component';
$joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_admin_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_admin_event":"php_admin_event","php_site_event":"php_site_event","php_helper_both":"php_helper_both","debug_linenr":"debug_linenr","php_preflight_install":"php_preflight_install","php_method_uninstall":"php_method_uninstall","css_admin":"css_admin","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","description":"description","php_postflight_install":"php_postflight_install","author":"author","sql_uninstall":"sql_uninstall","email":"email","website":"website","add_license":"add_license","add_email_helper":"add_email_helper","license_type":"license_type","php_helper_admin":"php_helper_admin","php_helper_site":"php_helper_site","whmcs_key":"whmcs_key","javascript":"javascript","whmcs_url":"whmcs_url","css_site":"css_site","whmcs_buy_link":"whmcs_buy_link","license":"license","php_preflight_update":"php_preflight_update","bom":"bom","php_postflight_update":"php_postflight_update","image":"image","sql":"sql","copyright":"copyright","addreadme":"addreadme","add_sales_server":"add_sales_server","update_server_url":"update_server_url","crowdin_project_identifier":"crowdin_project_identifier","component_version":"component_version","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_menu_prefix":"add_menu_prefix","add_css_admin":"add_css_admin","menu_prefix":"menu_prefix","add_css_site":"add_css_site","dashboard_type":"dashboard_type","dashboard":"dashboard","toignore":"toignore","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","export_key":"export_key","add_php_postflight_update":"add_php_postflight_update","joomla_source_link":"joomla_source_link","add_php_method_uninstall":"add_php_method_uninstall","export_buy_link":"export_buy_link","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","emptycontributors":"emptycontributors","add_update_server":"add_update_server","number":"number","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","crowdin_project_api_key":"crowdin_project_api_key","crowdin_account_api_key":"crowdin_account_api_key","creatuserhelper":"creatuserhelper","buildcomp":"buildcomp","adduikit":"adduikit","guid":"guid","addfootable":"addfootable","name":"name"}}';
$joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_helper_both","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_helper_both":"php_helper_both","crowdin_project_identifier":"crowdin_project_identifier","php_method_uninstall":"php_method_uninstall","php_preflight_install":"php_preflight_install","css_admin":"css_admin","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_admin_event":"php_admin_event","php_site_event":"php_site_event","description":"description","author":"author","php_postflight_install":"php_postflight_install","email":"email","sql_uninstall":"sql_uninstall","website":"website","debug_linenr":"debug_linenr","add_license":"add_license","license_type":"license_type","add_email_helper":"add_email_helper","php_helper_admin":"php_helper_admin","whmcs_key":"whmcs_key","php_helper_site":"php_helper_site","whmcs_url":"whmcs_url","javascript":"javascript","whmcs_buy_link":"whmcs_buy_link","css_site":"css_site","license":"license","bom":"bom","php_preflight_update":"php_preflight_update","image":"image","php_postflight_update":"php_postflight_update","copyright":"copyright","sql":"sql","addreadme":"addreadme","add_sales_server":"add_sales_server","update_server_url":"update_server_url","component_version":"component_version","add_powers":"add_powers","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_javascript":"add_javascript","add_menu_prefix":"add_menu_prefix","add_css_admin":"add_css_admin","menu_prefix":"menu_prefix","add_css_site":"add_css_site","dashboard_type":"dashboard_type","dashboard":"dashboard","toignore":"toignore","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","export_key":"export_key","add_php_postflight_update":"add_php_postflight_update","joomla_source_link":"joomla_source_link","add_php_method_uninstall":"add_php_method_uninstall","export_buy_link":"export_buy_link","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","emptycontributors":"emptycontributors","add_update_server":"add_update_server","number":"number","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","crowdin_project_api_key":"crowdin_project_api_key","crowdin_account_api_key":"crowdin_account_api_key","creatuserhelper":"creatuserhelper","buildcomp":"buildcomp","adduikit":"adduikit","guid":"guid","addfootable":"addfootable","name":"name"}}';
$joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute';
$joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","debug_linenr","mvc_versiondate","remove_line_breaks","add_placeholders","add_license","add_email_helper","license_type","addreadme","add_sales_server","translation_tool","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","assets_table_fix","emptycontributors","add_update_server","number","update_server_target","update_server","sales_server","creatuserhelper","buildcomp","adduikit","addfootable"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}';
$joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_license","license_type","add_email_helper","addreadme","add_sales_server","add_powers","translation_tool","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","add_sql_uninstall","assets_table_fix","emptycontributors","add_update_server","number","update_server_target","update_server","sales_server","creatuserhelper","buildcomp","adduikit","addfootable"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}';
// Check if joomla_component type is already in content_type DB.
$joomla_component_id = null;
@ -9254,7 +9254,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.12.16 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.12.17 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))