diff --git a/README.md b/README.md index e6cc0d228..f112775c4 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *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*: **193930** ++ *Line count*: **193966** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index e6cc0d228..f112775c4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *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*: **193930** ++ *Line count*: **193966** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 1f89e00d1..c8cea1c53 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -227,6 +227,13 @@ abstract class ###Component###Helper 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 05cd0d8a8..277a746c2 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -37,6 +37,13 @@ abstract class ###Component###Helper 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/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 056b9be47..e61231c0c 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -11850,7 +11850,15 @@ 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']); + // 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 diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 475d7a847..21a2dc084 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -2161,8 +2161,8 @@ abstract class ComponentbuilderHelper $display[] = '
'; } $display[] = '
'; - $display[] = '

'; + $display[] = $value . ' v' . $info['component_version'][$key]; if ($needKey) { $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . ''; @@ -2171,24 +2171,24 @@ abstract class ComponentbuilderHelper { $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . ''; } - $display[] = '

'; + $display[] = '

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

  • '; - $display[] = JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB', $info['companyname'][$key]); + $display[] = '

'; - $display[] = '

'; + $display[] = '

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

'; + $display[] = '

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

'; @@ -4155,6 +4155,13 @@ abstract class ComponentbuilderHelper 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) @@ -4167,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 ba9d58d1f..96ee49b2d 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -897,7 +897,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 +936,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!" @@ -3623,14 +3622,12 @@ 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_EMEMAILEM_BSB="Email: %s" COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" -COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" +COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_EQUAL="Equal" COM_COMPONENTBUILDER_EQUAL_MEANS_THAT_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_YOUR_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_THE_SAME_BCREATIONB_AND_BMODIFIED_DATEB="Equal means that the community snippet (with the same name, library and type) and your local snippet (with the same name, library and type) has the same creation and modified date." COM_COMPONENTBUILDER_ERROR="Error" @@ -4188,7 +4185,10 @@ COM_COMPONENTBUILDER_HIDE="Hide" 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_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." @@ -4248,6 +4248,7 @@ 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" diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php index fb34dae40..ab303f1df 100644 --- a/admin/views/import_joomla_components/tmpl/default.php +++ b/admin/views/import_joomla_components/tmpl/default.php @@ -233,7 +233,7 @@ jQuery(document).ready(function($) { dataType === 'smart_package'): ?>

-

+

'upload')); ?> @@ -286,7 +286,7 @@ jQuery(document).ready(function($) {
-

+

@@ -300,7 +300,7 @@ jQuery(document).ready(function($) {
   
-
+
@@ -316,7 +316,7 @@ jQuery(document).ready(function($) {
-

+

@@ -330,7 +330,7 @@ jQuery(document).ready(function($) {
   
-
+
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index bbe085c20..fc7883f75 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -2161,8 +2161,8 @@ abstract class ComponentbuilderHelper $display[] = '
'; } $display[] = '
'; - $display[] = '

'; + $display[] = $value . ' v' . $info['component_version'][$key]; if ($needKey) { $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . ''; @@ -2171,24 +2171,24 @@ abstract class ComponentbuilderHelper { $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . ''; } - $display[] = '

'; + $display[] = '

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

  • '; - $display[] = JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB', $info['companyname'][$key]); + $display[] = '

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

'; + $display[] = '

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

'; + $display[] = '

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

'; @@ -3533,6 +3533,13 @@ abstract class ComponentbuilderHelper 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) @@ -3545,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 9bb6625ec..5b6ee46d2 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -6,7 +6,6 @@ COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE 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_BSB_EMCOMPONENT_DETAILSEM="%s component details" 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!" @@ -19,14 +18,12 @@ COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_EDIT_S="Edit %s" 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_EMEMAILEM_BSB="Email: %s" COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" -COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" +COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_ERROR="Error!" COM_COMPONENTBUILDER_EXAMPLE="Example" COM_COMPONENTBUILDER_FILE="File" @@ -34,6 +31,10 @@ 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"