Added Community JCB Package Area #274

Merged
Llewellyn merged 9 commits from staging into master 2018-05-03 23:56:27 +00:00
54 changed files with 1539 additions and 1000 deletions

View File

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

View File

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

View File

@ -225,8 +225,15 @@ abstract class ###Component###Helper
return false;
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -239,9 +246,19 @@ abstract class ###Component###Helper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -35,8 +35,15 @@ defined('_JEXEC') or die('Restricted access');
abstract class ###Component###Helper
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -49,9 +56,19 @@ abstract class ###Component###Helper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -323,29 +323,6 @@ class ###Component###Table###View### extends JTable
$asset->loadByName('com_###component###');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
}###GENERATENEWALIAS###
}

View File

@ -47,6 +47,72 @@
/>
<field type="spacer" name="spacerHistory" hr="true" />
<!-- Manage_jcb_package_directories Field. Type: Radio. (joomla) -->
<field
type="radio"
name="manage_jcb_package_directories"
label="COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
class="btn-group btn-group-yesno"
default="2"
required="true">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NONE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL</option>
<option value="1">
COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION</option>
</field>
<!-- Jcb_package_directories Field. Type: List. (joomla) -->
<field
type="list"
name="jcb_package_directories"
label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
class="list_class"
multiple="true"
showon="manage_jcb_package_directories:1">
<!-- Option Set. -->
<option value="vdm">
COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES</option>
<option value="jcb">
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Add_menu_prefix Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_menu_prefix"
label="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Menu_prefix Field. Type: Text. (joomla) -->
<field
type="text"
name="menu_prefix"
label="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL"
size="30"
maxlength="30"
default="&#187;"
description="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION"
class="text_area"
filter="SAFEHTML"
message="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT"
autocomplete="on"
showon="add_menu_prefix:1"
/>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Minify Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -61,61 +127,8 @@
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
<!-- Language Field. Type: Lang. (custom) -->
<field
type="lang"
name="language"
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
class="list_class"
multiple="false"
default="0"
required="true"
button="true"
/>
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
<field
type="number"
name="percentagelanguageadd"
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
default="50"
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
class="text_area"
required="true"
min="10"
max="100"
step="10"
/>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
<field
type="list"
name="compiler_field_builder_type"
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
class="list_class"
filter="INT"
required="true"
default="2">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field>
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
<!-- Api Field. Type: User. (joomla) -->
<field
type="user"
name="api"
label="COM_COMPONENTBUILDER_CONFIG_API_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION"
/>
<!-- Set_browser_storage Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -169,6 +182,61 @@
</field>
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
<!-- Language Field. Type: Lang. (custom) -->
<field
type="lang"
name="language"
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
class="list_class"
multiple="false"
default="0"
required="true"
button="true"
/>
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
<field
type="number"
name="percentagelanguageadd"
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
default="50"
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
class="text_area"
required="true"
min="10"
max="100"
step="10"
/>
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
<field
type="list"
name="compiler_field_builder_type"
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
class="list_class"
filter="INT"
required="true"
default="2">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field>
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
<!-- Api Field. Type: User. (joomla) -->
<field
type="user"
name="api"
label="COM_COMPONENTBUILDER_CONFIG_API_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION"
/>
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
<field name="autorTitle"
type="spacer"
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"

View File

@ -46,6 +46,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('isRead', 'ajax');
$this->registerTask('getComponentDetails', 'ajax');
$this->registerTask('getCronPath', 'ajax');
$this->registerTask('getJCBpackageInfo', 'ajax');
$this->registerTask('tableColumns', 'ajax');
$this->registerTask('fieldSelectOptions', 'ajax');
$this->registerTask('getDynamicScripts', 'ajax');
@ -235,6 +236,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getJCBpackageInfo':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$urlValue = $jinput->get('url', NULL, 'STRING');
if($urlValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getJCBpackageInfo($urlValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'tableColumns':
try
{

View File

@ -163,40 +163,9 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$keyNotice = '<h1>' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '</h1>';
$keyNotice .= '<p>' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY') . '</h1>';
// set the package owner info
if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner'])))
if (componentbuilderHelper::getPackageOwnerValue('owner', $model->info) || componentbuilderHelper::getPackageOwnerValue('company', $model->info))
{
$ownerDetails = '<h2>' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
$ownerDetails .= '<ul>';
if (isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $model->info['getKeyFrom']['company']) . '</li>';
}
// add value only if set
if (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $model->info['getKeyFrom']['owner']) . '</li>';
}
// add value only if set
if (isset($model->info['getKeyFrom']['website']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['website']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $model->info['getKeyFrom']['website']) . '</li>';
}
// add value only if set
if (isset($model->info['getKeyFrom']['email']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['email']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $model->info['getKeyFrom']['email']) . '</li>';
}
// add value only if set
if (isset($model->info['getKeyFrom']['license']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['license']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $model->info['getKeyFrom']['license']) . '</li>';
}
// add value only if set
if (isset($model->info['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['copyright']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $model->info['getKeyFrom']['copyright']) . '</li>';
}
$ownerDetails .= '</ul>';
$ownerDetails = componentbuilderHelper::getPackageOwnerDetailsDisplay($model->info, true);
}
else
{

View File

@ -5754,6 +5754,71 @@ class Interpretation extends Fields
return '';
}
public function setGenerateNewAlias($viewName_single)
{
// make sure this view has an alias
if (isset($this->aliasBuilder[$viewName_single]))
{
// set the title stuff
if (isset($this->customAliasBuilder[$viewName_single]))
{
$titles = array_values($this->customAliasBuilder[$viewName_single]);
}
elseif (isset($this->titleBuilder[$viewName_single]))
{
$titles = array($this->titleBuilder[$viewName_single]);
}
// reset the bucket
$titleData = array();
// load the dynamic title builder
if (isset($titles) && ComponentbuilderHelper::checkArray($titles))
{
foreach ($titles as $title)
{
$titleData[] = "\$this->" . $title;
}
}
else
{
$titleData = array("'-'"); // just incase some mad man does not set a title/customAlias (we fall back on the date)
}
// rest the new function
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* Generate a valid alias from title / date.";
$newFunction[] = "\t* Remains public to be able to check for duplicated alias before saving";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return string";
$newFunction[] = "\t*/";
$newFunction[] = "\tpublic function generateAlias()";
$newFunction[] = "\t{";
$newFunction[] = "\t\tif (empty(\$this->alias))";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$this->alias = ".implode(".' '.",$titleData).';';
$newFunction[] = "\t\t}";
$newFunction[] = PHP_EOL ."\t\t\$this->alias = JApplication::stringURLSafe(\$this->alias);";
$newFunction[] = PHP_EOL ."\t\tif (trim(str_replace('-', '', \$this->alias)) == '')";
$newFunction[] = "\t\t{";
$newFunction[] = "\t\t\t\$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');";
$newFunction[] = "\t\t}";
$newFunction[] = PHP_EOL ."\t\treturn \$this->alias;";
$newFunction[] = "\t}";
return implode(PHP_EOL, $newFunction);
}
// rest the new function
$newFunction = array();
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
$newFunction[] = "\t* This view does not actually have an alias";
$newFunction[] = "\t*";
$newFunction[] = "\t* @return bool";
$newFunction[] = "\t*/";
$newFunction[] = "\tpublic function generateAlias()";
$newFunction[] = "\t{";
$newFunction[] = "\t\treturn false;";
$newFunction[] = "\t}";
return implode(PHP_EOL, $newFunction);
}
public function setInstall()
{
if (isset($this->queryBuilder) && ComponentbuilderHelper::checkArray($this->queryBuilder))
@ -11850,8 +11915,16 @@ class Interpretation extends Fields
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t//" . $this->setLine(__LINE__) . " convert " . $item['name'];
if (isset($item['custom']['table']))
{
$keyTableNAme = str_replace('#__' . $this->fileContentStatic['###component###'] . '_', '', $item['custom']['table']);
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\$item->" . $item['name'] . " = " . $Component . "Helper::jsonToString(\$item->" . $item['name'] . ", ', ', '" . $keyTableNAme . "');";
// check if this is a local table
if (strpos($item['custom']['table'], '#__' . $this->fileContentStatic['###component###'] . '_') !== false)
{
$keyTableNAme = str_replace('#__' . $this->fileContentStatic['###component###'] . '_', '', $item['custom']['table']);
}
else
{
$keyTableNAme = $item['custom']['table'];
}
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\$item->" . $item['name'] . " = " . $Component . "Helper::jsonToString(\$item->" . $item['name'] . ", ', ', '" . $keyTableNAme . "', '".$item['custom']['id']."', '".$item['custom']['text']."');";
}
else
{
@ -12713,7 +12786,16 @@ class Interpretation extends Fields
// set the code name
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
// set main menu name to lang
$this->langContent['adminsys'][$lang] = '&#187; ' . $this->componentData->name;
$addPrefix = $this->params->get('add_menu_prefix', 1);
if ($addPrefix == 1)
{
$prefix = trim($this->params->get('menu_prefix', '&#187;'));
$this->langContent['adminsys'][$lang] = $prefix . ' ' . $this->componentData->name;
}
else
{
$this->langContent['adminsys'][$lang] = $this->componentData->name;
}
foreach ($this->componentData->admin_views as $view)
{
// set custom menu

View File

@ -514,6 +514,9 @@ class Infusion extends Interpretation
// ###GENERATENEWTITLE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###GENERATENEWTITLE###'] = $this->setGenerateNewTitle($viewName_single);
// ###GENERATENEWALIAS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###GENERATENEWALIAS###'] = $this->setGenerateNewAlias($viewName_single);
// ###MODEL_BATCH_COPY### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_COPY###'] = $this->setBatchCopy($viewName_single);

View File

@ -68,10 +68,16 @@ abstract class ComponentbuilderHelper
public static $snippetsPath = 'https://api.github.com/repos/vdm-io/Joomla-Component-Builder-Snippets/git/trees/master';
/**
* The packages paths
* The VDM packages paths
**/
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
public static $vdmGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
public static $vdmGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
/**
* The JCB packages paths
**/
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Community-Packages/git/trees/master";
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Community-Packages/raw/master/";
// not needed at this time (maybe latter)
public static $accessToken = "";
@ -2035,6 +2041,168 @@ abstract class ComponentbuilderHelper
}
return false;
}
protected static $pkOwnerSearch = array(
'company' => 'COM_COMPONENTBUILDER_EMCOMPANYEM_BSB',
'owner' => 'COM_COMPONENTBUILDER_EMOWNEREM_BSB',
'website' => 'COM_COMPONENTBUILDER_EMWEBSITEEM_BSB',
'email' => 'COM_COMPONENTBUILDER_EMEMAILEM_BSB',
'license' => 'COM_COMPONENTBUILDER_EMLICENSEEM_BSB',
'copyright' => 'COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB'
);
/**
* get the JCB package owner details display
**/
public static function getPackageOwnerDetailsDisplay(&$info, $trust = false)
{
$hasOwner = false;
$ownerDetails = '<h2 class="module-title nav-header">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
$ownerDetails .= '<ul>';
// load the list items
foreach (self::$pkOwnerSearch as $key => $li)
{
if ($value = self::getPackageOwnerValue($key, $info))
{
$ownerDetails .= '<li>' . JText::sprintf($li, $value) . '</li>';
// check if we have a owner/source name
if (('owner' === $key || 'company' === $key) && !$hasOwner)
{
$hasOwner = true;
$owner = $value;
}
}
}
$ownerDetails .= '</ul>';
// provide some details to how the user can get a key
if ($hasOwner && isset($info['getKeyFrom']['buy_link']) && self::checkString($info['getKeyFrom']['buy_link']))
{
$ownerDetails .= '<hr />';
$ownerDetails .= JText::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $info['getKeyFrom']['buy_link'], $owner, $owner);
}
// add more custom links
elseif ($hasOwner && isset($info['getKeyFrom']['buy_links']) && self::checkArray($info['getKeyFrom']['buy_links']))
{
$buttons = array();
foreach ($info['getKeyFrom']['buy_links'] as $keyName => $link)
{
$buttons[] = JText::sprintf('COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $owner, $link, $owner, $keyName);
}
$ownerDetails .= '<hr />';
$ownerDetails .= implode('<br />', $buttons);
}
// return the owner details
if (!$hasOwner)
{
$ownerDetails = '<h2>' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '</h2>';
if (!$trust)
{
$ownerDetails .= '<p style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '</p>';
}
}
return $ownerDetails;
}
public static function getPackageOwnerValue($key, &$info)
{
$source = (isset($info['source']) && isset($info['source'][$key])) ? 'source' : ((isset($info['getKeyFrom']) && isset($info['getKeyFrom'][$key])) ? 'getKeyFrom' : false);
if ($source && self::checkString($info[$source][$key]))
{
return $info[$source][$key];
}
return false;
}
/**
* get the JCB package component key status
**/
public static function getPackageComponentsKeyStatus(&$info)
{
// check the package key status
if (!isset($info['key']))
{
if (isset($info['getKeyFrom']) && isset($info['getKeyFrom']['owner']))
{
// this just confirms it for older packages
$info['key'] = true;
}
else
{
// this just confirms it for older packages
$info['key'] = false;
}
}
return $info['key'];
}
/**
* get the JCB package component details display
**/
public static function getPackageComponentsDetailsDisplay(&$info)
{
// check if these components need a key
$needKey = self::getPackageComponentsKeyStatus($info);
if (isset($info['name']) && self::checkArray($info['name']))
{
$cAmount = count((array) $info['name']);
$class2 = ($cAmount == 1) ? 'span12' : 'span6';
$counter = 1;
$display = array();
foreach ($info['name'] as $key => $value)
{
if ($cAmount > 1 && $counter == 3)
{
$display[] = '</div>';
$counter = 1;
}
if ($cAmount > 1 && $counter == 1)
{
$display[] = '<div>';
}
$display[] = '<div class="well well-small ' . $class2 . '">';
$display[] = '<h3>';
$display[] = $value . ' v' . $info['component_version'][$key];
if ($needKey)
{
$display[] = ' - <em>' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . '</em>';
}
else
{
$display[] = ' - <em>' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . '</em>';
}
$display[] = '</h3><h4>';
$display[] = $info['short_description'][$key];
$display[] = '</h4><ul><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB', $info['companyname'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IAUTHORI_BSB', $info['author'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IEMAILI_BSB', $info['email'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IWEBSITEI_BSB', $info['website'][$key]);
$display[] = '</li></ul>';
$display[] = '<h4 class="nav-header">';
$display[] = JText::_('COM_COMPONENTBUILDER_LICENSE');
$display[] = '</h4><p>';
$display[] = $info['license'][$key];
$display[] = '</p><h4 class="nav-header">';
$display[] = JText::_('COM_COMPONENTBUILDER_COPYRIGHT');
$display[] = '</h4><p>';
$display[] = $info['copyright'][$key];
$display[] = '</p></div>';
$counter++;
}
// close the div if needed
if ($cAmount > 1)
{
$display[] = '</div>';
}
return implode("\n",$display);
}
return '<div>'.JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE').'</div>';
}
/**
* prepare base64 string for url
@ -3985,8 +4153,15 @@ abstract class ComponentbuilderHelper
return false;
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -3999,9 +4174,19 @@ abstract class ComponentbuilderHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -13,6 +13,7 @@ COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder &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!"
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields"
@ -897,7 +898,7 @@ COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENT
COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED="All the languages found in Joomla were successfully imported."
COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?"
COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add"
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b>"
COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB_A_SFIND_OUT_WHYA="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. <small>(Make <b>SURE</b> to move this zipped backup package out of the tmp folder before doing an import)</small><br />If you are importing a package of a 3rd party JCB package developer, <b>make sure it is a reputable JCB package developers!</b> <a %s>Find out why!</a>"
COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)"
COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED="An error has occurred"
COM_COMPONENTBUILDER_ARCHIVED="Archived"
@ -936,7 +937,6 @@ COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION="<b>Images</b> not m
COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="<b>Multiple Field (repeatable mode)</b> id:%s mismatch in <b>field:%s</b>, and was <em>removed</em> from the field."
COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="<b>%s</b>->%s in <b>%s</b> has id mismatch. So the <b>%s</b> was removed!"
COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="<b>%s</b> <em>component details</em>"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
@ -957,6 +957,7 @@ COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp"
COM_COMPONENTBUILDER_CLONE="Clone"
COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!"
COM_COMPONENTBUILDER_CLOSE_NEW="Close & New"
COM_COMPONENTBUILDER_COMMUNITY_PACKAGES="Community Packages"
COM_COMPONENTBUILDER_COMPANY="Company"
COM_COMPONENTBUILDER_COMPANY_NAME="Company Name"
COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
@ -2210,6 +2211,8 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version U
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_LABEL="Version Updates"
COM_COMPONENTBUILDER_CONDITIONS="Conditions"
COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
@ -2442,6 +2445,9 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area. "
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories"
COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language"
COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder"
COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails."
@ -2449,6 +2455,14 @@ COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer"
COM_COMPONENTBUILDER_CONFIG_MAILONLINE_DESCRIPTION="Warning this will stop all emails from going out."
COM_COMPONENTBUILDER_CONFIG_MAILONLINE_LABEL="Mailer Status"
COM_COMPONENTBUILDER_CONFIG_MAIL_CONFIGURATION="Mail Configuration"
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can choose to manually select what directories should show, or turn them off altogether."
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL="Manage JCB Package Directories"
COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION="Manual Selection"
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION="Add the prefix you would like to use. Make sure that it is HTML Character Entities since it is being used in XML."
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT="&#187;"
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix<br />
<small><a href='https://dev.w3.org/html5/html-author/charref' target='_blank'>check this list out</a></small>"
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CONFIG_MINIFY_DESCRIPTION="Should the JavaScript be minified when compiled."
COM_COMPONENTBUILDER_CONFIG_MINIFY_LABEL="Minify JS"
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE="Never update"
@ -2521,6 +2535,7 @@ COM_COMPONENTBUILDER_CONFIG_SENDMAIL_HINT="/usr/sbin/sendmail"
COM_COMPONENTBUILDER_CONFIG_SENDMAIL_LABEL="Sendmail Path"
COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_DESCRIPTION="Select if browser storage should be used to save on Ajax calls and speed up this components site pages."
COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
@ -2552,6 +2567,7 @@ COM_COMPONENTBUILDER_CONFIG_UIKIT_MIN_DESC="Should the minified version of uikit
COM_COMPONENTBUILDER_CONFIG_UIKIT_MIN_LABEL="Load Minified"
COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_DESC="Set the css style that should be used."
COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_LABEL="css Style"
COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_CONFIG_YES="Yes"
COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING="Confirmation Step Before Importing!"
COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor"
@ -3622,9 +3638,7 @@ COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit ver
COM_COMPONENTBUILDER_EMAIL="Email"
COM_COMPONENTBUILDER_EMAIL_S="Email: %s"
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send"
COM_COMPONENTBUILDER_EMAUTHOREM_BSB="<em>Author</em>: <b>%s</b>"
COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="<em>Company:</em> <b>%s</b>"
COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB="<em>Company Name</em>: <b>%s</b>"
COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="<em>Copyright:</em> <b>%s</b>"
COM_COMPONENTBUILDER_EMEMAILEM_BSB="<em>Email:</em> <b>%s</b>"
COM_COMPONENTBUILDER_EMLICENSEEM_BSB="<em>License:</em> <b>%s</b>"
@ -4037,6 +4051,7 @@ COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder <b>%s</b> was not moved to <b>%s</b>"
COM_COMPONENTBUILDER_FORCE_LOCAL_UPDATE="Force Local Update"
COM_COMPONENTBUILDER_FREEOPEN="Free/Open"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab"
COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: <b>%s</b>"
@ -4183,10 +4198,14 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_HELP_MANAGER="Help"
COM_COMPONENTBUILDER_HI="Hi"
COM_COMPONENTBUILDER_HIDE="Hide"
COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM="How to get <a %s >free keys</a> from VDM."
COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to <b>key error</b>, or broken package!"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to broken package!"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to key error, or broken package!"
COM_COMPONENTBUILDER_IAUTHORI_BSB="<i>Author</i>: <b>%s</b>"
COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB="<i>Company Name</i>: <b>%s</b>"
COM_COMPONENTBUILDER_ICON="Icon"
COM_COMPONENTBUILDER_IEMAILI_BSB="<i>Email</i>: <b>%s</b>"
COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue"
COM_COMPONENTBUILDER_IMPORT_DATA="Import Data"
COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data."
@ -4246,8 +4265,11 @@ COM_COMPONENTBUILDER_ISOLATE="Isolate"
COM_COMPONENTBUILDER_ISSUE="issue"
COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)"
COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)"
COM_COMPONENTBUILDER_IWEBSITEI_BSB="<i>Website</i>: <b>%s</b>"
COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community"
COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets"
COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you <b>not to continue</b> with the import of the selected package!"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access"
@ -5404,6 +5426,7 @@ COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE="No component details found, so it is not safe to continue!"
COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN="No component was selected, please make a selection of one component and try again!"
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)"
COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested."
@ -5437,10 +5460,12 @@ COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date"
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
COM_COMPONENTBUILDER_PACKAGE="Package"
COM_COMPONENTBUILDER_PACKAGES_FROM_JCB_COMMUNITY="Packages from JCB Community"
COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD="Packages from Vast Development Method"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>"
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: <code>%s</code> <br />%s %s"
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
@ -6462,7 +6487,8 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the [Get Package] button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
@ -6503,7 +6529,7 @@ COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Succ
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> checksum validation! Please validate this checksum: <b>%s</b> to be the same as the one found @ <a %s %s</a>"
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> the checksum validation!<br /><br /><small>Manually also validate that the correct checksum was used.</small><br />This checksum: <b>%s</b> must be the same as the one found @ <a %s %s</a>"
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
COM_COMPONENTBUILDER_TITLE="Title"
COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads"

View File

@ -116,6 +116,29 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
/**
* get the JCB package info (html)
**/
public function getJCBpackageInfo($url)
{
// convert URL
$url = str_replace('.zip', '.info', $url);
// check if url exist
if ($info = ComponentbuilderHelper::getFileContents($url, false))
{
// Get the encryption object.
$opener = new FOFEncryptAes('V4stD3vel0pmEntMethOd@YoUrS3rv!s', 128);
$info = rtrim($opener->decryptString($info), "\0");
// check if we have json
if (ComponentbuilderHelper::checkJson($info))
{
$info = json_decode($info, true);
return array('owner' => ComponentbuilderHelper::getPackageOwnerDetailsDisplay($info, true), 'packages' => ComponentbuilderHelper::getPackageComponentsDetailsDisplay($info));
}
}
return array('error' => JText::_('COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE'));
}
/**
* set the component display
**/

View File

@ -97,7 +97,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected $isMultiple = array();
protected $specialValue = false;
protected $checksum = null;
protected $checksumURLs = array('vdm' => 'https://raw.githubusercontent.com/vdm-io/JCB-Packages/master/');
protected $checksumURLs = array('vdm' => 'https://raw.githubusercontent.com/vdm-io/JCB-Packages/master/', 'jcb' => 'https://raw.githubusercontent.com/vdm-io/JCB-Community-Packages/master/');
protected $mustMerge = array('validation_rule', 'fieldtype', 'snippet', 'language', 'language_translation');
/**
@ -304,7 +304,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
if ($checksums[$packageName] === sha1_file($package['dir']))
{
$validator = $this->checksumURLs[$this->checksum].str_replace('.zip', '.sha', $packageName);
$checksumMessage = JText::sprintf('COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_CHECKSUM_VALIDATION_PLEASE_VALIDATE_THIS_CHECKSUM_BSB_TO_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA', $checksums[$packageName], 'href="'.$validator.'" target="_blank" title="verify checksum">', $validator);
$checksumMessage = JText::sprintf('COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA', $checksums[$packageName], 'href="'.$validator.'" target="_blank" title="verify checksum">', $validator);
$checksumStatus = 'Success';
$checksum = true;
}
@ -682,7 +682,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->data = $data;
return true;
}
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE'), 'error');
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE'), 'error');
return false;
}
$this->app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE'), 'error');

View File

@ -896,21 +896,29 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
// set db data
$data = serialize($this->smartBox);
// Set the key owner information
$this->info['source'] = array();
$this->info['source']['company'] = $this->params->get('export_company', null);
$this->info['source']['owner'] = $this->params->get('export_owner', null);
$this->info['source']['email'] = $this->params->get('export_email', null);
$this->info['source']['website'] = $this->params->get('export_website', null);
$this->info['source']['license'] = $this->params->get('export_license', null);
$this->info['source']['copyright'] = $this->params->get('export_copyright', null);
// lock the data if set
if (ComponentbuilderHelper::checkArray($this->key))
{
// lock the data
$this->key = md5(implode('', $this->key));
$locker = new FOFEncryptAes($this->key, 128);
$data = $locker->encryptString($data);
$data = $locker->encryptString($data);
// Set the key owner information
$this->info['getKeyFrom'] = array();
$this->info['getKeyFrom']['company'] = $this->params->get('export_company', null);
$this->info['getKeyFrom']['owner'] = $this->params->get('export_owner', null);
$this->info['getKeyFrom']['email'] = $this->params->get('export_email', null);
$this->info['getKeyFrom']['website'] = $this->params->get('export_website', null);
$this->info['getKeyFrom']['license'] = $this->params->get('export_license', null);
$this->info['getKeyFrom']['copyright'] = $this->params->get('export_copyright', null);
$this->info['getKeyFrom']['company'] = $this->info['source']['company'];
$this->info['getKeyFrom']['owner'] = $this->info['source']['owner'];
$this->info['getKeyFrom']['email'] = $this->info['source']['email'];
$this->info['getKeyFrom']['website'] = $this->info['source']['website'];
$this->info['getKeyFrom']['license'] = $this->info['source']['license'];
$this->info['getKeyFrom']['copyright'] = $this->info['source']['copyright'];
// making provision for future changes
if (count($this->exportBuyLinks) == 1)
{
@ -922,9 +930,13 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->info['getKeyFrom']['buy_link'] = $this->params->get('export_buy_link', null);
}
$this->info['getKeyFrom']['package_links'] = $this->exportPackageLinks;
// we started adding this at v2.7.7
$this->info['key'] = true;
}
else
{
// we started adding this at v2.7.7
$this->info['key'] = true;
// Set the owner information
$data = base64_encode($data);
}

View File

@ -1759,7 +1759,7 @@ INSERT INTO `#__componentbuilder_snippet_type` (`id`, `name`, `description`, `pa
--
INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, `addfolders`, `addurls`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
(2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"2\"}}', 2, '', 1, '2017-11-25 16:17:36', '2017-12-25 12:40:16', 10, '', 2),
(2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"2\"}}', 2, '', 1, '2017-11-25 16:17:36', '2018-05-02 23:29:05', 11, '', 2),
(3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-beta.35\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2017-12-25 12:38:24', 8, '', 3);
CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` (

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_fields extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_fields_conditions extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableAdmin_view extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_admin_views extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_config extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_custom_admin_menus extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_custom_admin_views extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_dashboard extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_files_folders extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_mysql_tweaks extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_site_views extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableComponent_updates extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableCustom_admin_view extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableCustom_code extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableDynamic_get extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableField extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableFieldtype extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,29 @@ class ComponentbuilderTableHelp_document extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->title;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}
return $this->alias;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableJoomla_component extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableLanguage extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableLanguage_translation extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,29 @@ class ComponentbuilderTableLayout extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}
return $this->alias;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary_config extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableLibrary_files_folders_urls extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableServer extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableSite_view extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableSnippet extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableSnippet_type extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -323,29 +323,29 @@ class ComponentbuilderTableTemplate extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}
return $this->alias;
}
}

View File

@ -323,29 +323,16 @@ class ComponentbuilderTableValidation_rule extends JTable
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
*
* @return string
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
return $this->alias;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -105,11 +105,33 @@ JHtml::_('behavior.keepalive');
// set the url
form.import_url.value = form.vdm_package.value;
jQuery('#loading').css('display', 'block');
jQuery('#noticeboard').show();
jQuery('#installer-import').hide();
form.checksum.value = 'vdm';
form.gettype.value = 'url';
form.submit();
}
};
Joomla.submitbuttonJCB = function()
{
var form = document.getElementById('adminForm');
// do field validation
if (form.jcb_package.value == "" || form.jcb_package.value == "http://")
{
alert("<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT', true); ?>");
}
else
{
// set the url
form.import_url.value = form.jcb_package.value;
jQuery('#loading').css('display', 'block');
jQuery('#noticeboard').show();
jQuery('#installer-import').hide();
form.checksum.value = 'jcb';
form.gettype.value = 'url';
form.submit();
}
};
<?php endif; ?>
@ -117,7 +139,6 @@ JHtml::_('behavior.keepalive');
jQuery(document).ready(function($) {
var outerDiv = $('body');
$('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - $(window).scrollTop())
@ -134,8 +155,7 @@ jQuery(document).ready(function($) {
</script>
<?php $formats = ($this->dataType === 'smart_package') ? '.zip' : 'none'; ?>
<div id="installer-import" class="clearfix">
<div class="clearfix">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
<?php if (!empty( $this->sidebar)) : ?>
@ -146,6 +166,12 @@ jQuery(document).ready(function($) {
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<div id="noticeboard" class="well well-small" style="display: none;">
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD'); ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?php echo JText::_('COM_COMPONENTBUILDER_NEW_NOTICE'); ?>)</span></h2>
<div class="noticeboard-md"><small><?php echo JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING'); ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray">&lt;&lt;ewe&gt;&gt;yn</a></small></div>
</div>
<div id="installer-import">
<?php if ($this->hasPackage && $this->dataType === 'smart_package') : ?>
<?php
if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name']))
@ -190,97 +216,14 @@ jQuery(document).ready(function($) {
</div>
<?php if ($hasOwner): ?>
<div class="well span6">
<?php
$ownerDetails = '<h2 class="module-title nav-header">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
$ownerDetails .= '<ul>';
if (isset($this->packageInfo['getKeyFrom']['company']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['company']))
{
$owner = $this->packageInfo['getKeyFrom']['company'];
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $this->packageInfo['getKeyFrom']['company']) . '</li>';
}
// add value only if set
if (isset($this->packageInfo['getKeyFrom']['owner']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['owner']))
{
if (!isset($owner))
{
$owner = $this->packageInfo['getKeyFrom']['owner'];
}
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $this->packageInfo['getKeyFrom']['owner']) . '</li>';
}
// add value only if set
if (isset($this->packageInfo['getKeyFrom']['website']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['website']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $this->packageInfo['getKeyFrom']['website']) . '</li>';
}
// add value only if set
if (isset($this->packageInfo['getKeyFrom']['email']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['email']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $this->packageInfo['getKeyFrom']['email']) . '</li>';
}
// add value only if set
if (isset($this->packageInfo['getKeyFrom']['license']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['license']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $this->packageInfo['getKeyFrom']['license']) . '</li>';
}
// add value only if set
if (isset($this->packageInfo['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['copyright']))
{
$ownerDetails .= '<li>' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $this->packageInfo['getKeyFrom']['copyright']) . '</li>';
}
$ownerDetails .= '</ul>';
// provide some details to how the user can get a key
if (isset($this->packageInfo['getKeyFrom']['buy_link']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['buy_link']))
{
$ownerDetails .= '<hr />';
$ownerDetails .= JText::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $this->packageInfo['getKeyFrom']['buy_link'], $owner, $owner);
}
// add more custom links
elseif (isset($this->packageInfo['getKeyFrom']['buy_links']) && componentbuilderHelper::checkArray($this->packageInfo['getKeyFrom']['buy_links']))
{
$buttons = array();
foreach ($this->packageInfo['getKeyFrom']['buy_links'] as $keyName => $link)
{
$buttons[] = JText::sprintf('COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $owner, $link, $owner, $keyName);
}
$ownerDetails .= '<hr />';
$ownerDetails .= implode('<br />', $buttons);
}
// return the owner details
if (!isset($owner))
{
$ownerDetails = '<h2 style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '</h2>';
$ownerDetails .= '<p style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '</p>';
}
echo $ownerDetails;
?>
<?php echo ComponentbuilderHelper::getPackageOwnerDetailsDisplay($this->packageInfo); ?>
</div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if (isset($this->packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'info', JText::sprintf('COM_COMPONENTBUILDER_S_BEING_IMPORTED', $comP)); ?>
<?php $class2 = ($cAmount == 1) ? 'span12' : 'span6'; ?>
<?php $counter = 1; foreach ($this->packageInfo['name'] as $key => $value): ?>
<?php if ($cAmount > 1 && $counter == 3) { echo '</div>'; $counter = 1;} ?>
<?php if ($cAmount > 1 && $counter == 1) { echo '<div>'; } ?>
<div class="well well-small <?php echo $class2; ?>">
<h2 class="module-title nav-header"><?php echo JText::sprintf('COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM', $value . ' v' . $this->packageInfo['component_version'][$key]); ?></h2>
<p><?php echo $this->packageInfo['short_description'][$key]; ?></p>
<ul>
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB', $this->packageInfo['companyname'][$key]); ?></li>
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMAUTHOREM_BSB', $this->packageInfo['author'][$key]); ?></li>
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $this->packageInfo['email'][$key]); ?></li>
<li><?php echo JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $this->packageInfo['website'][$key]); ?></li>
</ul>
<h2 class="nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_LICENSE'); ?></h2>
<p><?php echo $this->packageInfo['license'][$key]; ?></p>
<h2 class="nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_COPYRIGHT'); ?></h2>
<p><?php echo $this->packageInfo['copyright'][$key]; ?></p>
</div>
<?php $counter++; ?>
<?php endforeach; ?>
<?php echo ComponentbuilderHelper::getPackageComponentsDetailsDisplay($this->packageInfo); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
@ -289,7 +232,7 @@ jQuery(document).ready(function($) {
<?php else: ?>
<?php if ($this->dataType === 'smart_package'): ?>
<h1 style="color: #922924;"><?php echo JText::_('COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST'); ?></h1>
<p style="color: #922924;"><?php echo JText::_('COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB'); ?></p>
<p style="color: #922924;"><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB_A_SFIND_OUT_WHYA', 'href="https://vdm.bz/jcb-package-import-safety" target="_blank" title="Watch tutorial"'); ?></p>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'jcbImportTab', array('active' => 'upload')); ?>
@ -338,25 +281,65 @@ jQuery(document).ready(function($) {
</fieldset>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($this->vdmPackages): ?>
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_vdm', JText::_('COM_COMPONENTBUILDER_VDM_PACKAGES', true)); ?>
<fieldset class="uploadform">
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
<div class="span12" id="vdm_packages_installer">
<div class="alert alert-success">
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_GET_PACKAGE_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA', 'href="https://github.com/vdm-io/JCB-Packages" target="_blank" title="gitHub Reposetory"', 'href="http://vdm.bz/jcb-packages" target="_blank" title="get a key to import the paid packages."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM', 'href="https://vdm.bz/how-to-get-free-vdm-package-keys" target="_blank" title="see how easy it is to get access keys from VDM"'); ?></p>
</div>
<?php foreach ($this->vdmPackages as $field): ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label;?></div>
<div class="controls"><?php echo $field->input;?></div>
<fieldset class="uploadform">
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_VAST_DEVELOPMENT_METHOD"); ?></legend>
<?php foreach ($this->vdmPackages as $field): ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label;?></div>
<div class="controls"><?php echo $field->input;?></div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonVDM()" />&nbsp;&nbsp;&nbsp;<small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES'); ?></small>
</div>
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
</fieldset>
</div>
<div id="vdm_packages_display">
<div id="vdm_packages_details">
</div><br />
<div id="vdm_package_owner_details">
</div>
<?php endforeach; ?>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonVDM()" />&nbsp;&nbsp;&nbsp;<small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES'); ?></small>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'jcbImportTab', 'url_jcb', JText::_('COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES', true)); ?>
<div class="span12" id="jcb_packages_installer">
<div class="alert alert-success">
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know, some need a key of course."'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE', 'href="https://github.com/vdm-io/JCB-Community-Packages" target="_blank" title="gitHub Reposetory"'); ?></p>
<p><?php echo JText::sprintf('COM_COMPONENTBUILDER_ADD_YOUR_OWN_JCB_PACKAGES_TO_THE_COMMUNITY_A_S_GITHUBA_REPOSITORYBR_WATCH_THIS_A_S_TUTORIALA_TO_SEE_HOW', 'href="https://github.com/vdm-io/JCB-Community-Packages" target="_blank" title="gitHub Reposetory"', 'href="https://vdm.bz/add-jcb-community-package" target="_blank" title="watch the quick tutorial on how to add your own packages to this list of community packages"'); ?></p>
</div>
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://www.vdm.io/support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
</fieldset>
<fieldset class="uploadform">
<legend><?php echo JText::_("COM_COMPONENTBUILDER_PACKAGES_FROM_JCB_COMMUNITY"); ?></legend>
<?php foreach ($this->jcbPackages as $field): ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label;?></div>
<div class="controls"><?php echo $field->input;?></div>
</div>
<?php endforeach; ?>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_GET_PACKAGE'); ?>" onclick="Joomla.submitbuttonJCB()" />&nbsp;&nbsp;&nbsp;<small><span class="icon-shield"> </span><?php echo JText::_('COM_COMPONENTBUILDER_COMMUNITY_PACKAGES'); ?></small>
</div>
<div class="control-group"><small><?php echo JText::sprintf('COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA', 'href="https://vdm.bz/jcb-package-support" target="_blank" title="Should any of these packages fail to import please let us know"'); ?></small></div>
</fieldset>
</div>
<div id="jcb_packages_display">
<div id="jcb_packages_details">
</div><br />
<div id="jcb_package_owner_details">
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
@ -366,9 +349,167 @@ jQuery(document).ready(function($) {
<?php endif; ?>
<input type="hidden" name="task" value="import_joomla_components.import" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
</div>
<script type="text/javascript">
<?php if (($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)) || ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages))): ?>
// set packages that are on the page
var packages = {};
jQuery(document).ready(function($)
{
<?php if ($this->jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)): ?>
// get all jcb packages
jQuery("#jcb_package option").each(function()
{
var key = jQuery(this).val();
packages[key] = 'jcb';
});
<?php endif; ?>
<?php if ($this->vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?>
// get all vdm packages
jQuery("#vdm_package option").each(function()
{
var key = jQuery(this).val();
packages[key] = 'vdm';
});
<?php endif; ?>
// no start behind the scene getting of package info
autoJCBpackageInfo();
});
function autoJCBpackageInfo(){
jQuery.each( packages, function( url, type ) {
var key = url.replace(/\W/g, '');
// check if the values are local
var result = jQuery.jStorage.get('JCB-packages-details'+key, null);
if (!result && url.length > 0) {
autoJCBpackageInfoAgain(url, key, type);
}
});
}
function autoJCBpackageInfoAgain(url, key,type){
getJCBpackageInfo_server(url).done(function(result) {
if(result.owner || result.packages){
jQuery.jStorage.set('JCB-packages-details'+key, result, {TTL: expire});
}
});
}
function getJCBpackageInfo(type){
// show spinner
jQuery('#loading').css('display', 'block');
jQuery('#noticeboard').show();
jQuery('#installer-import').hide();
// get value
var url = jQuery('#'+type+'_package').val();
if (url) {
var key = url.replace(/\W/g, '');
// check if the values are local
var result = jQuery.jStorage.get('JCB-packages-details'+key, null);
if (result) {
showJCBpackageInfo(result, key, type);
} else {
getJCBpackageInfoAgain(url, key, type);
}
} else {
// hide spinner
jQuery('#loading').hide();
jQuery('#noticeboard').hide();
jQuery('#installer-import').show();
jQuery('#'+type+'_package_owner_details').html(' ');
jQuery('#'+type+'_packages_details').html(' ');
// some display moves
jQuery('#'+type+'_packages_installer').removeClass('span6').addClass('span12');
jQuery('#'+type+'_packages_display').removeClass('span6');
}
}
function getJCBpackageInfoAgain(url, key,type){
getJCBpackageInfo_server(url).done(function(result) {
showJCBpackageInfo(result, key,type);
});
}
function showJCBpackageInfo(result, key,type){
if(result.owner || result.packages){
jQuery('#'+type+'_packages_details').html(result.packages);
jQuery('#'+type+'_package_owner_details').html(result.owner);
jQuery.jStorage.set('JCB-packages-details'+key, result, {TTL: expire});
// some display moves
jQuery('#'+type+'_packages_installer').removeClass('span12').addClass('span6');
jQuery('#'+type+'_packages_display').addClass('span6');
} else {
if (result.error) {
jQuery('#'+type+'_packages_details').html(result.error);
}
jQuery('#'+type+'_package_owner_details').html(' ');
jQuery('#'+type+'_noticeboard').show();
// some display moves
jQuery('#'+type+'_packages_installer').removeClass('span6').addClass('span12');
jQuery('#'+type+'_packages_display').removeClass('span6');
}
// stop spinner
jQuery('#loading').hide();
jQuery('#noticeboard').hide();
jQuery('#installer-import').show();
}
function getJCBpackageInfo_server(url){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getJCBpackageInfo&format=json";
if(token.length > 0 && url.length > 0){
var request = 'token='+token+'&url=' + url;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
<?php endif; ?>
var noticeboard = "https://www.vdm.io/componentbuilder-noticeboard-md";
jQuery(document).ready(function () {
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery(".noticeboard-md").html(marked(board));
getIS(1,board).done(function(result) {
if (result){
jQuery(".vdm-new-notice").show();
getIS(2,board);
}
});
} else {
jQuery(".noticeboard-md").html(all_is_good);
}
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery(".noticeboard-md").html(all_is_good);
});
});
// to check is READ/NEW
function getIS(type,notice){
if (type == 1) {
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json");
} else if (type == 2) {
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json");
}
if(token.length > 0 && notice.length){
var request = "token="+token+"&notice="+notice;
}
return jQuery.ajax({
type: "POST",
url: getUrl,
dataType: "jsonp",
data: request,
jsonp: "callback"
});
}
jQuery('#adminForm').on('change', '#haskey',function (e)
{
e.preventDefault();
@ -379,4 +520,34 @@ jQuery('#adminForm').on('change', '#haskey',function (e)
jQuery("#sleutle").closest('.control-group').hide();
}
});
// nice little dot trick :)
jQuery(document).ready( function($) {
var x=0;
setInterval(function() {
var dots = "";
x++;
for (var y=0; y < x%8; y++) {
dots+=".";
}
$(".loading-dots").text(dots);
} , 500);
});
<?php
$app = JFactory::getApplication();
?>
function JRouter(link) {
<?php
if ($app->isSite())
{
echo 'var url = "'.JURI::root().'";';
}
else
{
echo 'var url = "";';
}
?>
return url+link;
}
</script>

View File

@ -42,7 +42,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
protected $packageInfo;
protected $formPackage;
protected $vdmPackages = false;
protected $freePackages = array('JCB_demo.zip', 'JCB_helloWorld.zip');
protected $directories = array();
public function display($tpl = null)
{
@ -51,6 +51,8 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
// Include helper submenu
ComponentbuilderHelper::addSubmenu('import');
}
// get component params
$this->params = JComponentHelper::getParams('com_componentbuilder');
$paths = new stdClass;
$paths->first = '';
@ -78,15 +80,30 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
{
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', null);
}
// get the management input from global settings
$manageDirectories = $this->params->get('manage_jcb_package_directories', 2);
if ($manageDirectories == 2)
{
$this->directories = array('vdm','jcb');
}
elseif ($manageDirectories == 1)
{
$this->directories = (array) $this->params->get('jcb_package_directories');
}
// set form only if smart package
if ($this->dataType === 'smart_package')
{
$this->packageInfo = json_decode($session->get('smart_package_info', false), true);
// add the form class
jimport('joomla.form.form');
// load the forms
$this->formPackage = $this->_getForm($this->dataType);
$this->vdmPackages = $this->_getForm('vdm_package');
$this->jcbPackages = $this->_getForm('jcb_package');
}
// Check for errors.
@ -95,10 +112,73 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
throw new Exception(implode("\n", $errors), 500);
}
// set the document
$this->setDocument();
// Display the template
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function setDocument()
{
// always make sure jquery is loaded.
JHtml::_('jquery.framework');
// Add the JavaScript for JStore
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js');
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js');
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js');
// add marked library
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js");
// check if we should use browser storage
$setBrowserStorage = $this->params->get('set_browser_storage', null);
if ($setBrowserStorage)
{
// check what (Time To Live) show we use
$storageTimeToLive = $this->params->get('storage_time_to_live', 'global');
if ('global' == $storageTimeToLive)
{
// use the global session time
$session = JFactory::getSession();
// must have itin milliseconds
$expire = ($session->getExpire()*60)* 1000;
}
else
{
// use the Componentbuilder Global setting
if (0 != $storageTimeToLive)
{
// this will convert the time into milliseconds
$storageTimeToLive = $storageTimeToLive * 1000;
}
$expire = $storageTimeToLive;
}
}
else
{
// set to use no storage
$expire = 30000; // only 30 seconds
}
// Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
$this->document->addScriptDeclaration("var all_is_good = '".JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME')."';");
// add a token on the page for javascript
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
// add the Uikit v2 style sheets
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// add Uikit v2 JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
}
public function _getForm($type)
{
$form = array();
@ -179,7 +259,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
// add to form
$form[] = $merge;
if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
if (!$this->packageInfo || ComponentbuilderHelper::getPackageComponentsKeyStatus($this->packageInfo))
{
// set required field
$required = true;
@ -243,9 +323,9 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$form[] = $sleutle;
}
}
elseif ('vdm_package' === $type && $listObjects = ComponentbuilderHelper::getGithubRepoFileList('jcbGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
elseif ('vdm_package' === $type && in_array('vdm', $this->directories) && $vdmListObjects = ComponentbuilderHelper::getGithubRepoFileList('vdmGithubPackages', ComponentbuilderHelper::$vdmGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
{
if (ComponentbuilderHelper::checkArray($listObjects))
if (ComponentbuilderHelper::checkArray($vdmListObjects))
{
// get the vdm_package list field
$vdm_package = JFormHelper::loadFieldType('list',true);
@ -257,7 +337,8 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
'name' => 'vdm_package',
'label' => 'COM_COMPONENTBUILDER_PACKAGE',
'class' => 'list_class',
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT');
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT',
'onchange' => "getJCBpackageInfo('vdm')");
// load the list
$load = false;
// load the vdm_package attributes
@ -266,11 +347,11 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$vdm_packageOptions = array();
$vdm_packageOptions[''] = 'COM_COMPONENTBUILDER__SELECT_PACKAGE_';
// load vdm_package options from array
foreach($listObjects as $listObject)
foreach($vdmListObjects as $vdmListObject)
{
if (strpos($listObject->path, '.zip') !== false)
if (strpos($vdmListObject->path, '.zip') !== false)
{
$vdm_packageOptions[ComponentbuilderHelper::$jcbGithubPackageUrl.$listObject->path] = $this->setPackageName($listObject->path);
$vdm_packageOptions[ComponentbuilderHelper::$vdmGithubPackageUrl.$vdmListObject->path] = $this->setPackageName($vdmListObject->path);
$load = true;
}
}
@ -286,22 +367,57 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
}
}
}
elseif ('jcb_package' === $type && in_array('jcb', $this->directories) && $jcbListObjects = ComponentbuilderHelper::getGithubRepoFileList('communityGithubPackages', ComponentbuilderHelper::$jcbGithubPackagesUrl.ComponentbuilderHelper::$accessToken))
{
if (ComponentbuilderHelper::checkArray($jcbListObjects))
{
// get the jcb_package list field
$jcb_package = JFormHelper::loadFieldType('list',true);
// start jcb_package xml
$jcb_packageXML = new SimpleXMLElement('<field/>');
// jcb_package attributes
$jcb_packageAttributes = array(
'type' => 'list',
'name' => 'jcb_package',
'label' => 'COM_COMPONENTBUILDER_PACKAGE',
'class' => 'list_class',
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT',
'onchange' => "getJCBpackageInfo('jcb')");
// load the list
$load = false;
// load the jcb_package attributes
ComponentbuilderHelper::xmlAddAttributes($jcb_packageXML, $jcb_packageAttributes);
// start the jcb_package options
$jcb_packageOptions = array();
$jcb_packageOptions[''] = 'COM_COMPONENTBUILDER__SELECT_PACKAGE_';
// load jcb_package options from array
foreach($jcbListObjects as $jcbListObject)
{
if (strpos($jcbListObject->path, '.zip') !== false)
{
$jcb_packageOptions[ComponentbuilderHelper::$jcbGithubPackageUrl.$jcbListObject->path] = $this->setPackageName($jcbListObject->path);
$load = true;
}
}
// only load if at least one item was found
if ($load)
{
// load the jcb_package options
ComponentbuilderHelper::xmlAddOptions($jcb_packageXML, $jcb_packageOptions);
// setup the jcb_package radio field
$jcb_package->setup($jcb_packageXML,'');
// add to form
$form[] = $jcb_package;
}
}
}
return $form;
}
public function setPackageName($name)
{
// the free switch
if (in_array($name, $this->freePackages))
{
$type = ' - free';
}
else
{
$type = ' - paid';
}
// return the name
return ComponentbuilderHelper::safeString( preg_replace('/(?<!^)([A-Z])/', '-\ \1', str_replace(array('.zip', 'JCB_'), '', $name)), 'W').$type;
return ComponentbuilderHelper::safeString( preg_replace('/(?<!^)([A-Z])/', '-\ \1', str_replace(array('.zip', 'JCB_'), '', $name)), 'W');
}
/**

View File

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

@ -344,10 +344,10 @@
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.7.6</version>
<version>2.7.7</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.6/JCB_v2.7.6.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.7/JCB_v2.7.7.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>

View File

@ -3692,7 +3692,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","minify":"0","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"&#187;","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","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(
@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.7.6 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.7.7 Was Successful! Let us know if anything is not working as expected.</h3>';
}
}

View File

@ -68,10 +68,16 @@ abstract class ComponentbuilderHelper
public static $snippetsPath = 'https://api.github.com/repos/vdm-io/Joomla-Component-Builder-Snippets/git/trees/master';
/**
* The packages paths
* The VDM packages paths
**/
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
public static $vdmGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Packages/git/trees/master";
public static $vdmGithubPackageUrl = "https://github.com/vdm-io/JCB-Packages/raw/master/";
/**
* The JCB packages paths
**/
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Community-Packages/git/trees/master";
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Community-Packages/raw/master/";
// not needed at this time (maybe latter)
public static $accessToken = "";
@ -2035,6 +2041,168 @@ abstract class ComponentbuilderHelper
}
return false;
}
protected static $pkOwnerSearch = array(
'company' => 'COM_COMPONENTBUILDER_EMCOMPANYEM_BSB',
'owner' => 'COM_COMPONENTBUILDER_EMOWNEREM_BSB',
'website' => 'COM_COMPONENTBUILDER_EMWEBSITEEM_BSB',
'email' => 'COM_COMPONENTBUILDER_EMEMAILEM_BSB',
'license' => 'COM_COMPONENTBUILDER_EMLICENSEEM_BSB',
'copyright' => 'COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB'
);
/**
* get the JCB package owner details display
**/
public static function getPackageOwnerDetailsDisplay(&$info, $trust = false)
{
$hasOwner = false;
$ownerDetails = '<h2 class="module-title nav-header">' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '</h2>';
$ownerDetails .= '<ul>';
// load the list items
foreach (self::$pkOwnerSearch as $key => $li)
{
if ($value = self::getPackageOwnerValue($key, $info))
{
$ownerDetails .= '<li>' . JText::sprintf($li, $value) . '</li>';
// check if we have a owner/source name
if (('owner' === $key || 'company' === $key) && !$hasOwner)
{
$hasOwner = true;
$owner = $value;
}
}
}
$ownerDetails .= '</ul>';
// provide some details to how the user can get a key
if ($hasOwner && isset($info['getKeyFrom']['buy_link']) && self::checkString($info['getKeyFrom']['buy_link']))
{
$ownerDetails .= '<hr />';
$ownerDetails .= JText::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $info['getKeyFrom']['buy_link'], $owner, $owner);
}
// add more custom links
elseif ($hasOwner && isset($info['getKeyFrom']['buy_links']) && self::checkArray($info['getKeyFrom']['buy_links']))
{
$buttons = array();
foreach ($info['getKeyFrom']['buy_links'] as $keyName => $link)
{
$buttons[] = JText::sprintf('COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $owner, $link, $owner, $keyName);
}
$ownerDetails .= '<hr />';
$ownerDetails .= implode('<br />', $buttons);
}
// return the owner details
if (!$hasOwner)
{
$ownerDetails = '<h2>' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '</h2>';
if (!$trust)
{
$ownerDetails .= '<p style="color: #922924;">' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '</p>';
}
}
return $ownerDetails;
}
public static function getPackageOwnerValue($key, &$info)
{
$source = (isset($info['source']) && isset($info['source'][$key])) ? 'source' : ((isset($info['getKeyFrom']) && isset($info['getKeyFrom'][$key])) ? 'getKeyFrom' : false);
if ($source && self::checkString($info[$source][$key]))
{
return $info[$source][$key];
}
return false;
}
/**
* get the JCB package component key status
**/
public static function getPackageComponentsKeyStatus(&$info)
{
// check the package key status
if (!isset($info['key']))
{
if (isset($info['getKeyFrom']) && isset($info['getKeyFrom']['owner']))
{
// this just confirms it for older packages
$info['key'] = true;
}
else
{
// this just confirms it for older packages
$info['key'] = false;
}
}
return $info['key'];
}
/**
* get the JCB package component details display
**/
public static function getPackageComponentsDetailsDisplay(&$info)
{
// check if these components need a key
$needKey = self::getPackageComponentsKeyStatus($info);
if (isset($info['name']) && self::checkArray($info['name']))
{
$cAmount = count((array) $info['name']);
$class2 = ($cAmount == 1) ? 'span12' : 'span6';
$counter = 1;
$display = array();
foreach ($info['name'] as $key => $value)
{
if ($cAmount > 1 && $counter == 3)
{
$display[] = '</div>';
$counter = 1;
}
if ($cAmount > 1 && $counter == 1)
{
$display[] = '<div>';
}
$display[] = '<div class="well well-small ' . $class2 . '">';
$display[] = '<h3>';
$display[] = $value . ' v' . $info['component_version'][$key];
if ($needKey)
{
$display[] = ' - <em>' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . '</em>';
}
else
{
$display[] = ' - <em>' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . '</em>';
}
$display[] = '</h3><h4>';
$display[] = $info['short_description'][$key];
$display[] = '</h4><ul><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB', $info['companyname'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IAUTHORI_BSB', $info['author'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IEMAILI_BSB', $info['email'][$key]);
$display[] = '</li><li>';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_IWEBSITEI_BSB', $info['website'][$key]);
$display[] = '</li></ul>';
$display[] = '<h4 class="nav-header">';
$display[] = JText::_('COM_COMPONENTBUILDER_LICENSE');
$display[] = '</h4><p>';
$display[] = $info['license'][$key];
$display[] = '</p><h4 class="nav-header">';
$display[] = JText::_('COM_COMPONENTBUILDER_COPYRIGHT');
$display[] = '</h4><p>';
$display[] = $info['copyright'][$key];
$display[] = '</p></div>';
$counter++;
}
// close the div if needed
if ($cAmount > 1)
{
$display[] = '</div>';
}
return implode("\n",$display);
}
return '<div>'.JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE').'</div>';
}
/**
* prepare base64 string for url
@ -3363,8 +3531,15 @@ abstract class ComponentbuilderHelper
}
public static function jsonToString($value, $sperator = ", ", $table = null)
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
$external = false;
if (strpos($table, '#__') !== false)
{
$external = true;
$table = str_replace('#__', '', $table);
}
// check if string is JSON
$result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE)
@ -3377,9 +3552,19 @@ abstract class ComponentbuilderHelper
$names = array();
foreach ($result as $val)
{
if ($name = self::getVar($table, $val, 'id', 'name'))
if ($external)
{
$names[] = $name;
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
{
$names[] = $name;
}
}
else
{
if ($name = self::getVar($table, $val, $id, $name))
{
$names[] = $name;
}
}
}
if (self::checkArray($names))

View File

@ -4,11 +4,14 @@ COM_COMPONENTBUILDER_API="Api"
COM_COMPONENTBUILDER_API_DESC="Sync Portal API"
COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator."
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!"
COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="<b>Get the key from</b> <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
COM_COMPONENTBUILDER_COMPONENT_DID_NOT_COMPILE="Component did not compile!"
COM_COMPONENTBUILDER_COMPONENT_IS_NOT_PUBLISHED_OR_IS_CHECKED_OUT="Component is not published, or is checked out!"
COM_COMPONENTBUILDER_COMPONENT_WAS_NOT_FOUND="Component was not found!"
COM_COMPONENTBUILDER_COPYRIGHT="Copyright"
COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
COM_COMPONENTBUILDER_DESCRIPTION="Description"
@ -25,20 +28,30 @@ COM_COMPONENTBUILDER_ERROR="Error!"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_FILE="File"
COM_COMPONENTBUILDER_FOLDER="Folder"
COM_COMPONENTBUILDER_FREEOPEN="Free/Open"
COM_COMPONENTBUILDER_GET_THE_KEY_FROM_BSB_FOR_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="Get the key from <b>%s</b> for <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
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_IAUTHORI_BSB="<i>Author</i>: <b>%s</b>"
COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB="<i>Company Name</i>: <b>%s</b>"
COM_COMPONENTBUILDER_IEMAILI_BSB="<i>Email</i>: <b>%s</b>"
COM_COMPONENTBUILDER_IWEBSITEI_BSB="<i>Website</i>: <b>%s</b>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key"
COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED="Key has not changed"
COM_COMPONENTBUILDER_LICENSE="License"
COM_COMPONENTBUILDER_LICENSE_S="License: %s"
COM_COMPONENTBUILDER_LINK="Link"
COM_COMPONENTBUILDER_LOCAL="Local"
COM_COMPONENTBUILDER_NEW="New"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE="No component details found, so it is not safe to continue!"
COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key."
COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set"
COM_COMPONENTBUILDER_OWNER_S="Owner: %s"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."