diff --git a/README.md b/README.md index b072a7331..be78e0027 100644 --- a/README.md +++ b/README.md @@ -126,11 +126,11 @@ 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*: 3rd April, 2018 ++ *Last Build*: 8th April, 2018 + *Version*: 2.7.1 + *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*: **188547** ++ *Line count*: **188942** + *Field count*: **1011** + *File count*: **1197** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index b072a7331..be78e0027 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -126,11 +126,11 @@ 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*: 3rd April, 2018 ++ *Last Build*: 8th April, 2018 + *Version*: 2.7.1 + *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*: **188547** ++ *Line count*: **188942** + *Field count*: **1011** + *File count*: **1197** + *Folder count*: **193** diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index fae8c8cb8..2d4f3b4cc 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -110,6 +110,19 @@ abstract class ###Component###Helper ###SUBMENU### }###HELPER_CREATEUSER### ###HELPER_UIKIT### ###HELPER_EXEL### + /** + * Get a Variable + * + * @param string $table The table from which to get the variable + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * + * @return mix string/int/float + * + */ public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###') { if(!$where) @@ -150,6 +163,20 @@ abstract class ###Component###Helper return false; } + /** + * Get array of variables + * + * @param string $table The table from which to get the variables + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * @param bool $unique The switch to return a unique array + * + * @return array + * + */ public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true) { if(!$where) @@ -618,28 +645,141 @@ abstract class ###Component###Helper return JAccess::getAssetRules(0); } + /** + * xmlAppend + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement + * + * @return null + * + */ + public static function xmlAppend(&$xml, $node) + { + if (!$node) + { + // element was not returned + return; + } + switch (get_class($node)) + { + case 'stdClass': + if (property_exists($node, 'comment')) + { + self::xmlComment($xml, $node->comment); + } + if (property_exists($node, 'fieldXML')) + { + self::xmlAppend($xml, $node->fieldXML); + } + break; + case 'SimpleXMLElement': + $domXML = dom_import_simplexml($xml); + $domNode = dom_import_simplexml($node); + $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); + $xml = simplexml_import_dom($domXML); + break; + } + } + + /** + * xmlComment + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param string $comment The comment to inject + * + * @return null + * + */ + public static function xmlComment(&$xml, $comment) + { + $domXML = dom_import_simplexml($xml); + $domComment = new DOMComment($comment); + $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); + $domXML->appendChild($nodeTarget); + $xml = simplexml_import_dom($domXML); + } + + /** + * xmlAddAttributes + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $attributes The attributes to apply to the XML element + * + * @return null + * + */ + public static function xmlAddAttributes(&$xml, $attributes = array()) + { + foreach ($attributes as $key => $value) + { + $xml->addAttribute($key, $value); + } + } + + /** + * xmlAddOptions + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $options The options to apply to the XML element + * + * @return void + * + */ + public static function xmlAddOptions(&$xml, $options = array()) + { + foreach ($options as $key => $value) + { + $addOption = $xml->addChild('option'); + $addOption->addAttribute('value', $key); + $addOption[] = $value; + } + } + + /** + * Render Bool Button + * + * @param array $args All the args for the button + * 0) name + * 1) additional (options class) // not used at this time + * 2) default + * 3) yes (name) + * 4) no (name) + * + * @return string The input html of the button + * + */ public static function renderBoolButton() { $args = func_get_args(); + // check if there is additional button class + $additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time + // start the xml + $buttonXML = new SimpleXMLElement(''); + // button attributes + $buttonAttributes = array( + 'type' => 'radio', + 'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button', + 'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway + 'class' => 'btn-group', + 'filter' => 'INT', + 'default' => isset($args[2]) ? (int) $args[2] : 0); + // load the haskey attributes + self::xmlAddAttributes($buttonXML, $buttonAttributes); + // set the button options + $buttonOptions = array( + '1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES', + '0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'); + // load the button options + self::xmlAddOptions($buttonXML, $buttonOptions); // get the radio element $button = JFormHelper::loadFieldType('radio'); - // setup the properties - $name = self::htmlEscape($args[0]); - $additional = isset($args[1]) ? (string) $args[1] : ''; - $value = $args[2]; - $yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES'; - $no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'; - - // prepare the xml - $element = new SimpleXMLElement(''); - // run - $button->setup($element, $value); + $button->setup($buttonXML, $buttonAttributes['default']); return $button->input; - } /** diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index 3dc3ae053..ffdd00168 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -291,30 +291,156 @@ abstract class ###Component###Helper return JAccess::getAssetRules(0); } + /** + * xmlAppend + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement + * + * @return null + * + */ + public static function xmlAppend(&$xml, $node) + { + if (!$node) + { + // element was not returned + return; + } + switch (get_class($node)) + { + case 'stdClass': + if (property_exists($node, 'comment')) + { + self::xmlComment($xml, $node->comment); + } + if (property_exists($node, 'fieldXML')) + { + self::xmlAppend($xml, $node->fieldXML); + } + break; + case 'SimpleXMLElement': + $domXML = dom_import_simplexml($xml); + $domNode = dom_import_simplexml($node); + $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); + $xml = simplexml_import_dom($domXML); + break; + } + } + + /** + * xmlComment + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param string $comment The comment to inject + * + * @return null + * + */ + public static function xmlComment(&$xml, $comment) + { + $domXML = dom_import_simplexml($xml); + $domComment = new DOMComment($comment); + $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); + $domXML->appendChild($nodeTarget); + $xml = simplexml_import_dom($domXML); + } + + /** + * xmlAddAttributes + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $attributes The attributes to apply to the XML element + * + * @return null + * + */ + public static function xmlAddAttributes(&$xml, $attributes = array()) + { + foreach ($attributes as $key => $value) + { + $xml->addAttribute($key, $value); + } + } + + /** + * xmlAddOptions + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $options The options to apply to the XML element + * + * @return void + * + */ + public static function xmlAddOptions(&$xml, $options = array()) + { + foreach ($options as $key => $value) + { + $addOption = $xml->addChild('option'); + $addOption->addAttribute('value', $key); + $addOption[] = $value; + } + } + + /** + * Render Bool Button + * + * @param array $args All the args for the button + * 0) name + * 1) additional (options class) // not used at this time + * 2) default + * 3) yes (name) + * 4) no (name) + * + * @return string The input html of the button + * + */ public static function renderBoolButton() { $args = func_get_args(); + // check if there is additional button class + $additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time + // start the xml + $buttonXML = new SimpleXMLElement(''); + // button attributes + $buttonAttributes = array( + 'type' => 'radio', + 'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button', + 'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway + 'class' => 'btn-group', + 'filter' => 'INT', + 'default' => isset($args[2]) ? (int) $args[2] : 0); + // load the haskey attributes + self::xmlAddAttributes($buttonXML, $buttonAttributes); + // set the button options + $buttonOptions = array( + '1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES', + '0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'); + // load the button options + self::xmlAddOptions($buttonXML, $buttonOptions); // get the radio element $button = JFormHelper::loadFieldType('radio'); - // setup the properties - $name = self::htmlEscape($args[0]); - $additional = isset($args[1]) ? (string) $args[1] : ''; - $value = $args[2]; - $yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES'; - $no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'; - - // prepare the xml - $element = new SimpleXMLElement(''); - // run - $button->setup($element, $value); + $button->setup($buttonXML, $buttonAttributes['default']); return $button->input; - }###HELPER_UIKIT### ###HELPER_CREATEUSER### + /** + * Get a variable + * + * @param string $table The table from which to get the variable + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * + * @return mix string/int/float + * + */ public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###') { if(!$where) @@ -355,6 +481,20 @@ abstract class ###Component###Helper return false; } + /** + * Get array of variables + * + * @param string $table The table from which to get the variables + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * @param bool $unique The switch to return a unique array + * + * @return array + * + */ public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = '###component###', $unique = true) { if(!$where) diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 6c8f1d8e8..afa557bde 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -250,7 +250,8 @@ class Get 'Joomla' . '.JText._(', 'JText:' . ':script(', 'JText:' . ':_(', - 'JText:' . ':sprintf(' + 'JText:' . ':sprintf(', + 'JustTEXT:' . ':_(' ); /** @@ -3568,11 +3569,11 @@ class Get /** * Set Language Place Holders - * + * * @param string $content The content * * @return string The content with the updated Language place holder - * + * */ public function setLangStrings($content) { @@ -3591,11 +3592,17 @@ class Get { // insure string is not broken $content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content); - // first get the Joomla.JText._() + // reset some buckets + $langHolders = array(); + $langCheck = array(); + $langOnly = array(); + $jsTEXT = array(); + $scTEXT = array(); + // first get the Joomla .JText._() if (in_array('Joomla' . '.JText._(', $langStringTargets)) { $jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla" . ".JText._('", "'"); - $jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla.' . 'JText._("', '"'); + $jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla' . '.JText._("', '"'); // combine into one array $jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT); // we need to add a check to insure these JavaScript lang matchup @@ -3621,50 +3628,89 @@ class Get $this->langMatch = ComponentbuilderHelper::mergeArrays(array($scTEXT, $this->langMatch)); } } + // now do the little trick for JustTEXT: :_('Just uppercase text'); + if (in_array('JustTEXT:' . ':_(', $langStringTargets)) + { + $langOnly[] = ComponentbuilderHelper::getAllBetween($content, "JustTEXT:" . ":_('", "')"); + $langOnly[] = ComponentbuilderHelper::getAllBetween($content, 'JustTEXT:' . ':_("', '")'); + } // set language data foreach ($langStringTargets as $langStringTarget) { // need some special treatment here - if ($langStringTarget === 'Joomla' . '.JText._(' || $langStringTarget === 'JText:' . ':script(') + if ($langStringTarget === 'Joomla' . '.JText._(' || + $langStringTarget === 'JText:' . ':script(' || + $langStringTarget === 'JustTEXT:' . ':_(') { continue; } $langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . "'", "'"); $langCheck[] = ComponentbuilderHelper::getAllBetween($content, $langStringTarget . '"', '"'); } - $langArray = ComponentbuilderHelper::mergeArrays($langCheck); - if (ComponentbuilderHelper::checkArray($langArray)) //<-- not really needed hmmm + // the normal loading of the language strings + $langCheck = ComponentbuilderHelper::mergeArrays($langCheck); + if (ComponentbuilderHelper::checkArray($langCheck)) //<-- not really needed hmmm { - foreach ($langArray as $string) + foreach ($langCheck as $string) { - // this is there to insure we dont break already added Language strings - if (ComponentbuilderHelper::safeString($string, 'U') === $string) + if ($keyLang = $this->setLang($string)) { - continue; - } - // only load if string is not already set - $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U'); - if (!isset($this->langContent[$this->lang][$keyLang])) - { - $this->langContent[$this->lang][$keyLang] = trim($string); - } - // load the language targets - foreach ($langStringTargets as $langStringTarget) - { - $langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'"; - $langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"'; + // load the language targets + foreach ($langStringTargets as $langStringTarget) + { + $langHolders[$langStringTarget . "'" . $string . "'"] = $langStringTarget . "'" . $keyLang . "'"; + $langHolders[$langStringTarget . '"' . $string . '"'] = $langStringTarget . '"' . $keyLang . '"'; + } } } - // only continue if we have value to replace - if (isset($langHolders) && ComponentbuilderHelper::checkArray($langHolders)) + } + // the uppercase loading only (for arrays and other tricks) + if (ComponentbuilderHelper::checkArray($langOnly)) + { + $langOnly = ComponentbuilderHelper::mergeArrays($langOnly); + foreach ($langOnly as $string) { - $content = $this->setPlaceholders($content, $langHolders); + if ($keyLang = $this->setLang($string)) + { + // load the language targets + $langHolders["JustTEXT:" . ":_('" . $string . "')"] = "'" . $keyLang . "'"; + $langHolders['JustTEXT:' . ':_("' . $string . '")'] = '"' . $keyLang . '"'; + } } } + // only continue if we have value to replace + if (ComponentbuilderHelper::checkArray($langHolders)) + { + $content = $this->setPlaceholders($content, $langHolders); + } } return $content; } + /** + * Set the language String + * + * @param string $string The plan text string (English) + * + * @return string The key language string (all uppercase) + * + */ + public function setLang($string) + { + // this is there to insure we dont break already added Language strings + if (ComponentbuilderHelper::safeString($string, 'U') === $string) + { + return false; + } + // only load if string is not already set + $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U'); + if (!isset($this->langContent[$this->lang][$keyLang])) + { + $this->langContent[$this->lang][$keyLang] = trim($string); + } + return $keyLang; + } + /** * Set Data Selection of the dynamic get * diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 0f68c5299..5dd4a69ea 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -1369,6 +1369,8 @@ class Structure extends Get // set new file to object $versionData->move->static->$key_pointer = new stdClass(); $versionData->move->static->$key_pointer->naam = $custom['file']; + // update the dynamic component name placholders in file names + $custom['path'] = $this->setPlaceholders($custom['path'], $this->placeholders); // get the path info $pathInfo = pathinfo($custom['path']); if (isset($pathInfo['extension']) && $pathInfo['extension']) diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index e66668c15..a05338a62 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -755,8 +755,8 @@ class Fields extends Structure $XML = new simpleXMLElement(''); $fieldSetXML = $XML->addChild('fieldset'); $fieldSetXML->addAttribute('name', 'details'); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields."); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Default Fields."); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)"); // if id is not set if (!isset($this->fieldsNames[$view_name_single]['id'])) { @@ -770,7 +770,7 @@ class Fields extends Structure 'default' => 0 ); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -787,9 +787,9 @@ class Fields extends Structure 'filter' => 'user_utc' ); $attributes = array_merge($attributes, $readOnlyXML); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -803,9 +803,9 @@ class Fields extends Structure 'description' => $langView . '_CREATED_BY_DESC', ); $attributes = array_merge($attributes, $readOnlyXML); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -818,9 +818,9 @@ class Fields extends Structure 'label' => 'JSTATUS' ); $attributes = array_merge($attributes, $readOnlyXML); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value) @@ -844,9 +844,9 @@ class Fields extends Structure 'format' => '%Y-%m-%d %H:%M:%S', 'filter' => 'user_utc' ); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -862,9 +862,9 @@ class Fields extends Structure 'readonly' => 'true', 'filter' => 'unset' ); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -880,9 +880,9 @@ class Fields extends Structure 'required' => "false" ); $attributes = array_merge($attributes, $readOnlyXML); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -900,9 +900,9 @@ class Fields extends Structure 'required' => "false" ); $attributes = array_merge($attributes, $readOnlyXML); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -919,9 +919,9 @@ class Fields extends Structure 'readonly' => "true", 'filter' => 'unset' ); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } @@ -937,34 +937,34 @@ class Fields extends Structure 'rows' => 3, 'cols' => 30 ); - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; // metadesc $attributes['name'] = 'metadesc'; $attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL'; $attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC'; - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)"); $fieldXML = $fieldSetXML->addChild('field'); - $this->xmlAddAttributes($fieldXML, $attributes); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created $this->fieldCount++; } // load the dynamic fields now if (count($dynamicFieldsXML)) { - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields."); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields."); foreach ($dynamicFieldsXML as $dynamicfield) { - $this->xmlAppend($fieldSetXML, $dynamicfield); + ComponentbuilderHelper::xmlAppend($fieldSetXML, $dynamicfield); } } // check if metadata is added to this view if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) { - $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"); $fieldsXML = $fieldSetXML->addChild('fields'); $fieldsXML->addAttribute('name', 'metadata'); $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); @@ -972,7 +972,7 @@ class Fields extends Structure $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata'); $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); // robots - $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)"); + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)"); $robots = $fieldsFieldSetXML->addChild('field'); $attributes = array( 'name' => 'robots', @@ -980,7 +980,7 @@ class Fields extends Structure 'label' => 'JFIELD_METADATA_ROBOTS_LABEL', 'description' => 'JFIELD_METADATA_ROBOTS_DESC' ); - $this->xmlAddAttributes($robots, $attributes); + ComponentbuilderHelper::xmlAddAttributes($robots, $attributes); // count the static field created $this->fieldCount++; $options = array( @@ -997,7 +997,7 @@ class Fields extends Structure $option[] = $text; } // author - $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)"); + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)"); $author = $fieldsFieldSetXML->addChild('field'); $attributes = array( 'name' => 'author', @@ -1006,11 +1006,11 @@ class Fields extends Structure 'description' => 'JFIELD_METADATA_AUTHOR_DESC', 'size' => 20 ); - $this->xmlAddAttributes($author, $attributes); + ComponentbuilderHelper::xmlAddAttributes($author, $attributes); // count the static field created $this->fieldCount++; // rights - $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)"); + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)"); $rights = $fieldsFieldSetXML->addChild('field'); $attributes = array( 'name' => 'rights', @@ -1022,7 +1022,7 @@ class Fields extends Structure 'cols' => 30, 'rows' => 2 ); - $this->xmlAddAttributes($rights, $attributes); + ComponentbuilderHelper::xmlAddAttributes($rights, $attributes); // count the static field created $this->fieldCount++; } @@ -1581,7 +1581,7 @@ class Fields extends Structure } elseif ($property === 'option') { - $this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set."); + ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set."); if (strpos($value, ',') !== false) { // mulitpal options @@ -1644,7 +1644,7 @@ class Fields extends Structure } if (!$field->fieldXML->count()) { - $this->xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings."); + ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " No Manual Options Were Added In Field Settings."); } } elseif ($setType === 'plain') @@ -1733,12 +1733,12 @@ class Fields extends Structure if ($this->defaultField($r_typeName, 'option')) { // now add to the field set - $this->xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); } elseif ($this->defaultField($r_typeName, 'plain')) { // now add to the field set - $this->xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); } elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom'])) { @@ -1746,7 +1746,7 @@ class Fields extends Structure $custom = $r_fieldValues['custom']; unset($r_fieldValues['custom']); // now add to the field set - $this->xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); // set lang (just incase) $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); // add to lang array @@ -1794,7 +1794,7 @@ class Fields extends Structure 'name' => 'list_' . $fieldAttributes['name'] . '_modal', 'repeat' => 'true' ); - $this->xmlAddAttributes($form, $attributes); + ComponentbuilderHelper::xmlAddAttributes($form, $attributes); if (strpos($fieldAttributes['fields'], ',') !== false) { @@ -1830,12 +1830,12 @@ class Fields extends Structure if ($this->defaultField($r_typeName, 'option')) { // now add to the field set - $this->xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); } elseif ($this->defaultField($r_typeName, 'plain')) { // now add to the field set - $this->xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); } elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom'])) { @@ -1843,7 +1843,7 @@ class Fields extends Structure $custom = $r_fieldValues['custom']; unset($r_fieldValues['custom']); // now add to the field set - $this->xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); // set lang (just incase) $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); // add to lang array @@ -3030,78 +3030,6 @@ class Fields extends Structure return false; } - /** - * xmlComment - * - * @param SimpleXMLElement $xml The XML element reference in which to inject a comment - * @param string $comment The comment to inject - * - * @return null - * - */ - public function xmlComment(&$xml, $comment) - { - $domXML = dom_import_simplexml($xml); - $domComment = new DOMComment($comment); - $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); - $domXML->appendChild($nodeTarget); - $xml = simplexml_import_dom($domXML); - } - - /** - * xmlAddAttributes - * - * @param SimpleXMLElement $xml The XML element reference in which to inject a comment - * @param array $attributes The attributes to apply to the XML element - * - * @return null - * - */ - public function xmlAddAttributes(&$xml, $attributes = array()) - { - foreach ($attributes as $key => $value) - { - $xml->addAttribute($key, $value); - } - } - - /** - * xmlAppend - * - * @param SimpleXMLElement $xml The XML element reference in which to inject a comment - * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement - * - * @return null - * - */ - public function xmlAppend(&$xml, $node) - { - if (!$node) - { - // element was not returned - return; - } - switch (get_class($node)) - { - case 'stdClass': - if (property_exists($node, 'comment')) - { - $this->xmlComment($xml, $node->comment); - } - if (property_exists($node, 'fieldXML')) - { - $this->xmlAppend($xml, $node->fieldXML); - } - break; - case 'SimpleXMLElement': - $domXML = dom_import_simplexml($xml); - $domNode = dom_import_simplexml($node); - $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); - $xml = simplexml_import_dom($domXML); - break; - } - } - /** * xmlPrettyPrint * diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 2a66ca3bc..0a2f252d7 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1187,12 +1187,12 @@ abstract class ComponentbuilderHelper ); /** - * Get the snippet contributor details + * Get the snippet contributor details * - * @param string $filename The file name - * @param string $type The type of file + * @param string $filename The file name + * @param string $type The type of file * - * @return array On success the contributor details + * @return array On success the contributor details * */ public static function getContributorDetails($filename, $type = 'snippet') @@ -1245,11 +1245,11 @@ abstract class ComponentbuilderHelper } /** - * Get the library files + * Get the library files * - * @param int $id The library id to target + * @param int $id The library id to target * - * @return array On success the array of files that belong to this library + * @return array On success the array of files that belong to this library * */ public static function getLibraryFiles($id) @@ -1579,12 +1579,12 @@ abstract class ComponentbuilderHelper } /** - * The zipper method + * The zipper method * - * @param string $workingDIR The directory where the items must be zipped - * @param string $filepath The path to where the zip file must be placed + * @param string $workingDIR The directory where the items must be zipped + * @param string $filepath The path to where the zip file must be placed * - * @return bool true On success + * @return bool true On success * */ public static function zip($workingDIR, &$filepath) @@ -1630,13 +1630,13 @@ abstract class ComponentbuilderHelper /** - * Write a file to the server - * - * @param string $path The path and file name where to safe the data - * @param string $data The data to safe + * Write a file to the server + * + * @param string $path The path and file name where to safe the data + * @param string $data The data to safe + * + * @return bool true On success * - * @return bool true On success - * */ public static function writeFile($path, $data) { @@ -1792,13 +1792,13 @@ abstract class ComponentbuilderHelper } /** - * get between + * get between * - * @param string $content The content to search - * @param string $start The starting value - * @param string $end The ending value + * @param string $content The content to search + * @param string $start The starting value + * @param string $end The ending value * - * @return string On success / empty string on failure + * @return string On success / empty string on failure * */ public static function getBetween($content, $start, $end) @@ -1813,13 +1813,13 @@ abstract class ComponentbuilderHelper } /** - * get all between + * get all between * - * @param string $content The content to search - * @param string $start The starting value - * @param string $end The ending value + * @param string $content The content to search + * @param string $start The starting value + * @param string $end The ending value * - * @return array On success + * @return array On success * */ public static function getAllBetween($content, $start, $end) @@ -2037,17 +2037,17 @@ abstract class ComponentbuilderHelper } /** - * Get the file path or url - * - * @param string $type The (url/path) type to return - * @param string $target The Params Target name (if set) - * @param string $fileType The kind of filename to generate (if not set no file name is generated) - * @param string $key The key to adjust the filename (if not set ignored) - * @param string $default The default path if not set in Params (fallback path) - * @param bool $createIfNotSet The switch to create the folder if not found + * Get the file path or url + * + * @param string $type The (url/path) type to return + * @param string $target The Params Target name (if set) + * @param string $fileType The kind of filename to generate (if not set no file name is generated) + * @param string $key The key to adjust the filename (if not set ignored) + * @param string $default The default path if not set in Params (fallback path) + * @param bool $createIfNotSet The switch to create the folder if not found + * + * @return string On success the path or url is returned based on the type requested * - * @return string On success the path or url is returned based on the type requested - * */ public static function getFilePath($type = 'path', $target = 'filepath', $fileType = null, $key = '', $default = JPATH_SITE . '/images/', $createIfNotSet = true) { @@ -2149,13 +2149,13 @@ abstract class ComponentbuilderHelper /** - * get the content of a file - * - * @param string $path The path to the file - * @param string/bool $none The return value if no content was found + * get the content of a file + * + * @param string $path The path to the file + * @param string/bool $none The return value if no content was found + * + * @return string On success * - * @return string On success - * */ public static function getFileContents($path, $none = '') { @@ -3183,6 +3183,19 @@ abstract class ComponentbuilderHelper return false; } + /** + * Get a Variable + * + * @param string $table The table from which to get the variable + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * + * @return mix string/int/float + * + */ public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder') { if(!$where) @@ -3223,6 +3236,20 @@ abstract class ComponentbuilderHelper return false; } + /** + * Get array of variables + * + * @param string $table The table from which to get the variables + * @param string $where The value where + * @param string $whereString The target/field string where/name + * @param string $what The return field + * @param string $operator The operator between $whereString/field and $where/value + * @param string $main The component in which the table is found + * @param bool $unique The switch to return a unique array + * + * @return array + * + */ public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true) { if(!$where) @@ -3691,28 +3718,141 @@ abstract class ComponentbuilderHelper return JAccess::getAssetRules(0); } + /** + * xmlAppend + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement + * + * @return null + * + */ + public static function xmlAppend(&$xml, $node) + { + if (!$node) + { + // element was not returned + return; + } + switch (get_class($node)) + { + case 'stdClass': + if (property_exists($node, 'comment')) + { + self::xmlComment($xml, $node->comment); + } + if (property_exists($node, 'fieldXML')) + { + self::xmlAppend($xml, $node->fieldXML); + } + break; + case 'SimpleXMLElement': + $domXML = dom_import_simplexml($xml); + $domNode = dom_import_simplexml($node); + $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); + $xml = simplexml_import_dom($domXML); + break; + } + } + + /** + * xmlComment + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param string $comment The comment to inject + * + * @return null + * + */ + public static function xmlComment(&$xml, $comment) + { + $domXML = dom_import_simplexml($xml); + $domComment = new DOMComment($comment); + $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); + $domXML->appendChild($nodeTarget); + $xml = simplexml_import_dom($domXML); + } + + /** + * xmlAddAttributes + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $attributes The attributes to apply to the XML element + * + * @return null + * + */ + public static function xmlAddAttributes(&$xml, $attributes = array()) + { + foreach ($attributes as $key => $value) + { + $xml->addAttribute($key, $value); + } + } + + /** + * xmlAddOptions + * + * @param SimpleXMLElement $xml The XML element reference in which to inject a comment + * @param array $options The options to apply to the XML element + * + * @return void + * + */ + public static function xmlAddOptions(&$xml, $options = array()) + { + foreach ($options as $key => $value) + { + $addOption = $xml->addChild('option'); + $addOption->addAttribute('value', $key); + $addOption[] = $value; + } + } + + /** + * Render Bool Button + * + * @param array $args All the args for the button + * 0) name + * 1) additional (options class) // not used at this time + * 2) default + * 3) yes (name) + * 4) no (name) + * + * @return string The input html of the button + * + */ public static function renderBoolButton() { $args = func_get_args(); + // check if there is additional button class + $additional = isset($args[1]) ? (string) $args[1] : ''; // not used at this time + // start the xml + $buttonXML = new SimpleXMLElement(''); + // button attributes + $buttonAttributes = array( + 'type' => 'radio', + 'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button', + 'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway + 'class' => 'btn-group', + 'filter' => 'INT', + 'default' => isset($args[2]) ? (int) $args[2] : 0); + // load the haskey attributes + self::xmlAddAttributes($buttonXML, $buttonAttributes); + // set the button options + $buttonOptions = array( + '1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES', + '0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'); + // load the button options + self::xmlAddOptions($buttonXML, $buttonOptions); // get the radio element $button = JFormHelper::loadFieldType('radio'); - // setup the properties - $name = self::htmlEscape($args[0]); - $additional = isset($args[1]) ? (string) $args[1] : ''; - $value = $args[2]; - $yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES'; - $no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'; - - // prepare the xml - $element = new SimpleXMLElement(''); - // run - $button->setup($element, $value); + $button->setup($buttonXML, $buttonAttributes['default']); return $button->input; - } /** diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 24bcd70fc..fd348ca7c 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -9,8 +9,9 @@ COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" +COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here" COM_COMPONENTBUILDER_ADD_MENU="Add Menu" -COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT="Add to Backup Folder & Sales Server <small>(if set)</small>" +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_ADMINS_FIELDS="Admins Fields" COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access" @@ -3229,7 +3230,7 @@ COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DETAILS="Details" COM_COMPONENTBUILDER_DIVERGED="Diverged" COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local snippet (with the same name, library and type) has a diverged from the community snippet (with the same name, library and type) in that it does not have the same creation or modified date." -COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install" +COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install." COM_COMPONENTBUILDER_DOWNLOAD="download" COM_COMPONENTBUILDER_DO_NOT_ADD="Do not add" COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get" @@ -5350,6 +5351,7 @@ COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views" 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_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!" @@ -5370,7 +5372,6 @@ COM_COMPONENTBUILDER_PROPERTY="Property" COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access" COM_COMPONENTBUILDER_PUBLISHED="Published" COM_COMPONENTBUILDER_PUBLISHING="Publishing" -COM_COMPONENTBUILDER_QUIET="Quiet" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_RELEASED_THIS="released this" COM_COMPONENTBUILDER_RENAME="Rename" @@ -5387,9 +5388,9 @@ COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved." COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another." 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_SEARCHABLE="Searchable" +COM_COMPONENTBUILDER_SEE_ALL_IMPORT_INFO="See All Import Info" COM_COMPONENTBUILDER_SELECT_AN_OPTION="Select an option" COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet" -COM_COMPONENTBUILDER_SELECT_IF_THE_IMPORT_SHOULD_BE_SHOWING_MORE_ELABORATE_OR_LESS_QUIET_INFORMATION_DURING_IMPORT="Select if the import should be showing more (elaborate) or less (quiet) information during import." COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile" COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import." COM_COMPONENTBUILDER_SELECT_THE_PACKAGE_TO_IMPORT="Select the package to import" @@ -5544,6 +5545,7 @@ COM_COMPONENTBUILDER_SHARE_SNIPPETS="Share Snippets" COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_REPOSITORY_FOLDER="Should the component be moved to your local repository folder?" COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set." +COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import." COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported." COM_COMPONENTBUILDER_SHOW="Show" 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." diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index 136769215..82d172814 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -105,8 +105,7 @@ layout="joomla.form.field.subform.repeatable-table" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION" - icon="list" - maximum="800"> + icon="list">