diff --git a/README.md b/README.md index 1a69e03c2..054559bb4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.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** diff --git a/admin/README.txt b/admin/README.txt index 1a69e03c2..054559bb4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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** diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 2d4f3b4cc..c8cea1c53 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -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)) diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index ffdd00168..277a746c2 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -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)) diff --git a/admin/compiler/joomla_3/JTable.php b/admin/compiler/joomla_3/JTable.php index 63ebbd9ee..67b5d48c4 100644 --- a/admin/compiler/joomla_3/JTable.php +++ b/admin/compiler/joomla_3/JTable.php @@ -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### } diff --git a/admin/config.xml b/admin/config.xml index 890b879d7..efaaa8bab 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -47,6 +47,72 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + COM_COMPONENTBUILDER_CONFIG_NO - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + 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 { diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index d16eab8fd..9e4f0563b 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -163,40 +163,9 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $keyNotice = '

' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

'; $keyNotice .= '

' . 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') . ''; // 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 = '

' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '

'; - $ownerDetails .= '
    '; - if (isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $model->info['getKeyFrom']['company']) . '
  • '; - } - // add value only if set - if (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $model->info['getKeyFrom']['owner']) . '
  • '; - } - // add value only if set - if (isset($model->info['getKeyFrom']['website']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['website'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $model->info['getKeyFrom']['website']) . '
  • '; - } - // add value only if set - if (isset($model->info['getKeyFrom']['email']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['email'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $model->info['getKeyFrom']['email']) . '
  • '; - } - // add value only if set - if (isset($model->info['getKeyFrom']['license']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['license'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $model->info['getKeyFrom']['license']) . '
  • '; - } - // add value only if set - if (isset($model->info['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['copyright'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $model->info['getKeyFrom']['copyright']) . '
  • '; - } - $ownerDetails .= '
'; + $ownerDetails = componentbuilderHelper::getPackageOwnerDetailsDisplay($model->info, true); } else { diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 90dfc205b..ec001eee0 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -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] = '» ' . $this->componentData->name; + $addPrefix = $this->params->get('add_menu_prefix', 1); + if ($addPrefix == 1) + { + $prefix = trim($this->params->get('menu_prefix', '»')); + $this->langContent['adminsys'][$lang] = $prefix . ' ' . $this->componentData->name; + } + else + { + $this->langContent['adminsys'][$lang] = $this->componentData->name; + } foreach ($this->componentData->admin_views as $view) { // set custom menu diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 53a43be1a..5f900f1ed 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -514,6 +514,9 @@ class Infusion extends Interpretation // ###GENERATENEWTITLE### <<>> $this->fileContentDynamic[$viewName_single]['###GENERATENEWTITLE###'] = $this->setGenerateNewTitle($viewName_single); + // ###GENERATENEWALIAS### <<>> + $this->fileContentDynamic[$viewName_single]['###GENERATENEWALIAS###'] = $this->setGenerateNewAlias($viewName_single); + // ###MODEL_BATCH_COPY### <<>> $this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_COPY###'] = $this->setBatchCopy($viewName_single); diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index fac68f0dd..21a2dc084 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -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 = ''; + $ownerDetails .= '
    '; + // load the list items + foreach (self::$pkOwnerSearch as $key => $li) + { + if ($value = self::getPackageOwnerValue($key, $info)) + { + $ownerDetails .= '
  • ' . JText::sprintf($li, $value) . '
  • '; + // check if we have a owner/source name + if (('owner' === $key || 'company' === $key) && !$hasOwner) + { + $hasOwner = true; + $owner = $value; + } + } + } + $ownerDetails .= '
'; + + // 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 .= '
'; + $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 .= '
'; + $ownerDetails .= implode('
', $buttons); + } + // return the owner details + if (!$hasOwner) + { + $ownerDetails = '

' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '

'; + if (!$trust) + { + $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '

'; + } + } + 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[] = ''; + $counter = 1; + } + if ($cAmount > 1 && $counter == 1) + { + $display[] = '
'; + } + $display[] = '
'; + $display[] = '

'; + $display[] = $value . ' v' . $info['component_version'][$key]; + if ($needKey) + { + $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . ''; + } + else + { + $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . ''; + } + $display[] = '

'; + $display[] = $info['short_description'][$key]; + $display[] = '

  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB', $info['companyname'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IAUTHORI_BSB', $info['author'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IEMAILI_BSB', $info['email'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IWEBSITEI_BSB', $info['website'][$key]); + $display[] = '
'; + $display[] = '

'; + $display[] = $info['license'][$key]; + $display[] = '

'; + $display[] = $info['copyright'][$key]; + $display[] = '

'; + + $counter++; + } + // close the div if needed + if ($cAmount > 1) + { + $display[] = '
'; + } + return implode("\n",$display); + } + return '
'.JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE').'
'; + } /** * 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)) diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index fe0910bfe..de51180ae 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -13,6 +13,7 @@ COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here" COM_COMPONENTBUILDER_ADD_MENU="Add Menu" COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder & Sales Server (if set)" 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 gitHub repository.
Watch this tutorial 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. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers!" +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. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers! Find out why!" 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="Images not m COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="Multiple Field (repeatable mode) id:%s mismatch in field:%s, and was removed from the field." COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="%s->%s in %s has id mismatch. So the %s was removed!" COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="%s could not be imported%s" -COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details" COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="%s has been imported!" COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="%s has been updated!" COM_COMPONENTBUILDER_BSB_WAS_FOUND="%s 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="»" +COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix
+check this list out" +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="Author: %s" COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" -COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB="Company Name: %s" COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="Copyright: %s" COM_COMPONENTBUILDER_EMEMAILEM_BSB="Email: %s" COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" @@ -4037,6 +4051,7 @@ COM_COMPONENTBUILDER_FOLDER="Folder" COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder %s was moved to %s" COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder %s was not moved to %s" 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: %s" @@ -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 free keys from VDM." COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" +COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="

Data is corrupt!

This could be due to key error, or broken package!" COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="

Data is corrupt!

This could be due to broken package!" -COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_KEY_ERROR_OR_BROKEN_PACKAGE="

Data is corrupt!

This could be due to key error, or broken package!" +COM_COMPONENTBUILDER_IAUTHORI_BSB="Author: %s" +COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB="Company Name: %s" COM_COMPONENTBUILDER_ICON="Icon" +COM_COMPONENTBUILDER_IEMAILI_BSB="Email: %s" 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="Website: %s" 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 not to continue 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: %s" COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: %s
%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, no view or id found in session or view not allowed to access area, 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 gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.
Some of these packages would require a key, since they are not free. Get a key today!." +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 gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.
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 gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.
Some of these packages would require a key, since they are not free. Get a key today!." 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 None DB 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 Show in list view 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 %s 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 PASSED checksum validation! Please validate this checksum: %s to be the same as the one found @ " +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 PASSED the checksum validation!

Manually also validate that the correct checksum was used.
This checksum: %s must be the same as the one found @
" COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TITLE="Title" COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 9e70b7092..46e3d887c 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -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 **/ diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index 48a2c4b07..7ad6e0357 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -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'); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 749eb03d3..a4f1657b9 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -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); } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 4ac256d64..42fbe1790 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -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` ( diff --git a/admin/tables/admin_fields.php b/admin/tables/admin_fields.php index a47bfb352..ea86a2c3c 100644 --- a/admin/tables/admin_fields.php +++ b/admin/tables/admin_fields.php @@ -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; } } diff --git a/admin/tables/admin_fields_conditions.php b/admin/tables/admin_fields_conditions.php index 0c51e93a5..ca14005bb 100644 --- a/admin/tables/admin_fields_conditions.php +++ b/admin/tables/admin_fields_conditions.php @@ -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; } } diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php index 3066e00c1..20ef65eb4 100644 --- a/admin/tables/admin_view.php +++ b/admin/tables/admin_view.php @@ -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; } } diff --git a/admin/tables/component_admin_views.php b/admin/tables/component_admin_views.php index 9b4628c8e..7356acec2 100644 --- a/admin/tables/component_admin_views.php +++ b/admin/tables/component_admin_views.php @@ -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; } } diff --git a/admin/tables/component_config.php b/admin/tables/component_config.php index 36a2c9fd2..af3afc18e 100644 --- a/admin/tables/component_config.php +++ b/admin/tables/component_config.php @@ -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; } } diff --git a/admin/tables/component_custom_admin_menus.php b/admin/tables/component_custom_admin_menus.php index a0839cd4f..b350ea89f 100644 --- a/admin/tables/component_custom_admin_menus.php +++ b/admin/tables/component_custom_admin_menus.php @@ -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; } } diff --git a/admin/tables/component_custom_admin_views.php b/admin/tables/component_custom_admin_views.php index 30a75fcde..7eb8a79e9 100644 --- a/admin/tables/component_custom_admin_views.php +++ b/admin/tables/component_custom_admin_views.php @@ -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; } } diff --git a/admin/tables/component_dashboard.php b/admin/tables/component_dashboard.php index 461fc660b..98ce570e9 100644 --- a/admin/tables/component_dashboard.php +++ b/admin/tables/component_dashboard.php @@ -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; } } diff --git a/admin/tables/component_files_folders.php b/admin/tables/component_files_folders.php index 6ab101da6..93a87c74f 100644 --- a/admin/tables/component_files_folders.php +++ b/admin/tables/component_files_folders.php @@ -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; } } diff --git a/admin/tables/component_mysql_tweaks.php b/admin/tables/component_mysql_tweaks.php index 0db29208b..29fb03c1d 100644 --- a/admin/tables/component_mysql_tweaks.php +++ b/admin/tables/component_mysql_tweaks.php @@ -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; } } diff --git a/admin/tables/component_site_views.php b/admin/tables/component_site_views.php index 28aa866e3..755e09b42 100644 --- a/admin/tables/component_site_views.php +++ b/admin/tables/component_site_views.php @@ -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; } } diff --git a/admin/tables/component_updates.php b/admin/tables/component_updates.php index 1870c7b15..3b554cc9d 100644 --- a/admin/tables/component_updates.php +++ b/admin/tables/component_updates.php @@ -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; } } diff --git a/admin/tables/custom_admin_view.php b/admin/tables/custom_admin_view.php index f60592998..01e12dca1 100644 --- a/admin/tables/custom_admin_view.php +++ b/admin/tables/custom_admin_view.php @@ -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; } } diff --git a/admin/tables/custom_code.php b/admin/tables/custom_code.php index 2dd802292..0c503e051 100644 --- a/admin/tables/custom_code.php +++ b/admin/tables/custom_code.php @@ -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; } } diff --git a/admin/tables/dynamic_get.php b/admin/tables/dynamic_get.php index e09939cc5..13cce4e12 100644 --- a/admin/tables/dynamic_get.php +++ b/admin/tables/dynamic_get.php @@ -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; } } diff --git a/admin/tables/field.php b/admin/tables/field.php index 11fc0be19..36076d802 100644 --- a/admin/tables/field.php +++ b/admin/tables/field.php @@ -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; } } diff --git a/admin/tables/fieldtype.php b/admin/tables/fieldtype.php index 0d16ef0cb..5faf0559e 100644 --- a/admin/tables/fieldtype.php +++ b/admin/tables/fieldtype.php @@ -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; } } diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php index a51c35db3..5d4b1c51c 100644 --- a/admin/tables/help_document.php +++ b/admin/tables/help_document.php @@ -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; } } diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 9fe5134a5..b44df58dc 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -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; } } diff --git a/admin/tables/language.php b/admin/tables/language.php index 2ea6bdf11..69768494e 100644 --- a/admin/tables/language.php +++ b/admin/tables/language.php @@ -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; } } diff --git a/admin/tables/language_translation.php b/admin/tables/language_translation.php index 65f61f083..848567bbe 100644 --- a/admin/tables/language_translation.php +++ b/admin/tables/language_translation.php @@ -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; } } diff --git a/admin/tables/layout.php b/admin/tables/layout.php index cc928a24e..3ef3dc06b 100644 --- a/admin/tables/layout.php +++ b/admin/tables/layout.php @@ -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; } } diff --git a/admin/tables/library.php b/admin/tables/library.php index 174d8cc26..598f04b5e 100644 --- a/admin/tables/library.php +++ b/admin/tables/library.php @@ -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; } } diff --git a/admin/tables/library_config.php b/admin/tables/library_config.php index 975949bc3..2616c24fc 100644 --- a/admin/tables/library_config.php +++ b/admin/tables/library_config.php @@ -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; } } diff --git a/admin/tables/library_files_folders_urls.php b/admin/tables/library_files_folders_urls.php index d5ca57a49..ecbad6a8b 100644 --- a/admin/tables/library_files_folders_urls.php +++ b/admin/tables/library_files_folders_urls.php @@ -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; } } diff --git a/admin/tables/server.php b/admin/tables/server.php index f22730970..ec6d96e81 100644 --- a/admin/tables/server.php +++ b/admin/tables/server.php @@ -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; } } diff --git a/admin/tables/site_view.php b/admin/tables/site_view.php index 08c8456cd..5e50f0c0b 100644 --- a/admin/tables/site_view.php +++ b/admin/tables/site_view.php @@ -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; } } diff --git a/admin/tables/snippet.php b/admin/tables/snippet.php index bafd87f97..9b8a7c420 100644 --- a/admin/tables/snippet.php +++ b/admin/tables/snippet.php @@ -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; } } diff --git a/admin/tables/snippet_type.php b/admin/tables/snippet_type.php index cb4e691ba..0c85abd04 100644 --- a/admin/tables/snippet_type.php +++ b/admin/tables/snippet_type.php @@ -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; } } diff --git a/admin/tables/template.php b/admin/tables/template.php index 1af880724..ae36ced8a 100644 --- a/admin/tables/template.php +++ b/admin/tables/template.php @@ -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; } } diff --git a/admin/tables/validation_rule.php b/admin/tables/validation_rule.php index b270f9471..d0ca86176 100644 --- a/admin/tables/validation_rule.php +++ b/admin/tables/validation_rule.php @@ -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; } } diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php index af8eb6dc5..3b405c49b 100644 --- a/admin/views/import_joomla_components/tmpl/default.php +++ b/admin/views/import_joomla_components/tmpl/default.php @@ -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(""); + } + 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(); + } + }; @@ -117,7 +139,6 @@ JHtml::_('behavior.keepalive'); jQuery(document).ready(function($) { var outerDiv = $('body'); - $('
') .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($) { dataType === 'smart_package') ? '.zip' : 'none'; ?> - -
+
sidebar)) : ?> @@ -146,6 +166,12 @@ jQuery(document).ready(function($) {
+ +
hasPackage && $this->dataType === 'smart_package') : ?> packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) @@ -190,97 +216,14 @@ jQuery(document).ready(function($) {
- ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . ''; - $ownerDetails .= '
    '; - if (isset($this->packageInfo['getKeyFrom']['company']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['company'])) - { - $owner = $this->packageInfo['getKeyFrom']['company']; - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $this->packageInfo['getKeyFrom']['company']) . '
  • '; - } - // 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 .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $this->packageInfo['getKeyFrom']['owner']) . '
  • '; - } - // add value only if set - if (isset($this->packageInfo['getKeyFrom']['website']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['website'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $this->packageInfo['getKeyFrom']['website']) . '
  • '; - } - // add value only if set - if (isset($this->packageInfo['getKeyFrom']['email']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['email'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $this->packageInfo['getKeyFrom']['email']) . '
  • '; - } - // add value only if set - if (isset($this->packageInfo['getKeyFrom']['license']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['license'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $this->packageInfo['getKeyFrom']['license']) . '
  • '; - } - // add value only if set - if (isset($this->packageInfo['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($this->packageInfo['getKeyFrom']['copyright'])) - { - $ownerDetails .= '
  • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $this->packageInfo['getKeyFrom']['copyright']) . '
  • '; - } - $ownerDetails .= '
'; - - // 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 .= '
'; - $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 .= '
'; - $ownerDetails .= implode('
', $buttons); - } - - // return the owner details - if (!isset($owner)) - { - $ownerDetails = '

' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '

'; - $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '

'; - } - echo $ownerDetails; - ?> + packageInfo); ?>
packageInfo['name']) && ComponentbuilderHelper::checkArray($this->packageInfo['name'])) : ?> - - packageInfo['name'] as $key => $value): ?> - 1 && $counter == 3) { echo '
'; $counter = 1;} ?> - 1 && $counter == 1) { echo '
'; } ?> -
- -

packageInfo['short_description'][$key]; ?>

-
    -
  • packageInfo['companyname'][$key]); ?>
  • -
  • packageInfo['author'][$key]); ?>
  • -
  • packageInfo['email'][$key]); ?>
  • -
  • packageInfo['website'][$key]); ?>
  • -
- -

packageInfo['license'][$key]; ?>

- -

packageInfo['copyright'][$key]; ?>

-
- - + packageInfo); ?> @@ -289,7 +232,7 @@ jQuery(document).ready(function($) { dataType === 'smart_package'): ?>

-

+

'upload')); ?> @@ -338,25 +281,65 @@ jQuery(document).ready(function($) { - vdmPackages): ?> + vdmPackages && ComponentbuilderHelper::checkArray($this->vdmPackages)): ?> -
- +
-

-

+

+

+

- vdmPackages as $field): ?> -
-
label;?>
-
input;?>
+
+ + vdmPackages as $field): ?> +
+
label;?>
+
input;?>
+
+ +
+     +
+
+
+
+
+
+

+
- -
-     +
+ + + + jcbPackages && ComponentbuilderHelper::checkArray($this->jcbPackages)) : ?> + +
+
+

+

+

-
-
+
+ + jcbPackages as $field): ?> +
+
label;?>
+
input;?>
+
+ +
+     +
+
+
+
+
+
+

+
+
+
@@ -366,9 +349,167 @@ jQuery(document).ready(function($) { +
diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index dadb90135..b7df76781 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -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(''); + // 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('/(? COM_COMPONENTBUILDER - 30th April, 2018 + 3rd May, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.7.6 + 2.7.7 Component Builder (v.2.7.6) +

Component Builder (v.2.7.7)

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. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index e6e3ef180..14c0ca072 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -344,10 +344,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.7.6 + 2.7.7 http://joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.6/JCB_v2.7.6.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.7/JCB_v2.7.7.zip stable diff --git a/script.php b/script.php index b4b18579d..2c10d9efe 100644 --- a/script.php +++ b/script.php @@ -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":"»","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 ' -

Upgrade to Version 2.7.6 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.7.7 Was Successful! Let us know if anything is not working as expected.

'; } } diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 85534fe73..fc7883f75 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -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 = ''; + $ownerDetails .= '
    '; + // load the list items + foreach (self::$pkOwnerSearch as $key => $li) + { + if ($value = self::getPackageOwnerValue($key, $info)) + { + $ownerDetails .= '
  • ' . JText::sprintf($li, $value) . '
  • '; + // check if we have a owner/source name + if (('owner' === $key || 'company' === $key) && !$hasOwner) + { + $hasOwner = true; + $owner = $value; + } + } + } + $ownerDetails .= '
'; + + // 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 .= '
'; + $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 .= '
'; + $ownerDetails .= implode('
', $buttons); + } + // return the owner details + if (!$hasOwner) + { + $ownerDetails = '

' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '

'; + if (!$trust) + { + $ownerDetails .= '

' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '

'; + } + } + 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[] = ''; + $counter = 1; + } + if ($cAmount > 1 && $counter == 1) + { + $display[] = '
'; + } + $display[] = '
'; + $display[] = '

'; + $display[] = $value . ' v' . $info['component_version'][$key]; + if ($needKey) + { + $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . ''; + } + else + { + $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . ''; + } + $display[] = '

'; + $display[] = $info['short_description'][$key]; + $display[] = '

  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB', $info['companyname'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IAUTHORI_BSB', $info['author'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IEMAILI_BSB', $info['email'][$key]); + $display[] = '
  • '; + $display[] = JText::sprintf('COM_COMPONENTBUILDER_IWEBSITEI_BSB', $info['website'][$key]); + $display[] = '
'; + $display[] = '

'; + $display[] = $info['license'][$key]; + $display[] = '

'; + $display[] = $info['copyright'][$key]; + $display[] = '

'; + + $counter++; + } + // close the div if needed + if ($cAmount > 1) + { + $display[] = '
'; + } + return implode("\n",$display); + } + return '
'.JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE').'
'; + } /** * 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)) diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index b55082f73..5b6ee46d2 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -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="Get the key from %s" 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 %s for %s" COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" +COM_COMPONENTBUILDER_IAUTHORI_BSB="Author: %s" +COM_COMPONENTBUILDER_ICOMPANY_NAMEI_BSB="Company Name: %s" +COM_COMPONENTBUILDER_IEMAILI_BSB="Email: %s" +COM_COMPONENTBUILDER_IWEBSITEI_BSB="Website: %s" 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
You can add an access token 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 import process before adding the key, this way if the user/dev does not have the key they can see where to get it."