diff --git a/README.md b/README.md
index 470aee746..b89f98f4e 100644
--- a/README.md
+++ b/README.md
@@ -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*: 11th March, 2018
++ *Last Build*: 18th March, 2018
+ *Version*: 2.6.18
+ *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*: **183732**
-+ *Field count*: **1651**
++ *Line count*: **186136**
++ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
diff --git a/admin/README.txt b/admin/README.txt
index 470aee746..b89f98f4e 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -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*: 11th March, 2018
++ *Last Build*: 18th March, 2018
+ *Version*: 2.6.18
+ *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*: **183732**
-+ *Field count*: **1651**
++ *Line count*: **186136**
++ *Field count*: **994**
+ *File count*: **1171**
+ *Folder count*: **189**
diff --git a/admin/config.xml b/admin/config.xml
index c373eab98..0f2763316 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -47,78 +47,113 @@
/>
-
-
-
- COM_COMPONENTBUILDER_CONFIG_YES
- COM_COMPONENTBUILDER_CONFIG_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CONFIG_ACTIVE
- COM_COMPONENTBUILDER_CONFIG_INACTIVE
-
-
-
-
- COM_COMPONENTBUILDER_CONFIG_EVERY_SESSION
- COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS
- COM_COMPONENTBUILDER_CONFIG_EVERY_MINUTE
- COM_COMPONENTBUILDER_CONFIG_EVERY_FIVE_MINUTES
- COM_COMPONENTBUILDER_CONFIG_EVERY_FIFTEEN_MINUTES
- COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_MINUTES
- COM_COMPONENTBUILDER_CONFIG_EVERY_HOUR
- COM_COMPONENTBUILDER_CONFIG_EVERY_FIVE_HOURS
- COM_COMPONENTBUILDER_CONFIG_EVERY_TEN_HOURS
- COM_COMPONENTBUILDER_CONFIG_EVERY_DAY
- COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK
- COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE
-
-
-
+
+
+
+
+ COM_COMPONENTBUILDER_CONFIG_YES
+
+ COM_COMPONENTBUILDER_CONFIG_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION
+
+ COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CONFIG_ACTIVE
+
+ COM_COMPONENTBUILDER_CONFIG_INACTIVE
+
+
+
+
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_SESSION
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_SECONDS
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_MINUTE
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_FIVE_MINUTES
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_FIFTEEN_MINUTES
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_THIRTY_MINUTES
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_HOUR
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_FIVE_HOURS
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_TEN_HOURS
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_DAY
+
+ COM_COMPONENTBUILDER_CONFIG_EVERY_WEEK
+
+ COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE
+
+
+
-
-
-
-
-
- COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER
- COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER
+
+ COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
tidy = extension_loaded('Tidy');
// Set the params
$this->params = JComponentHelper::getParams('com_componentbuilder');
+ // set the field type builder
+ $this->fieldBuilderType = $this->params->get('compiler_field_builder_type', 2);
+ // check the field builder type logic
+ if (!$this->tidy && $this->fieldBuilderType == 2)
+ {
+ // we do not have the tidy extention set fall back to StringManipulation
+ $this->fieldBuilderType = 1;
+ // load the sugestion to use string manipulation
+ $this->app->enqueueMessage(JText::_('Since you do not have Tidy extentsion setup on your system, we could not use the SimpleXMLElement class. We instead used string manipulation to build all your fields, this is a faster method, you must inspect the xml files in your component package to see if you are satisfied with the result. You can make this method your default by opening the global options of JCB and under the Global tab set the Field Builder Type to string manipulation. '), 'Notice');
+ }
// load the compiler path
$this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
// set the component ID
diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php
index 7a731a8f6..c95d29c42 100644
--- a/admin/helpers/compiler/c_Fields.php
+++ b/admin/helpers/compiler/c_Fields.php
@@ -375,15 +375,15 @@ class Fields extends Structure
/**
* set the Field set of a view
*
- * @param array $view The view data
- * @param string $component The component name
- * @param string $viewName The single view name
- * @param string $listViewName The list view name
+ * @param array $view The view data
+ * @param string $component The component name
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
*
* @return string The fields set in xml
*
*/
- public function setFieldSet($view, $component, $viewName, $listViewName)
+ public function setFieldSet($view, $component, $view_name_single, $view_name_list)
{
// setup the fieldset of this view
if (isset($view['settings']->fields) && ComponentbuilderHelper::checkArray($view['settings']->fields))
@@ -391,19 +391,12 @@ class Fields extends Structure
// add metadata to the view
if (isset($view['metadata']) && $view['metadata'])
{
- $this->metadataBuilder[$viewName] = $viewName;
+ $this->metadataBuilder[$view_name_single] = $view_name_single;
}
// add access to the view
if (isset($view['access']) && $view['access'])
{
- $this->accessBuilder[$viewName] = $viewName;
- }
- // set the read only
- $readOnlyXML = array();
- if ($view['settings']->type == 2)
- {
- $readOnlyXML['readonly'] = true;
- $readOnlyXML['disabled'] = true;
+ $this->accessBuilder[$view_name_single] = $view_name_single;
}
// main lang prefix
$langView = $this->langPrefix . '_' . $this->placeholders['###VIEW###'];
@@ -411,8 +404,6 @@ class Fields extends Structure
// set default lang
$this->langContent[$this->lang][$langView] = $view['settings']->name_single;
$this->langContent[$this->lang][$langViews] = $view['settings']->name_list;
- // set the single name
- $viewSingleName = ComponentbuilderHelper::safeString($view['settings']->name_single, 'W');
// set global item strings
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED'] = "%s " . $view['settings']->name_list . " archived.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED_1'] = "%s " . $view['settings']->name_single . " archived.";
@@ -447,296 +438,598 @@ class Fields extends Structure
$this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision";
$this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised.";
$this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.";
- // start adding dynamc fields
- $dynamicFieldsXML = array();
- // set the custom table key
- $dbkey = 'g';
- // TODO we should add the global and local view switch if field for front end
- foreach ($view['settings']->fields as $field)
+ // check what type of field builder to use
+ if ($this->fieldBuilderType == 1)
{
- $dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $viewName, $listViewName, $this->placeholders, $dbkey, true);
+ // build field set using string manipulation
+ return $this->stringFieldSet($view, $component, $view_name_single, $view_name_list, $langView, $langViews);
}
- // set the default fields
- $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)");
- // if id is not set
- if (!isset($this->fieldsNames[$viewName]['id']))
+ else
{
- $attributes = array(
- 'name' => 'id',
- 'type' => 'text',
- 'class' => 'readonly',
- 'label' => 'JGLOBAL_FIELD_ID_LABEL',
- 'description' => 'JGLOBAL_FIELD_ID_DESC',
- 'size' => 10,
- 'default' => 0
- );
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
+ // build field set with simpleXMLElement class
+ return $this->simpleXMLFieldSet($view, $component, $view_name_single, $view_name_list, $langView, $langViews);
}
- // if created is not set
- if (!isset($this->fieldsNames[$viewName]['created']))
- {
- $attributes = array(
- 'name' => 'created',
- 'type' => 'calendar',
- 'label' => $langView . '_CREATED_DATE_LABEL',
- 'description' => $langView . '_CREATED_DATE_DESC',
- 'size' => 22,
- 'format' => '%Y-%m-%d %H:%M:%S',
- 'filter' => 'user_utc'
- );
- $attributes = array_merge($attributes, $readOnlyXML);
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // if created_by is not set
- if (!isset($this->fieldsNames[$viewName]['created_by']))
- {
- $attributes = array(
- 'name' => 'created_by',
- 'type' => 'user',
- 'label' => $langView . '_CREATED_BY_LABEL',
- 'description' => $langView . '_CREATED_BY_DESC',
- );
- $attributes = array_merge($attributes, $readOnlyXML);
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // if published is not set
- if (!isset($this->fieldsNames[$viewName]['published']))
- {
- $attributes = array(
- 'name' => 'published',
- 'type' => 'list',
- 'label' => 'JSTATUS'
- );
- $attributes = array_merge($attributes, $readOnlyXML);
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value)
- {
- $optionXML = $fieldXML->addChild('option');
- $optionXML->addAttribute('value', $value);
- $optionXML[] = $text;
- }
- }
- // if modified is not set
- if (!isset($this->fieldsNames[$viewName]['modified']))
- {
- $attributes = array(
- 'name' => 'modified',
- 'type' => 'calendar',
- 'class' => 'readonly',
- 'label' => $langView . '_MODIFIED_DATE_LABEL',
- 'description' => $langView . '_MODIFIED_DATE_DESC',
- 'size' => 22,
- 'readonly' => "true",
- 'format' => '%Y-%m-%d %H:%M:%S',
- 'filter' => 'user_utc'
- );
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // if modified_by is not set
- if (!isset($this->fieldsNames[$viewName]['modified_by']))
- {
- $attributes = array(
- 'name' => 'modified_by',
- 'type' => 'user',
- 'label' => $langView . '_MODIFIED_BY_LABEL',
- 'description' => $langView . '_MODIFIED_BY_DESC',
- 'class' => 'readonly',
- 'readonly' => 'true',
- 'filter' => 'unset'
- );
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // check if view has access
- if (isset($this->accessBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName]) && !isset($this->fieldsNames[$viewName]['access']))
- {
- $attributes = array(
- 'name' => 'access',
- 'type' => 'accesslevel',
- 'label' => 'JFIELD_ACCESS_LABEL',
- 'description' => 'JFIELD_ACCESS_DESC',
- 'default' => 1,
- 'required' => "false"
- );
- $attributes = array_merge($attributes, $readOnlyXML);
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // if ordering is not set
- if (!isset($this->fieldsNames[$viewName]['ordering']))
- {
- $attributes = array(
- 'name' => 'ordering',
- 'type' => 'number',
- 'class' => 'inputbox validate-ordering',
- 'label' => $langView . '_ORDERING_LABEL',
- 'description' => '',
- 'default' => 0,
- 'size' => 6,
- 'required' => "false"
- );
- $attributes = array_merge($attributes, $readOnlyXML);
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // if version is not set
- if (!isset($this->fieldsNames[$viewName]['version']))
- {
- $attributes = array(
- 'name' => 'version',
- 'type' => 'text',
- 'class' => 'readonly',
- 'label' => $langView . '_VERSION_LABEL',
- 'description' => $langView . '_VERSION_DESC',
- 'size' => 6,
- 'readonly' => "true",
- 'filter' => 'unset'
- );
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->xmlAddAttributes($fieldXML, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // check if metadata is added to this view
- if (isset($this->metadataBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName]))
- {
- // metakey
- $attributes = array(
- 'name' => 'metakey',
- 'type' => 'textarea',
- 'label' => 'JFIELD_META_KEYWORDS_LABEL',
- 'description' => 'JFIELD_META_KEYWORDS_DESC',
- 'rows' => 3,
- 'cols' => 30
- );
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->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)");
- $fieldXML = $fieldSetXML->addChild('field');
- $this->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.");
- foreach ($dynamicFieldsXML as $dynamicfield)
- {
- $this->xmlAppend($fieldSetXML, $dynamicfield);
- }
- }
- // check if metadata is added to this view
- if (isset($this->metadataBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName]))
- {
- $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields");
- $fieldsXML = $fieldSetXML->addChild('fields');
- $fieldsXML->addAttribute('name', 'metadata');
- $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
- $fieldsFieldSetXML = $fieldsXML->addChild('fieldset');
- $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata');
- $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
- // robots
- $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
- $robots = $fieldsFieldSetXML->addChild('field');
- $attributes = array(
- 'name' => 'robots',
- 'type' => 'list',
- 'label' => 'JFIELD_METADATA_ROBOTS_LABEL',
- 'description' => 'JFIELD_METADATA_ROBOTS_DESC'
- );
- $this->xmlAddAttributes($robots, $attributes);
- // count the static field created
- $this->fieldCount++;
- $options = array(
- 'JGLOBAL_USE_GLOBAL' => '',
- 'JGLOBAL_INDEX_FOLLOW' => 'index, follow',
- 'JGLOBAL_NOINDEX_FOLLOW' => 'noindex, follow',
- 'JGLOBAL_INDEX_NOFOLLOW' => 'index, nofollow',
- 'JGLOBAL_NOINDEX_NOFOLLOW' => 'noindex, nofollow',
- );
- foreach ($options as $text => $value)
- {
- $option = $robots->addChild('option');
- $option->addAttribute('value', $value);
- $option[] = $text;
- }
- // author
- $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
- $author = $fieldsFieldSetXML->addChild('field');
- $attributes = array(
- 'name' => 'author',
- 'type' => 'text',
- 'label' => 'JAUTHOR',
- 'description' => 'JFIELD_METADATA_AUTHOR_DESC',
- 'size' => 20
- );
- $this->xmlAddAttributes($author, $attributes);
- // count the static field created
- $this->fieldCount++;
- // rights
- $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
- $rights = $fieldsFieldSetXML->addChild('field');
- $attributes = array(
- 'name' => 'rights',
- 'type' => 'textarea',
- 'label' => 'JFIELD_META_RIGHTS_LABEL',
- 'description' => 'JFIELD_META_RIGHTS_DESC',
- 'required' => 'false',
- 'filter' => 'string',
- 'cols' => 30,
- 'rows' => 2
- );
- $this->xmlAddAttributes($rights, $attributes);
- // count the static field created
- $this->fieldCount++;
- }
- // return the set
- return $this->xmlPrettyPrint($XML, 'fieldset');
}
return '';
}
+ /**
+ * build field set using string manipulation
+ *
+ * @param array $view The view data
+ * @param string $component The component name
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param string $langView The language string of the view
+ * @param string $langViews The language string of the views
+ *
+ * @return string The fields set in xml
+ *
+ */
+ protected function stringFieldSet($view, $component, $view_name_single, $view_name_list, $langView, $langViews)
+ {
+ // set the read only
+ $readOnly = false;
+ if ($view['settings']->type == 2)
+ {
+ $readOnly = "\t\t\t" . 'readonly="true"' . PHP_EOL . "\t\t\t" . 'disabled="true"';
+ }
+ // start adding dynamc fields
+ $dynamicFields = '';
+ // set the custom table key
+ $dbkey = 'g';
+ // TODO we should add the global and local view switch if field for front end
+ foreach ($view['settings']->fields as $field)
+ {
+ $dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
+ }
+ // set the default fields
+ $fieldSet = array();
+ $fieldSet[] = '';
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t";
+ // if id is not set
+ if (!isset($this->fieldsNames[$view_name_single]['id']))
+ {
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if created is not set
+ if (!isset($this->fieldsNames[$view_name_single]['created']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if created_by is not set
+ if (!isset($this->fieldsNames[$view_name_single]['created_by']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if published is not set
+ if (!isset($this->fieldsNames[$view_name_single]['published']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t';
+ $fieldSet[] = "\t\t\t';
+ $fieldSet[] = "\t\t\t\tJPUBLISHED ";
+ $fieldSet[] = "\t\t\t';
+ $fieldSet[] = "\t\t\t\tJUNPUBLISHED ";
+ $fieldSet[] = "\t\t\t';
+ $fieldSet[] = "\t\t\t\tJARCHIVED ";
+ $fieldSet[] = "\t\t\t';
+ $fieldSet[] = "\t\t\t\tJTRASHED ";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if modified is not set
+ if (!isset($this->fieldsNames[$view_name_single]['modified']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t" . ' ';
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if modified_by is not set
+ if (!isset($this->fieldsNames[$view_name_single]['modified_by']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t" . ' ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // check if view has access
+ if (isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single]) && !isset($this->fieldsNames[$view_name_single]['access']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t" . ' ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if ordering is not set
+ if (!isset($this->fieldsNames[$view_name_single]['ordering']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if version is not set
+ if (!isset($this->fieldsNames[$view_name_single]['version']))
+ {
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // check if metadata is added to this view
+ if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
+ {
+ // metakey
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ // metadesc
+ $fieldSet[] = "\t\t";
+ $fieldSet[] = "\t\t ";
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // load the dynamic fields now
+ if (ComponentbuilderHelper::checkString($dynamicFields))
+ {
+ $fieldSet[] = "\t\t" . $dynamicFields;
+ }
+ // close fieldset
+ $fieldSet[] = "\t ";
+ // check if metadata is added to this view
+ if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
+ {
+ $fieldSet[] = PHP_EOL . "\t";
+ $fieldSet[] = "\t';
+ $fieldSet[] = "\t\t" . '';
+ // robots
+ $fieldSet[] = "\t\t\t";
+ $fieldSet[] = "\t\t\t" . '';
+ $fieldSet[] = "\t\t\t\t" . 'JGLOBAL_USE_GLOBAL ';
+ $fieldSet[] = "\t\t\t\t" . 'JGLOBAL_INDEX_FOLLOW ';
+ $fieldSet[] = "\t\t\t\t" . 'JGLOBAL_NOINDEX_FOLLOW ';
+ $fieldSet[] = "\t\t\t\t" . 'JGLOBAL_INDEX_NOFOLLOW ';
+ $fieldSet[] = "\t\t\t\t" . 'JGLOBAL_NOINDEX_NOFOLLOW ';
+ $fieldSet[] = "\t\t\t" . ' ';
+ // count the static field created
+ $this->fieldCount++;
+ // author
+ $fieldSet[] = "\t\t\t";
+ $fieldSet[] = "\t\t\t" . ' ";
+ // count the static field created
+ $this->fieldCount++;
+ // rights
+ $fieldSet[] = "\t\t\t";
+ $fieldSet[] = "\t\t\t" . ' ";
+ // count the static field created
+ $this->fieldCount++;
+ $fieldSet[] = "\t\t ";
+ $fieldSet[] = "\t ";
+ }
+ // retunr the set
+ return implode(PHP_EOL, $fieldSet);
+ }
+
+ /**
+ * build field set with simpleXMLElement class
+ *
+ * @param array $view The view data
+ * @param string $component The component name
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param string $langView The language string of the view
+ * @param string $langViews The language string of the views
+ *
+ * @return string The fields set in xml
+ *
+ */
+ protected function simpleXMLFieldSet($view, $component, $view_name_single, $view_name_list, $langView, $langViews)
+ {
+ // set the read only
+ $readOnlyXML = array();
+ if ($view['settings']->type == 2)
+ {
+ $readOnlyXML['readonly'] = true;
+ $readOnlyXML['disabled'] = true;
+ }
+ // start adding dynamc fields
+ $dynamicFieldsXML = array();
+ // set the custom table key
+ $dbkey = 'g';
+ // TODO we should add the global and local view switch if field for front end
+ foreach ($view['settings']->fields as $field)
+ {
+ $dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
+ }
+ // set the default fields
+ $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)");
+ // if id is not set
+ if (!isset($this->fieldsNames[$view_name_single]['id']))
+ {
+ $attributes = array(
+ 'name' => 'id',
+ 'type' => 'text',
+ 'class' => 'readonly',
+ 'label' => 'JGLOBAL_FIELD_ID_LABEL',
+ 'description' => 'JGLOBAL_FIELD_ID_DESC',
+ 'size' => 10,
+ 'default' => 0
+ );
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if created is not set
+ if (!isset($this->fieldsNames[$view_name_single]['created']))
+ {
+ $attributes = array(
+ 'name' => 'created',
+ 'type' => 'calendar',
+ 'label' => $langView . '_CREATED_DATE_LABEL',
+ 'description' => $langView . '_CREATED_DATE_DESC',
+ 'size' => 22,
+ 'format' => '%Y-%m-%d %H:%M:%S',
+ 'filter' => 'user_utc'
+ );
+ $attributes = array_merge($attributes, $readOnlyXML);
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Created Field. Type: Calendar (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if created_by is not set
+ if (!isset($this->fieldsNames[$view_name_single]['created_by']))
+ {
+ $attributes = array(
+ 'name' => 'created_by',
+ 'type' => 'user',
+ 'label' => $langView . '_CREATED_BY_LABEL',
+ 'description' => $langView . '_CREATED_BY_DESC',
+ );
+ $attributes = array_merge($attributes, $readOnlyXML);
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Created Field. Type: User (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if published is not set
+ if (!isset($this->fieldsNames[$view_name_single]['published']))
+ {
+ $attributes = array(
+ 'name' => 'published',
+ 'type' => 'list',
+ 'label' => 'JSTATUS'
+ );
+ $attributes = array_merge($attributes, $readOnlyXML);
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Published Field. Type: List (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ foreach (array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value)
+ {
+ $optionXML = $fieldXML->addChild('option');
+ $optionXML->addAttribute('value', $value);
+ $optionXML[] = $text;
+ }
+ }
+ // if modified is not set
+ if (!isset($this->fieldsNames[$view_name_single]['modified']))
+ {
+ $attributes = array(
+ 'name' => 'modified',
+ 'type' => 'calendar',
+ 'class' => 'readonly',
+ 'label' => $langView . '_MODIFIED_DATE_LABEL',
+ 'description' => $langView . '_MODIFIED_DATE_DESC',
+ 'size' => 22,
+ 'readonly' => "true",
+ 'format' => '%Y-%m-%d %H:%M:%S',
+ 'filter' => 'user_utc'
+ );
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Date Modified Field. Type: Calendar (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if modified_by is not set
+ if (!isset($this->fieldsNames[$view_name_single]['modified_by']))
+ {
+ $attributes = array(
+ 'name' => 'modified_by',
+ 'type' => 'user',
+ 'label' => $langView . '_MODIFIED_BY_LABEL',
+ 'description' => $langView . '_MODIFIED_BY_DESC',
+ 'class' => 'readonly',
+ 'readonly' => 'true',
+ 'filter' => 'unset'
+ );
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " User Modified Field. Type: User (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // check if view has access
+ if (isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single]) && !isset($this->fieldsNames[$view_name_single]['access']))
+ {
+ $attributes = array(
+ 'name' => 'access',
+ 'type' => 'accesslevel',
+ 'label' => 'JFIELD_ACCESS_LABEL',
+ 'description' => 'JFIELD_ACCESS_DESC',
+ 'default' => 1,
+ 'required' => "false"
+ );
+ $attributes = array_merge($attributes, $readOnlyXML);
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Access Field. Type: Accesslevel (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if ordering is not set
+ if (!isset($this->fieldsNames[$view_name_single]['ordering']))
+ {
+ $attributes = array(
+ 'name' => 'ordering',
+ 'type' => 'number',
+ 'class' => 'inputbox validate-ordering',
+ 'label' => $langView . '_ORDERING_LABEL',
+ 'description' => '',
+ 'default' => 0,
+ 'size' => 6,
+ 'required' => "false"
+ );
+ $attributes = array_merge($attributes, $readOnlyXML);
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Ordering Field. Type: Numbers (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // if version is not set
+ if (!isset($this->fieldsNames[$view_name_single]['version']))
+ {
+ $attributes = array(
+ 'name' => 'version',
+ 'type' => 'text',
+ 'class' => 'readonly',
+ 'label' => $langView . '_VERSION_LABEL',
+ 'description' => $langView . '_VERSION_DESC',
+ 'size' => 6,
+ 'readonly' => "true",
+ 'filter' => 'unset'
+ );
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->xmlAddAttributes($fieldXML, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // check if metadata is added to this view
+ if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single]))
+ {
+ // metakey
+ $attributes = array(
+ 'name' => 'metakey',
+ 'type' => 'textarea',
+ 'label' => 'JFIELD_META_KEYWORDS_LABEL',
+ 'description' => 'JFIELD_META_KEYWORDS_DESC',
+ 'rows' => 3,
+ 'cols' => 30
+ );
+ $this->xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->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)");
+ $fieldXML = $fieldSetXML->addChild('field');
+ $this->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.");
+ foreach ($dynamicFieldsXML as $dynamicfield)
+ {
+ $this->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");
+ $fieldsXML = $fieldSetXML->addChild('fields');
+ $fieldsXML->addAttribute('name', 'metadata');
+ $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
+ $fieldsFieldSetXML = $fieldsXML->addChild('fieldset');
+ $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata');
+ $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS');
+ // robots
+ $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)");
+ $robots = $fieldsFieldSetXML->addChild('field');
+ $attributes = array(
+ 'name' => 'robots',
+ 'type' => 'list',
+ 'label' => 'JFIELD_METADATA_ROBOTS_LABEL',
+ 'description' => 'JFIELD_METADATA_ROBOTS_DESC'
+ );
+ $this->xmlAddAttributes($robots, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ $options = array(
+ 'JGLOBAL_USE_GLOBAL' => '',
+ 'JGLOBAL_INDEX_FOLLOW' => 'index, follow',
+ 'JGLOBAL_NOINDEX_FOLLOW' => 'noindex, follow',
+ 'JGLOBAL_INDEX_NOFOLLOW' => 'index, nofollow',
+ 'JGLOBAL_NOINDEX_NOFOLLOW' => 'noindex, nofollow',
+ );
+ foreach ($options as $text => $value)
+ {
+ $option = $robots->addChild('option');
+ $option->addAttribute('value', $value);
+ $option[] = $text;
+ }
+ // author
+ $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)");
+ $author = $fieldsFieldSetXML->addChild('field');
+ $attributes = array(
+ 'name' => 'author',
+ 'type' => 'text',
+ 'label' => 'JAUTHOR',
+ 'description' => 'JFIELD_METADATA_AUTHOR_DESC',
+ 'size' => 20
+ );
+ $this->xmlAddAttributes($author, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ // rights
+ $this->xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)");
+ $rights = $fieldsFieldSetXML->addChild('field');
+ $attributes = array(
+ 'name' => 'rights',
+ 'type' => 'textarea',
+ 'label' => 'JFIELD_META_RIGHTS_LABEL',
+ 'description' => 'JFIELD_META_RIGHTS_DESC',
+ 'required' => 'false',
+ 'filter' => 'string',
+ 'cols' => 30,
+ 'rows' => 2
+ );
+ $this->xmlAddAttributes($rights, $attributes);
+ // count the static field created
+ $this->fieldCount++;
+ }
+ // return the set
+ return $this->xmlPrettyPrint($XML, 'fieldset');
+ }
+
/**
* set Field Names
*
@@ -753,48 +1046,60 @@ class Fields extends Structure
/**
* set Dynamic field
*
- * @param array $field The field data
- * @param array $view The view data
- * @param int $viewType The view type
- * @param string $langView The language string of the view
- * @param string $viewName The singel view name
- * @param string $listViewName The list view name
- * @param array $placeholders The place holder and replace values
- * @param string $dbkey The the custom table key
- * @param boolean $build The switch to set the build option
+ * @param array $field The field data
+ * @param array $view The view data
+ * @param int $viewType The view type
+ * @param string $langView The language string of the view
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param array $placeholders The place holder and replace values
+ * @param string $dbkey The the custom table key
+ * @param boolean $build The switch to set the build option
*
* @return SimpleXMLElement The complete field in xml
*
*/
- public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$viewName, &$listViewName, &$placeholders, &$dbkey, $build)
+ public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$view_name_single, &$view_name_list, &$placeholders, &$dbkey, $build)
{
+ // set default return
+ if ($this->fieldBuilderType == 1)
+ {
+ // string manipulation
+ $dynamicField = '';
+ }
+ else
+ {
+ // simpleXMLElement class
+ $dynamicField = false;
+ }
+ // make sure we have settings
if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings']))
{
// reset some values
- $name = $this->getFieldName($field, $listViewName);
+ $name = $this->getFieldName($field, $view_name_list);
$typeName = $this->getFieldType($field);
$multiple = false;
$langLabel = '';
$fieldSet = '';
$fieldAttributes = array();
// set field attributes
- $fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $listViewName, $viewName, $placeholders);
+ $fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $view_name_list, $view_name_single, $placeholders);
// check if values were set
if (ComponentbuilderHelper::checkArray($fieldAttributes))
{
// set the array of field names
- $this->setFieldsNames($viewName, $fieldAttributes['name']);
+ $this->setFieldsNames($view_name_single, $fieldAttributes['name']);
if ($this->defaultField($typeName, 'option'))
{
//reset options array
$optionArray = array();
// now add to the field set
- $xmlElement = $this->setField('option', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
+ $dynamicField = $this->setField('option', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
if ($build)
{
// set builders
- $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false, $optionArray);
+ $this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
}
elseif ($this->defaultField($typeName, 'plain'))
@@ -802,10 +1107,10 @@ class Fields extends Structure
if ($build)
{
// set builders
- $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple);
+ $this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
- $xmlElement = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
+ $dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif ($this->defaultField($typeName, 'spacer'))
{
@@ -822,10 +1127,10 @@ class Fields extends Structure
// set to publishing tab
$tabName = 'publishing';
}
- $this->setLayoutBuilder($viewName, $tabName, $name, $field);
+ $this->setLayoutBuilder($view_name_single, $tabName, $name, $field);
}
// now add to the field set
- $xmlElement = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
+ $dynamicField = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif ($this->defaultField($typeName, 'special'))
{
@@ -835,10 +1140,10 @@ class Fields extends Structure
if ($build)
{
// set builders
- $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false);
+ $this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, false);
}
// now add to the field set
- $xmlElement = $this->setField('special', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
+ $dynamicField = $this->setField('special', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
}
elseif (ComponentbuilderHelper::checkArray($fieldAttributes['custom']))
@@ -853,35 +1158,413 @@ class Fields extends Structure
if ($build)
{
// set builders
- $this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom);
+ $this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, $custom);
}
// now add to the field set
- $xmlElement = $this->setField('custom', $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray, $custom);
+ $dynamicField = $this->setField('custom', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray, $custom);
}
}
- return $xmlElement;
}
- return false;
+ return $dynamicField;
}
/**
* set a field
*
- * @param string $setType The set of fields type
- * @param array $fieldAttributes The field values
- * @param string $name The field name
- * @param string $typeName The field type
- * @param string $langView The language string of the view
- * @param string $viewName The single view name
- * @param string $listViewName The list view name
- * @param array $placeholders The place holder and replace values
- * @param string $optionArray The option bucket array used to set the field options if needed.
- * @param array $custom Used when field is from config
+ * @param string $setType The set of fields type
+ * @param array $fieldAttributes The field values
+ * @param string $name The field name
+ * @param string $typeName The field type
+ * @param string $langView The language string of the view
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param array $placeholders The place holder and replace values
+ * @param string $optionArray The option bucket array used to set the field options if needed.
+ * @param array $custom Used when field is from config
+ * @param string $taber The tabs to add in layout (only in string manipulation)
*
* @return SimpleXMLElement The field in xml
*
*/
- private function setField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$viewName, &$listViewName, $placeholders, &$optionArray, $custom = null)
+ private function setField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$view_name_single, &$view_name_list, $placeholders, &$optionArray, $custom = null, $taber = '')
+ {
+ // check what type of field builder to use
+ if ($this->fieldBuilderType == 1)
+ {
+ // build field set using string manipulation
+ return $this->stringSetField($setType, $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray, $custom, $taber);
+ }
+ else
+ {
+ // build field set with simpleXMLElement class
+ return $this->simpleXMLSetField($setType, $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray, $custom);
+ }
+ }
+
+ /**
+ * set a field using string manipulation
+ *
+ * @param string $setType The set of fields type
+ * @param array $fieldAttributes The field values
+ * @param string $name The field name
+ * @param string $typeName The field type
+ * @param string $langView The language string of the view
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param array $placeholders The place holder and replace values
+ * @param string $optionArray The option bucket array used to set the field options if needed.
+ * @param array $custom Used when field is from config
+ * @param string $taber The tabs to add in layout
+ *
+ * @return SimpleXMLElement The field in xml
+ *
+ */
+ protected function stringSetField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$view_name_single, &$view_name_list, $placeholders, &$optionArray, $custom = null, $taber = '')
+ {
+ $field = '';
+ if ($setType === 'option')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t" . $taber . "\t";
+ $field .= PHP_EOL . "\t" . $taber . "\t $value)
+ {
+ if ($property != 'option')
+ {
+ $field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
+ }
+ elseif ($property === 'option')
+ {
+ $optionSet = '';
+ if (strpos($value, ',') !== false)
+ {
+ // mulitpal options
+ $options = explode(',', $value);
+ foreach ($options as $option)
+ {
+ if (strpos($option, '|') !== false)
+ {
+ // has other value then text
+ list($v, $t) = explode('|', $option);
+ $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
+ // add to lang array
+ $this->langContent[$this->lang][$langValue] = $t;
+ // no add to option set
+ $optionSet .= PHP_EOL . "\t" . $taber . "\t\t" . '' . PHP_EOL . "\t" . $taber . "\t\t\t" . $langValue . ' ';
+ $optionArray[$v] = $langValue;
+ }
+ else
+ {
+ // text is also the value
+ $langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
+ // add to lang array
+ $this->langContent[$this->lang][$langValue] = $option;
+ // no add to option set
+ $optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . ' ';
+ $optionArray[$option] = $langValue;
+ }
+ }
+ }
+ else
+ {
+ // one option
+ if (strpos($value, '|') !== false)
+ {
+ // has other value then text
+ list($v, $t) = explode('|', $value);
+ $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
+ // add to lang array
+ $this->langContent[$this->lang][$langValue] = $t;
+ // no add to option set
+ $optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . ' ';
+ $optionArray[$v] = $langValue;
+ }
+ else
+ {
+ // text is also the value
+ $langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
+ // add to lang array
+ $this->langContent[$this->lang][$langValue] = $value;
+ // no add to option set
+ $optionSet .= PHP_EOL . "\t\t" . $taber . "\t" . '' . PHP_EOL . "\t\t" . $taber . "\t\t" . $langValue . ' ';
+ $optionArray[$value] = $langValue;
+ }
+ }
+ }
+ }
+ if (ComponentbuilderHelper::checkString($optionSet))
+ {
+ $field .= '>';
+ $field .= PHP_EOL . "\t\t\t" . $taber . "";
+ $field .= $optionSet;
+ $field .= PHP_EOL . "\t\t" . $taber . " ";
+ }
+ elseif ($typeName === 'sql')
+ {
+ $optionArray = false;
+ $field .= PHP_EOL . "\t\t" . $taber . "/>";
+ }
+ else
+ {
+ $optionArray = false;
+ $field .= PHP_EOL . "\t\t\t" . $taber . "";
+ $field .= PHP_EOL . "\t\t" . $taber . "/>";
+ }
+ }
+ elseif ($setType === 'plain')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t\t" . $taber . "";
+ $field .= PHP_EOL . "\t\t" . $taber . " $value)
+ {
+ if ($property != 'option')
+ {
+ $field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
+ }
+ }
+ $field .= PHP_EOL . "\t\t" . $taber . "/>";
+ }
+ elseif ($setType === 'spacer')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t\t";
+ $field .= PHP_EOL . "\t\t $value)
+ {
+ if ($property != 'option')
+ {
+ $field .= " " . $property . '="' . $value . '"';
+ }
+ }
+ $field .= " />";
+ }
+ elseif ($setType === 'special')
+ {
+ // set the repeatable field
+ if ($typeName === 'repeatable')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t\t";
+ $field .= PHP_EOL . "\t\t $value)
+ {
+ if ($property != 'fields')
+ {
+ $field .= PHP_EOL . "\t\t\t" . $property . '="' . $value . '"';
+ }
+ }
+ $field .= ">";
+ $field .= PHP_EOL . "\t\t\t" . '';
+ $field .= PHP_EOL . "\t\t\t\t" . '';
+ if (strpos($fieldAttributes['fields'], ',') !== false)
+ {
+ // mulitpal fields
+ $fieldsSets = (array) explode(',', $fieldAttributes['fields']);
+ }
+ elseif (is_numeric($fieldAttributes['fields']))
+ {
+ // single field
+ $fieldsSets[] = (int) $fieldAttributes['fields'];
+ }
+ // only continue if we have a field set
+ if (ComponentbuilderHelper::checkArray($fieldsSets))
+ {
+ foreach ($fieldsSets as $fieldId)
+ {
+ // get the field data
+ $fieldData['settings'] = $this->getFieldData($fieldId, $view_name_single);
+ if (ComponentbuilderHelper::checkObject($fieldData['settings']))
+ {
+ $r_name = $this->getFieldName($fieldData);
+ $r_typeName = $this->getFieldType($fieldData);
+ $r_multiple = false;
+ $r_langLabel = '';
+ // add the tabs needed
+ $r_taber = "\t\t\t";
+ // get field values
+ $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $spacerCounter, $view_name_list, $view_name_single, $placeholders, true);
+ // check if values were set
+ if (ComponentbuilderHelper::checkArray($r_fieldValues))
+ {
+ //reset options array
+ $r_optionArray = array();
+ if ($this->defaultField($r_typeName, 'option'))
+ {
+ // now add to the field set
+ $field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
+ }
+ elseif ($this->defaultField($r_typeName, 'plain'))
+ {
+ // now add to the field set
+ $field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
+ }
+ elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
+ {
+ // add to custom
+ $custom = $r_fieldValues['custom'];
+ unset($r_fieldValues['custom']);
+ // now add to the field set
+ $field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
+ // set lang (just incase)
+ $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
+ // add to lang array
+ $this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
+ // if label was set use instead
+ if (ComponentbuilderHelper::checkString($r_langLabel))
+ {
+ $r_listLangName = $r_langLabel;
+ }
+ // set the custom array
+ $data = array('type' => $r_typeName, 'code' => $r_name, 'lang' => $r_listLangName, 'custom' => $custom);
+ // set the custom field file
+ $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
+ }
+ }
+ }
+ }
+ }
+ $field .= PHP_EOL . "\t\t\t\t ";
+ $field .= PHP_EOL . "\t\t\t ";
+ $field .= PHP_EOL . "\t\t ";
+ }
+ // set the subform fields (it is a repeatable without the modal)
+ elseif ($typeName === 'subform')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t\t";
+ $field .= PHP_EOL . "\t\t $value)
+ {
+ if ($property != 'fields')
+ {
+ $field .= PHP_EOL . "\t\t\t" . $property . '="' . $value . '"';
+ }
+ }
+ $field .= ">";
+ $field .= PHP_EOL . "\t\t\t" . '";
+ $field .= PHP_EOL . "\t\t ";
+ }
+ }
+ elseif ($setType === 'custom')
+ {
+ // now add to the field set
+ $field .= PHP_EOL . "\t\t" . $taber . "";
+ $field .= PHP_EOL . "\t\t" . $taber . " $value)
+ {
+ if ($property != 'option')
+ {
+ $field .= PHP_EOL . "\t\t" . $taber . "\t" . $property . '="' . $value . '"';
+ }
+ }
+ $field .= PHP_EOL . "\t\t" . $taber . "/>";
+ // incase the field is in the config and has not been set
+ if ('config' === $view_name_single && 'configs' === $view_name_list)
+ {
+ // set lang (just incase)
+ $listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
+ // set the custom array
+ $data = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom);
+ // set the custom field file
+ $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
+ }
+ }
+ // count the dynamic fields created
+ $this->fieldCount++;
+ // return field
+ return $field;
+ }
+
+ /**
+ * set a field with simpleXMLElement class
+ *
+ * @param string $setType The set of fields type
+ * @param array $fieldAttributes The field values
+ * @param string $name The field name
+ * @param string $typeName The field type
+ * @param string $langView The language string of the view
+ * @param string $view_name_single The single view name
+ * @param string $view_name_list The list view name
+ * @param array $placeholders The place holder and replace values
+ * @param string $optionArray The option bucket array used to set the field options if needed.
+ * @param array $custom Used when field is from config
+ *
+ * @return SimpleXMLElement The field in xml
+ *
+ */
+ protected function simpleXMLSetField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$view_name_single, &$view_name_list, $placeholders, &$optionArray, $custom = null)
{
$field = new stdClass();
if ($setType === 'option')
@@ -1033,7 +1716,7 @@ class Fields extends Structure
{
// get the field data
$fieldData = array();
- $fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
+ $fieldData['settings'] = $this->getFieldData($fieldId, $view_name_single);
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
{
$r_name = $this->getFieldName($fieldData);
@@ -1041,7 +1724,7 @@ class Fields extends Structure
$r_multiple = false;
$r_langLabel = '';
// get field values
- $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $listViewName, $viewName, $placeholders, true);
+ $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true);
// check if values were set
if (ComponentbuilderHelper::checkArray($r_fieldValues))
{
@@ -1050,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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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']))
{
@@ -1063,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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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
@@ -1076,7 +1759,7 @@ class Fields extends Structure
// set the custom array
$data = array('type' => $r_typeName, 'code' => $r_name, 'lang' => $r_listLangName, 'custom' => $custom);
// set the custom field file
- $this->setCustomFieldTypeFile($data, $listViewName, $viewName);
+ $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
}
}
@@ -1130,7 +1813,7 @@ class Fields extends Structure
{
// get the field data
$fieldData = array();
- $fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
+ $fieldData['settings'] = $this->getFieldData($fieldId, $view_name_single);
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
{
$r_name = $this->getFieldName($fieldData);
@@ -1138,7 +1821,7 @@ class Fields extends Structure
$r_multiple = false;
$r_langLabel = '';
// get field values
- $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $listViewName, $viewName, $placeholders, true);
+ $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true);
// check if values were set
if (ComponentbuilderHelper::checkArray($r_fieldValues))
{
@@ -1147,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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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']))
{
@@ -1160,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, $viewName, $listViewName, $placeholders, $r_optionArray));
+ $this->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
@@ -1173,7 +1856,7 @@ class Fields extends Structure
// set the custom array
$data = array('type' => $r_typeName, 'code' => $r_name, 'lang' => $r_listLangName, 'custom' => $custom);
// set the custom field file
- $this->setCustomFieldTypeFile($data, $listViewName, $viewName);
+ $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
}
}
@@ -1195,14 +1878,14 @@ class Fields extends Structure
}
}
// incase the field is in the config and has not been set
- if ('config' === $viewName && 'configs' === $listViewName)
+ if ('config' === $view_name_single && 'configs' === $view_name_list)
{
// set lang (just incase)
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
// set the custom array
$data = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom);
// set the custom field file
- $this->setCustomFieldTypeFile($data, $listViewName, $viewName);
+ $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
}
return $field;
@@ -1211,99 +1894,99 @@ class Fields extends Structure
/**
* set the layout builder
*
- * @param string $viewName The single edit view code name
- * @param string $tabName The tab code name
- * @param string $name The field code name
- * @param array $field The field details
+ * @param string $view_name_single The single edit view code name
+ * @param string $tabName The tab code name
+ * @param string $name The field code name
+ * @param array $field The field details
*
* @return void
*
*/
- public function setLayoutBuilder(&$viewName, &$tabName, &$name, &$field)
+ public function setLayoutBuilder(&$view_name_single, &$tabName, &$name, &$field)
{
// first fix the zero order
// to insure it lands before all the other fields
// as zero is expected to behave
if ($field['order_edit'] == 0)
{
- if (!isset($this->zeroOrderFix[$viewName]))
+ if (!isset($this->zeroOrderFix[$view_name_single]))
{
- $this->zeroOrderFix[$viewName] = array();
+ $this->zeroOrderFix[$view_name_single] = array();
}
- if (!isset($this->zeroOrderFix[$viewName][(int) $field['tab']]))
+ if (!isset($this->zeroOrderFix[$view_name_single][(int) $field['tab']]))
{
- $this->zeroOrderFix[$viewName][(int) $field['tab']] = -999;
+ $this->zeroOrderFix[$view_name_single][(int) $field['tab']] = -999;
}
else
{
- $this->zeroOrderFix[$viewName][(int) $field['tab']] ++;
+ $this->zeroOrderFix[$view_name_single][(int) $field['tab']] ++;
}
- $field['order_edit'] = $this->zeroOrderFix[$viewName][(int) $field['tab']];
+ $field['order_edit'] = $this->zeroOrderFix[$view_name_single][(int) $field['tab']];
}
// now build the layout
if (ComponentbuilderHelper::checkString($tabName) && $tabName != 'publishing')
{
- $this->tabCounter[$viewName][(int) $field['tab']] = $tabName;
- if (isset($this->layoutBuilder[$viewName][$tabName][(int) $field['alignment']][(int) $field['order_edit']]))
+ $this->tabCounter[$view_name_single][(int) $field['tab']] = $tabName;
+ if (isset($this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']]))
{
- $size = (int) count((array) $this->layoutBuilder[$viewName][$tabName][(int) $field['alignment']]) + 1;
- while(isset($this->layoutBuilder[$viewName][$tabName][(int) $field['alignment']][$size]))
+ $size = (int) count((array) $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']]) + 1;
+ while (isset($this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][$size]))
{
$size++;
}
- $this->layoutBuilder[$viewName][$tabName][(int) $field['alignment']][$size] = $name;
+ $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][$size] = $name;
}
else
{
- $this->layoutBuilder[$viewName][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
+ $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
- $this->movedPublishingFields[$viewName][$name] = $name;
+ $this->movedPublishingFields[$view_name_single][$name] = $name;
}
}
elseif ($tabName === 'publishing' || $tabName === 'Publishing')
{
if (!in_array($name, $this->defaultFields))
{
- if (isset($this->newPublishingFields[$viewName][(int) $field['alignment']][(int) $field['order_edit']]))
+ if (isset($this->newPublishingFields[$view_name_single][(int) $field['alignment']][(int) $field['order_edit']]))
{
- $size = (int) count((array) $this->newPublishingFields[$viewName][(int) $field['alignment']]) + 1;
- while(isset($this->newPublishingFields[$viewName][(int) $field['alignment']][$size]))
+ $size = (int) count((array) $this->newPublishingFields[$view_name_single][(int) $field['alignment']]) + 1;
+ while (isset($this->newPublishingFields[$view_name_single][(int) $field['alignment']][$size]))
{
$size++;
}
- $this->newPublishingFields[$viewName][(int) $field['alignment']][$size] = $name;
+ $this->newPublishingFields[$view_name_single][(int) $field['alignment']][$size] = $name;
}
else
{
- $this->newPublishingFields[$viewName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
+ $this->newPublishingFields[$view_name_single][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
}
}
else
{
- $this->tabCounter[$viewName][1] = 'Details';
- if (isset($this->layoutBuilder[$viewName]['Details'][(int) $field['alignment']][(int) $field['order_edit']]))
+ $this->tabCounter[$view_name_single][1] = 'Details';
+ if (isset($this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']]))
{
- $size = (int) count((array) $this->layoutBuilder[$viewName]['Details'][(int) $field['alignment']]) + 1;
- while(isset($this->layoutBuilder[$viewName]['Details'][(int) $field['alignment']][$size]))
+ $size = (int) count((array) $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']]) + 1;
+ while (isset($this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][$size]))
{
$size++;
}
- $this->layoutBuilder[$viewName]['Details'][(int) $field['alignment']][$size] = $name;
+ $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][$size] = $name;
}
else
{
- $this->layoutBuilder[$viewName]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name;
+ $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
- $this->movedPublishingFields[$viewName][$name] = $name;
+ $this->movedPublishingFields[$view_name_single][$name] = $name;
}
}
}
@@ -1349,22 +2032,22 @@ class Fields extends Structure
/**
* set field attributes
*
- * @param array $field The field data
- * @param int $viewType The view type
- * @param string $name The field name
- * @param string $typeName The field type
- * @param boolean $multiple The switch to set multiple selection option
- * @param string $langLabel The language string for field label
- * @param string $langView The language string of the view
- * @param string $listViewName The list view name
- * @param string $viewName The singel view name
- * @param array $placeholders The place holder and replace values
- * @param boolean $repeatable The repeatable field switch
+ * @param array $field The field data
+ * @param int $viewType The view type
+ * @param string $name The field name
+ * @param string $typeName The field type
+ * @param boolean $multiple The switch to set multiple selection option
+ * @param string $langLabel The language string for field label
+ * @param string $langView The language string of the view
+ * @param string $view_name_list The list view name
+ * @param string $view_name_single The singel view name
+ * @param array $placeholders The place holder and replace values
+ * @param boolean $repeatable The repeatable field switch
*
* @return array The field attributes
*
*/
- private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, &$multiple, &$langLabel, $langView, $listViewName, $viewName, $placeholders, $repeatable = false)
+ private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, &$multiple, &$langLabel, $langView, $view_name_list, $view_name_single, $placeholders, $repeatable = false)
{
// reset array
$fieldAttributes = array();
@@ -1517,9 +2200,9 @@ class Fields extends Structure
// update label if field use multiple times
if ($property['name'] === 'label')
{
- if (isset($fieldAttributes['name']) && isset($this->uniqueNames[$listViewName]['names'][$fieldAttributes['name']]))
+ if (isset($fieldAttributes['name']) && isset($this->uniqueNames[$view_name_list]['names'][$fieldAttributes['name']]))
{
- $xmlValue .= ' (' . ComponentbuilderHelper::safeString($this->uniqueNames[$listViewName]['names'][$fieldAttributes['name']]) . ')';
+ $xmlValue .= ' (' . ComponentbuilderHelper::safeString($this->uniqueNames[$view_name_list]['names'][$fieldAttributes['name']]) . ')';
}
}
// replace placeholders
@@ -1593,13 +2276,13 @@ class Fields extends Structure
$listclass = ComponentbuilderHelper::getBetween($field['settings']->xml, 'listclass="', '"');
if (ComponentbuilderHelper::checkString($listclass))
{
- $this->listFieldClass[$listViewName][$fieldAttributes['name']] = $listclass;
+ $this->listFieldClass[$view_name_list][$fieldAttributes['name']] = $listclass;
}
// check if we find reason to remove this field from being escaped
$escaped = ComponentbuilderHelper::getBetween($field['settings']->xml, 'escape="', '"');
if (ComponentbuilderHelper::checkString($escaped))
{
- $this->doNotEscape[$listViewName][] = $fieldAttributes['name'];
+ $this->doNotEscape[$view_name_list][] = $fieldAttributes['name'];
}
// check if we have display switch for dynamic placment
$display = ComponentbuilderHelper::getBetween($field['settings']->xml, 'display="', '"');
@@ -1615,27 +2298,27 @@ class Fields extends Structure
/**
* set Builders
*
- * @param string $langLabel The language string for field label
- * @param string $langView The language string of the view
- * @param string $viewName The singel view name
- * @param string $listViewName The list view name
- * @param string $name The field name
- * @param array $view The view data
- * @param array $field The field data
- * @param string $typeName The field type
- * @param boolean $multiple The switch to set multiple selection option
- * @param boolean $custom The custom field switch
- * @param boolean $options The options switch
+ * @param string $langLabel The language string for field label
+ * @param string $langView The language string of the view
+ * @param string $view_name_single The singel view name
+ * @param string $view_name_list The list view name
+ * @param string $name The field name
+ * @param array $view The view data
+ * @param array $field The field data
+ * @param string $typeName The field type
+ * @param boolean $multiple The switch to set multiple selection option
+ * @param boolean $custom The custom field switch
+ * @param boolean $options The options switch
*
* @return void
*
*/
- public function setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false)
+ public function setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, $custom = false, $options = false)
{
if ($typeName === 'tag')
{
// set tags for this view but don't load to DB
- $this->tagsBuilder[$viewName] = $viewName;
+ $this->tagsBuilder[$view_name_single] = $view_name_single;
}
else
{
@@ -1658,58 +2341,58 @@ class Fields extends Structure
// don't use these as index or uniqe keys
$textKeys = array('TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'TINYBLOB', 'MEDIUMBLOB', 'LONGBLOB');
// build the query values
- $this->queryBuilder[$viewName][$name]['type'] = $field['settings']->datatype;
+ $this->queryBuilder[$view_name_single][$name]['type'] = $field['settings']->datatype;
if (!in_array($field['settings']->datatype, $textKeys))
{
- $this->queryBuilder[$viewName][$name]['lenght'] = $field['settings']->datalenght;
- $this->queryBuilder[$viewName][$name]['lenght_other'] = $field['settings']->datalenght_other;
- $this->queryBuilder[$viewName][$name]['default'] = $field['settings']->datadefault;
- $this->queryBuilder[$viewName][$name]['other'] = $field['settings']->datadefault_other;
+ $this->queryBuilder[$view_name_single][$name]['lenght'] = $field['settings']->datalenght;
+ $this->queryBuilder[$view_name_single][$name]['lenght_other'] = $field['settings']->datalenght_other;
+ $this->queryBuilder[$view_name_single][$name]['default'] = $field['settings']->datadefault;
+ $this->queryBuilder[$view_name_single][$name]['other'] = $field['settings']->datadefault_other;
}
else
{
- $this->queryBuilder[$viewName][$name]['default'] = 'EMPTY';
+ $this->queryBuilder[$view_name_single][$name]['default'] = 'EMPTY';
}
// to identify the field
- $this->queryBuilder[$viewName][$name]['ID'] = $field['settings']->id;
- $this->queryBuilder[$viewName][$name]['null_switch'] = $field['settings']->null_switch;
+ $this->queryBuilder[$view_name_single][$name]['ID'] = $field['settings']->id;
+ $this->queryBuilder[$view_name_single][$name]['null_switch'] = $field['settings']->null_switch;
// set index types
if ($field['settings']->indexes == 1 && !in_array($field['settings']->datatype, $textKeys))
{
// build unique keys of this view for db
- $this->dbUniqueKeys[$viewName][] = $name;
+ $this->dbUniqueKeys[$view_name_single][] = $name;
}
elseif (($field['settings']->indexes == 2 || (isset($field['alias']) && $field['alias']) || (isset($field['title']) && $field['title']) || $typeName === 'category') && !in_array($field['settings']->datatype, $textKeys))
{
// build keys of this view for db
- $this->dbKeys[$viewName][] = $name;
+ $this->dbKeys[$view_name_single][] = $name;
}
}
// add history to this view
if (isset($view['history']) && $view['history'])
{
- $this->historyBuilder[$viewName] = $viewName;
+ $this->historyBuilder[$view_name_single] = $view_name_single;
}
// set Alias (only one title per view)
if (isset($field['alias']) && $field['alias'])
{
- $this->aliasBuilder[$viewName] = $name;
+ $this->aliasBuilder[$view_name_single] = $name;
}
// set Titles (only one title per view)
if (isset($field['title']) && $field['title'])
{
- $this->titleBuilder[$viewName] = $name;
+ $this->titleBuilder[$view_name_single] = $name;
}
// category name fix
if ($typeName === 'category')
{
- if (isset($this->catOtherName[$listViewName]) && ComponentbuilderHelper::checkArray($this->catOtherName[$listViewName]))
+ if (isset($this->catOtherName[$view_name_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$view_name_list]))
{
- $tempName = $this->catOtherName[$listViewName]['name'];
+ $tempName = $this->catOtherName[$view_name_list]['name'];
}
else
{
- $tempName = $viewName . ' category';
+ $tempName = $view_name_single . ' category';
}
// set lang
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
@@ -1732,7 +2415,7 @@ class Fields extends Structure
if ((isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform')
{
// load to list builder
- $this->listBuilder[$listViewName][] = array(
+ $this->listBuilder[$view_name_list][] = array(
'type' => $typeName,
'code' => $name,
'lang' => $listLangName,
@@ -1744,64 +2427,64 @@ class Fields extends Structure
'multiple' => $multiple,
'options' => $options);
- $this->customBuilderList[$listViewName][] = $name;
+ $this->customBuilderList[$view_name_list][] = $name;
}
// set the hidden field of this view
if ($typeName === 'hidden')
{
- if (!isset($this->hiddenFieldsBuilder[$viewName]))
+ if (!isset($this->hiddenFieldsBuilder[$view_name_single]))
{
- $this->hiddenFieldsBuilder[$viewName] = '';
+ $this->hiddenFieldsBuilder[$view_name_single] = '';
}
- $this->hiddenFieldsBuilder[$viewName] .= ',"' . $name . '"';
+ $this->hiddenFieldsBuilder[$view_name_single] .= ',"' . $name . '"';
}
// set all int fields of this view
if ($field['settings']->datatype === 'INT' || $field['settings']->datatype === 'TINYINT' || $field['settings']->datatype === 'BIGINT')
{
- if (!isset($this->intFieldsBuilder[$viewName]))
+ if (!isset($this->intFieldsBuilder[$view_name_single]))
{
- $this->intFieldsBuilder[$viewName] = '';
+ $this->intFieldsBuilder[$view_name_single] = '';
}
- $this->intFieldsBuilder[$viewName] .= ',"' . $name . '"';
+ $this->intFieldsBuilder[$view_name_single] .= ',"' . $name . '"';
}
// set all dynamic field of this view
if ($typeName != 'category' && $typeName != 'repeatable' && $typeName != 'subform' && !in_array($name, $this->defaultFields))
{
- if (!isset($this->dynamicfieldsBuilder[$viewName]))
+ if (!isset($this->dynamicfieldsBuilder[$view_name_single]))
{
- $this->dynamicfieldsBuilder[$viewName] = '';
+ $this->dynamicfieldsBuilder[$view_name_single] = '';
}
- if (isset($this->dynamicfieldsBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->dynamicfieldsBuilder[$viewName]))
+ if (isset($this->dynamicfieldsBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->dynamicfieldsBuilder[$view_name_single]))
{
- $this->dynamicfieldsBuilder[$viewName] .= ',"' . $name . '":"' . $name . '"';
+ $this->dynamicfieldsBuilder[$view_name_single] .= ',"' . $name . '":"' . $name . '"';
}
else
{
- $this->dynamicfieldsBuilder[$viewName] .= '"' . $name . '":"' . $name . '"';
+ $this->dynamicfieldsBuilder[$view_name_single] .= '"' . $name . '":"' . $name . '"';
}
}
// TODO we may need to add a switch instead (since now it uses the first editor field)
// set the main(biggest) text field of this view
if ($typeName === 'editor')
{
- if (!isset($this->maintextBuilder[$viewName]) || !ComponentbuilderHelper::checkString($this->maintextBuilder[$viewName]))
+ if (!isset($this->maintextBuilder[$view_name_single]) || !ComponentbuilderHelper::checkString($this->maintextBuilder[$view_name_single]))
{
- $this->maintextBuilder[$viewName] = $name;
+ $this->maintextBuilder[$view_name_single] = $name;
}
}
// set the custom builder
if (ComponentbuilderHelper::checkArray($custom) && $typeName != 'category' && $typeName != 'repeatable' && $typeName != 'subform')
{
- $this->customBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'method' => $field['settings']->store);
+ $this->customBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'method' => $field['settings']->store);
// set the custom fields needed in content type data
- if (!isset($this->customFieldLinksBuilder[$viewName]))
+ if (!isset($this->customFieldLinksBuilder[$view_name_single]))
{
- $this->customFieldLinksBuilder[$viewName] = '';
+ $this->customFieldLinksBuilder[$view_name_single] = '';
}
// only load this if table is set
if (isset($custom['table']) && ComponentbuilderHelper::checkString($custom['table']))
{
- $this->customFieldLinksBuilder[$viewName] .= ',{"sourceColumn": "' . $name . '","targetTable": "' . $custom['table'] . '","targetColumn": "' . $custom['id'] . '","displayColumn": "' . $custom['text'] . '"}';
+ $this->customFieldLinksBuilder[$view_name_single] .= ',{"sourceColumn": "' . $name . '","targetTable": "' . $custom['table'] . '","targetColumn": "' . $custom['id'] . '","displayColumn": "' . $custom['text'] . '"}';
}
// build script switch for user
if ($custom['extends'] === 'user')
@@ -1816,24 +2499,24 @@ class Fields extends Structure
// setup gategory for this view
if ($typeName === 'category')
{
- if (isset($this->catOtherName[$listViewName]) && ComponentbuilderHelper::checkArray($this->catOtherName[$listViewName]))
+ if (isset($this->catOtherName[$view_name_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$view_name_list]))
{
- $otherViews = $this->catOtherName[$listViewName]['views'];
- $otherView = $this->catOtherName[$listViewName]['view'];
+ $otherViews = $this->catOtherName[$view_name_list]['views'];
+ $otherView = $this->catOtherName[$view_name_list]['view'];
}
else
{
- $otherViews = $listViewName;
- $otherView = $viewName;
+ $otherViews = $view_name_list;
+ $otherView = $view_name_single;
}
- $this->categoryBuilder[$listViewName] = array('code' => $name, 'name' => $listLangName);
+ $this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName);
// also set code name for title alias fix
- $this->catCodeBuilder[$viewName] = array('code' => $name, 'views' => $otherViews, 'view' => $otherView);
+ $this->catCodeBuilder[$view_name_single] = array('code' => $name, 'views' => $otherViews, 'view' => $otherView);
}
// setup checkbox for this view
if ($typeName === 'checkbox' || (ComponentbuilderHelper::checkArray($custom) && isset($custom['extends']) && $custom['extends'] === 'checkboxes'))
{
- $this->checkboxBuilder[$viewName][] = $name;
+ $this->checkboxBuilder[$view_name_single][] = $name;
}
// setup checkboxes and other json items for this view
if (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag')
@@ -1842,45 +2525,45 @@ class Fields extends Structure
{
case 1:
// JSON_STRING_ENCODE
- $this->jsonStringBuilder[$viewName][] = $name;
+ $this->jsonStringBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'json', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
break;
case 2:
// BASE_SIXTY_FOUR
- $this->base64Builder[$viewName][] = $name;
+ $this->base64Builder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'base64', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'base64', $typeName);
break;
case 3:
// BASIC_ENCRYPTION_LOCALKEY
- $this->basicEncryptionBuilder[$viewName][] = $name;
+ $this->basicEncryptionBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'basic_encryption', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'basic_encryption', $typeName);
break;
case 4:
// WHMCS_ENCRYPTION_VDMKEY
- $this->whmcsEncryptionBuilder[$viewName][] = $name;
+ $this->whmcsEncryptionBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'whmcs_encryption', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'whmcs_encryption', $typeName);
break;
case 5:
// MEDIUM_ENCRYPTION_LOCALFILE
- $this->mediumEncryptionBuilder[$viewName][] = $name;
+ $this->mediumEncryptionBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'medium_encryption', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'medium_encryption', $typeName);
break;
default:
// JSON_ARRAY_ENCODE
- $this->jsonItemBuilder[$viewName][] = $name;
+ $this->jsonItemBuilder[$view_name_single][] = $name;
// Site settings of each field if needed
- $this->buildSiteFieldData($viewName, $name, 'json', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
break;
}
// just a heads-up for usergroups set to multiple
if ($typeName === 'usergroup')
{
- $this->buildSiteFieldData($viewName, $name, 'json', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
}
// load the json list display fix
@@ -1888,47 +2571,47 @@ class Fields extends Structure
{
if (ComponentbuilderHelper::checkArray($options))
{
- $this->getItemsMethodListStringFixBuilder[$viewName][] = array('name' => $name, 'type' => $typeName, 'translation' => true, 'custom' => $custom, 'method' => $field['settings']->store);
+ $this->getItemsMethodListStringFixBuilder[$view_name_single][] = array('name' => $name, 'type' => $typeName, 'translation' => true, 'custom' => $custom, 'method' => $field['settings']->store);
}
else
{
- $this->getItemsMethodListStringFixBuilder[$viewName][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store);
+ $this->getItemsMethodListStringFixBuilder[$view_name_single][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store);
}
}
// if subform the values must revert to array
if ('subform' === $typeName)
{
- $this->jsonItemBuilderArray[$viewName][] = $name;
+ $this->jsonItemBuilderArray[$view_name_single][] = $name;
}
}
// build the data for the export & import methods $typeName === 'repeatable' ||
if (($typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && !ComponentbuilderHelper::checkArray($options))
{
- $this->getItemsMethodEximportStringFixBuilder[$viewName][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store);
+ $this->getItemsMethodEximportStringFixBuilder[$view_name_single][] = array('name' => $name, 'type' => $typeName, 'translation' => false, 'custom' => $custom, 'method' => $field['settings']->store);
}
// check if field should be added to uikit
- $this->buildSiteFieldData($viewName, $name, 'uikit', $typeName);
+ $this->buildSiteFieldData($view_name_single, $name, 'uikit', $typeName);
// load the selection translation fix
if (ComponentbuilderHelper::checkArray($options) && (isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform')
{
- $this->selectionTranslationFixBuilder[$listViewName][$name] = $options;
+ $this->selectionTranslationFixBuilder[$view_name_list][$name] = $options;
}
// build the sort values
if ((isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
- $this->sortBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options);
+ $this->sortBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options);
}
// build the search values
if (isset($field['search']) && $field['search'] == 1)
{
$_list = (isset($field['list'])) ? $field['list'] : 0;
- $this->searchBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list);
+ $this->searchBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list);
}
// build the filter values
if ((isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
- $this->filterBuilder[$listViewName][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $viewName, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options);
+ $this->filterBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $view_name_single, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options);
}
// build the layout
@@ -1942,10 +2625,10 @@ class Fields extends Structure
// set to publishing tab
$tabName = 'publishing';
}
- $this->setLayoutBuilder($viewName, $tabName, $name, $field);
+ $this->setLayoutBuilder($view_name_single, $tabName, $name, $field);
}
- public function setCustomFieldTypeFile($data, $viewName_list, $viewName_single)
+ public function setCustomFieldTypeFile($data, $view_name_list, $view_name_single)
{
// make sure it is not already been build or if it is prime
if ((isset($data['custom']['prime_php']) && $data['custom']['prime_php'] == 1) || !isset($this->fileContentDynamic['customfield_' . $data['type']]) || !ComponentbuilderHelper::checkArray($this->fileContentDynamic['customfield_' . $data['type']]))
@@ -1967,10 +2650,10 @@ class Fields extends Structure
'###CODE###' => $data['code'],
'###component###' => $this->fileContentStatic['###component###'],
'###Component###' => $this->fileContentStatic['###Component###'],
- '###view_type###' => $viewName_single . '_' . $data['type'],
+ '###view_type###' => $view_name_single . '_' . $data['type'],
'###type###' => $data['type'],
- '###view###' => $viewName_single,
- '###views###' => $viewName_list
+ '###view###' => $view_name_single,
+ '###views###' => $view_name_list
);
// now load the php script
if (isset($data['custom']['php']) && ComponentbuilderHelper::checkArray($data['custom']['php']))
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index 637c38b19..a12f1d5d6 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -12902,13 +12902,23 @@ class Interpretation extends Fields
$dbkey = 'g';
foreach ($this->componentData->config as $field)
{
- $newxmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $placeholders, $dbkey, false);
- // tmp hack untill this whole area is also done in xml (TODO)
- if (isset($newxmlField->fieldXML))
+ // check the field builder type
+ if ($this->fieldBuilderType == 1)
{
- $xmlField = dom_import_simplexml($newxmlField->fieldXML);
- $xmlField = PHP_EOL . "\t' . PHP_EOL . "\t" . $this->xmlPrettyPrint($xmlField, 'field');
+ // string manipulation
+ $xmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $placeholders, $dbkey, false);
}
+ else
+ {
+ // simpleXMLElement class
+ $newxmlField = $this->setDynamicField($field, $view, $viewType, $lang, $viewName, $listViewName, $placeholders, $dbkey, false);
+ if (isset($newxmlField->fieldXML))
+ {
+ $xmlField = dom_import_simplexml($newxmlField->fieldXML);
+ $xmlField = PHP_EOL . "\t' . PHP_EOL . "\t" . $this->xmlPrettyPrint($xmlField, 'field');
+ }
+ }
+ // make sure the xml is set and a string
if (isset($xmlField) && ComponentbuilderHelper::checkString($xmlField))
{
$this->configFieldSetsCustomField[$field['tabname']][] = $xmlField;
@@ -13097,7 +13107,7 @@ class Interpretation extends Fields
}
}
// set the fields
- $this->configFieldSets[] = implode("\t\t", $bucket);
+ $this->configFieldSets[] = implode("", $bucket);
// close field set
$this->configFieldSets[] = "\t ";
// remove after loading
@@ -13135,7 +13145,7 @@ class Interpretation extends Fields
// add custom Target Groups fields
if (isset($this->configFieldSetsCustomField['Target Groups']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Target Groups']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['Target Groups']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['Target Groups']);
unset($this->configFieldSetsCustomField['Target Groups']);
}
// close that fieldse
@@ -13261,7 +13271,7 @@ class Interpretation extends Fields
// add custom global fields
if (isset($this->configFieldSetsCustomField['Global']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Global']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['Global']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['Global']);
unset($this->configFieldSetsCustomField['Global']);
}
// set the author details
@@ -13619,7 +13629,7 @@ for developing fast and powerful web interfaces. For more info visit configFieldSetsCustomField['Uikit Settings']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Uikit Settings']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['Uikit Settings']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['Uikit Settings']);
unset($this->configFieldSetsCustomField['Uikit Settings']);
}
// close that fieldset
@@ -13643,7 +13653,7 @@ for developing fast and powerful web interfaces. For more info visit configFieldSetsCustomField['Mail Configuration']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Mail Configuration']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['Mail Configuration']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['Mail Configuration']);
unset($this->configFieldSetsCustomField['Mail Configuration']);
}
else
@@ -13905,7 +13915,7 @@ for developing fast and powerful web interfaces. For more info visit configFieldSetsCustomField['DKIM']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['DKIM']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['DKIM']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['DKIM']);
unset($this->configFieldSetsCustomField['DKIM']);
}
else
@@ -14339,7 +14349,7 @@ function vdm_dkim() {
// add custom Encryption Settings fields
if (isset($this->configFieldSetsCustomField['Chart Settings']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Chart Settings']))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField['Chart Settings']);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField['Chart Settings']);
unset($this->configFieldSetsCustomField['Chart Settings']);
}
@@ -14540,7 +14550,7 @@ function vdm_dkim() {
// add custom Encryption Settings fields
if (isset($this->configFieldSetsCustomField[$dynamicAddField]) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField[$dynamicAddField]))
{
- $this->configFieldSets[] = implode("\t\t", $this->configFieldSetsCustomField[$dynamicAddField]);
+ $this->configFieldSets[] = implode("", $this->configFieldSetsCustomField[$dynamicAddField]);
unset($this->configFieldSetsCustomField[$dynamicAddField]);
}
}
diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php
index 99f458f71..13cfc4cdf 100644
--- a/admin/helpers/componentbuilder.php
+++ b/admin/helpers/componentbuilder.php
@@ -1554,16 +1554,19 @@ abstract class ComponentbuilderHelper
}
/**
- * get the localkey
+ * the basic localkey
**/
protected static $localkey = false;
-
+
+ /**
+ * get the localkey
+ **/
public static function getLocalKey()
{
if (!self::$localkey)
{
- // get the main key
- self::$localkey = md5(JComponentHelper::getParams('com_componentbuilder')->get('basic_key', 'localKey34fdWEkl'));
+ // get the basic key
+ self::$localkey = md5(self::getCryptKey('basic', 'localKey34fdWEkl'));
}
return self::$localkey;
}
@@ -1636,8 +1639,18 @@ abstract class ComponentbuilderHelper
}
return false;
}
-
- public static function getBetween($content,$start,$end)
+
+ /**
+ * get between
+ *
+ * @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
+ *
+ */
+ public static function getBetween($content, $start, $end)
{
$r = explode($start, $content);
if (isset($r[1]))
@@ -1647,17 +1660,32 @@ abstract class ComponentbuilderHelper
}
return '';
}
-
- public static function getAllBetween($content,$start,$end)
+
+ /**
+ * get all between
+ *
+ * @param string $content The content to search
+ * @param string $start The starting value
+ * @param string $end The ending value
+ *
+ * @return array On success
+ *
+ */
+ public static function getAllBetween($content, $start, $end)
{
- $buket = array();
+ // reset bucket
+ $bucket = array();
for ($i = 0; ; $i++)
{
+ // search for string
$found = self::getBetween($content,$start,$end);
if (self::checkString($found))
{
- $buket[] = $found;
+ // add to bucket
+ $bucket[] = $found;
+ // build removal string
$remove = $start.$found.$end;
+ // remove from content
$content = str_replace($remove,'',$content);
}
else
@@ -1670,9 +1698,10 @@ abstract class ComponentbuilderHelper
break;
}
}
- return array_unique($buket);
+ // only return unique array of values
+ return array_unique($bucket);
}
-
+
public static function typeField($type,$option = 'default')
{
// list of default fields
@@ -2494,6 +2523,7 @@ abstract class ComponentbuilderHelper
// return the object
return self::$CRYPT[$TYPE];
}
+
/**
* Load the Component xml manifest.
**/
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 6a6303696..4b9338b4b 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -2270,6 +2270,8 @@ COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_SIX="Never"
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_THREE="Once a day"
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_TWO="Every twelve hours"
COM_COMPONENTBUILDER_CONFIG_COMPANY="Company"
+COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION="Select the method to use when building the xml fields in the compiler. The SimpleXMLElement Class is best practice, and String Manipulation is faster and works without special extensions."
+COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL="Field Builder Type(in compiler) "
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set the path to the compiler folder"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
@@ -2437,6 +2439,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_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication"
@@ -2456,6 +2459,7 @@ COM_COMPONENTBUILDER_CONFIG_SMTPUSER_LABEL="SMTP Username"
COM_COMPONENTBUILDER_CONFIG_SSL="SSL"
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should the data that is stored in the browser memory remain unchanged before it is removed and updated."
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle"
+COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation"
COM_COMPONENTBUILDER_CONFIG_TLS="TLS"
COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/ "
diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml
index 57fb80c95..136769215 100644
--- a/admin/models/forms/admin_fields.xml
+++ b/admin/models/forms/admin_fields.xml
@@ -4,242 +4,277 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml
index 2ea168e82..7c4ca6859 100644
--- a/admin/models/forms/admin_fields_conditions.xml
+++ b/admin/models/forms/admin_fields_conditions.xml
@@ -4,193 +4,219 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml
index 9613ed584..3c0ae5547 100644
--- a/admin/models/forms/admin_view.xml
+++ b/admin/models/forms/admin_view.xml
@@ -4,1495 +4,1912 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE
- COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_ADD
- COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE
- COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_NO
+
+
+
+
+
+
diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml
index 62dd55950..618e296a9 100644
--- a/admin/models/forms/component_admin_views.xml
+++ b/admin/models/forms/component_admin_views.xml
@@ -4,440 +4,677 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_config.xml b/admin/models/forms/component_config.xml
index febbb04bd..36a1fafc8 100644
--- a/admin/models/forms/component_config.xml
+++ b/admin/models/forms/component_config.xml
@@ -4,142 +4,155 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml
index d9df673b0..593f14ed3 100644
--- a/admin/models/forms/component_custom_admin_menus.xml
+++ b/admin/models/forms/component_custom_admin_menus.xml
@@ -4,188 +4,211 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml
index 025c42eac..4cb5899ab 100644
--- a/admin/models/forms/component_custom_admin_views.xml
+++ b/admin/models/forms/component_custom_admin_views.xml
@@ -4,404 +4,633 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml
index 39cb4b593..6ddb83c67 100644
--- a/admin/models/forms/component_dashboard.xml
+++ b/admin/models/forms/component_dashboard.xml
@@ -4,155 +4,170 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_files_folders.xml b/admin/models/forms/component_files_folders.xml
index 917351ae9..42b47bd24 100644
--- a/admin/models/forms/component_files_folders.xml
+++ b/admin/models/forms/component_files_folders.xml
@@ -4,313 +4,316 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_mysql_tweaks.xml b/admin/models/forms/component_mysql_tweaks.xml
index d59cc300b..c3b60fbc8 100644
--- a/admin/models/forms/component_mysql_tweaks.xml
+++ b/admin/models/forms/component_mysql_tweaks.xml
@@ -4,154 +4,172 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml
index f03fe1542..606a53142 100644
--- a/admin/models/forms/component_site_views.xml
+++ b/admin/models/forms/component_site_views.xml
@@ -4,165 +4,179 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/component_updates.xml b/admin/models/forms/component_updates.xml
index eff539617..14f0ee598 100644
--- a/admin/models/forms/component_updates.xml
+++ b/admin/models/forms/component_updates.xml
@@ -4,144 +4,157 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml
index d7fad2a00..ad5ac2fdc 100644
--- a/admin/models/forms/custom_admin_view.xml
+++ b/admin/models/forms/custom_admin_view.xml
@@ -4,858 +4,1159 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
- COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES
+
+ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml
index d478dc2c1..6a03d9ee4 100644
--- a/admin/models/forms/custom_code.xml
+++ b/admin/models/forms/custom_code.xml
@@ -4,234 +4,259 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_CODE_JCB_MANUAL
- COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_CODE_REPLACEMENT
- COM_COMPONENTBUILDER_CUSTOM_CODE_INSERTION
-
-
-
-
- COM_COMPONENTBUILDER_CUSTOM_CODE_PHPJS
- COM_COMPONENTBUILDER_CUSTOM_CODE_HTML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_JCB_MANUAL
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_REPLACEMENT
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_INSERTION
+
+
+
+
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_PHPJS
+
+ COM_COMPONENTBUILDER_CUSTOM_CODE_HTML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml
index f91bfe224..2660fa1f3 100644
--- a/admin/models/forms/dynamic_get.xml
+++ b/admin/models/forms/dynamic_get.xml
@@ -4,1039 +4,1363 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_PLEASE_SELECT
- COM_COMPONENTBUILDER_DYNAMIC_GET_BACKEND_VIEW
- COM_COMPONENTBUILDER_DYNAMIC_GET_JOOMLA_DATABASE
- COM_COMPONENTBUILDER_DYNAMIC_GET_CUSTOM
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_GETITEM
- COM_COMPONENTBUILDER_DYNAMIC_GET_GETLISTQUERY
- COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM
- COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOMS
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_DYNAMIC_GET_YES
- COM_COMPONENTBUILDER_DYNAMIC_GET_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_PLEASE_SELECT
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_BACKEND_VIEW
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_JOOMLA_DATABASE
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_CUSTOM
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_GETITEM
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_GETLISTQUERY
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOMS
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_YES
+
+ COM_COMPONENTBUILDER_DYNAMIC_GET_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml
index 9601ca8ea..b59d24bfb 100644
--- a/admin/models/forms/field.xml
+++ b/admin/models/forms/field.xml
@@ -4,363 +4,441 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_CHAR
- COM_COMPONENTBUILDER_FIELD_VARCHAR
- COM_COMPONENTBUILDER_FIELD_TEXT
- COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT
- COM_COMPONENTBUILDER_FIELD_LONGTEXT
- COM_COMPONENTBUILDER_FIELD_DATETIME
- COM_COMPONENTBUILDER_FIELD_DATE
- COM_COMPONENTBUILDER_FIELD_TIME
- COM_COMPONENTBUILDER_FIELD_INT
- COM_COMPONENTBUILDER_FIELD_TINYINT
- COM_COMPONENTBUILDER_FIELD_BIGINT
- COM_COMPONENTBUILDER_FIELD_FLOAT
- COM_COMPONENTBUILDER_FIELD_DECIMAL
- COM_COMPONENTBUILDER_FIELD_DOUBLE
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY
- COM_COMPONENTBUILDER_FIELD_KEY
- COM_COMPONENTBUILDER_FIELD_NONE
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_NULL
- COM_COMPONENTBUILDER_FIELD_NOT_NULL
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_YES
- COM_COMPONENTBUILDER_FIELD_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_YES
- COM_COMPONENTBUILDER_FIELD_NO
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_YES
- COM_COMPONENTBUILDER_FIELD_NO
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_YES
- COM_COMPONENTBUILDER_FIELD_NO
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_NONE_SET
- COM_COMPONENTBUILDER_FIELD_ONE
- COM_COMPONENTBUILDER_FIELD_SEVEN
- COM_COMPONENTBUILDER_FIELD_TEN
- COM_COMPONENTBUILDER_FIELD_ELEVEN
- COM_COMPONENTBUILDER_FIELD_FIFTY
- COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR
- COM_COMPONENTBUILDER_FIELD_ONE_HUNDRED
- COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE
- COM_COMPONENTBUILDER_FIELD_ONE_THOUSAND_AND_TWENTY_FOUR
- COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT
- COM_COMPONENTBUILDER_FIELD_OTHER
-
-
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_NONE
- COM_COMPONENTBUILDER_FIELD_ZERO
- COM_COMPONENTBUILDER_FIELD_ONE
- COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP
- COM_COMPONENTBUILDER_FIELD_DATETIME
- COM_COMPONENTBUILDER_FIELD_OTHER
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_FIELD_DEFAULT
- COM_COMPONENTBUILDER_FIELD_JSON
- COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR
- COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY
- COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY
- COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_CHAR
+
+ COM_COMPONENTBUILDER_FIELD_VARCHAR
+
+ COM_COMPONENTBUILDER_FIELD_TEXT
+
+ COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT
+
+ COM_COMPONENTBUILDER_FIELD_LONGTEXT
+
+ COM_COMPONENTBUILDER_FIELD_DATETIME
+
+ COM_COMPONENTBUILDER_FIELD_DATE
+
+ COM_COMPONENTBUILDER_FIELD_TIME
+
+ COM_COMPONENTBUILDER_FIELD_INT
+
+ COM_COMPONENTBUILDER_FIELD_TINYINT
+
+ COM_COMPONENTBUILDER_FIELD_BIGINT
+
+ COM_COMPONENTBUILDER_FIELD_FLOAT
+
+ COM_COMPONENTBUILDER_FIELD_DECIMAL
+
+ COM_COMPONENTBUILDER_FIELD_DOUBLE
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY
+
+ COM_COMPONENTBUILDER_FIELD_KEY
+
+ COM_COMPONENTBUILDER_FIELD_NONE
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_NULL
+
+ COM_COMPONENTBUILDER_FIELD_NOT_NULL
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_YES
+
+ COM_COMPONENTBUILDER_FIELD_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_YES
+
+ COM_COMPONENTBUILDER_FIELD_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_YES
+
+ COM_COMPONENTBUILDER_FIELD_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_YES
+
+ COM_COMPONENTBUILDER_FIELD_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_NONE_SET
+
+ COM_COMPONENTBUILDER_FIELD_ONE
+
+ COM_COMPONENTBUILDER_FIELD_SEVEN
+
+ COM_COMPONENTBUILDER_FIELD_TEN
+
+ COM_COMPONENTBUILDER_FIELD_ELEVEN
+
+ COM_COMPONENTBUILDER_FIELD_FIFTY
+
+ COM_COMPONENTBUILDER_FIELD_SIXTY_FOUR
+
+ COM_COMPONENTBUILDER_FIELD_ONE_HUNDRED
+
+ COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE
+
+ COM_COMPONENTBUILDER_FIELD_ONE_THOUSAND_AND_TWENTY_FOUR
+
+ COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT
+
+ COM_COMPONENTBUILDER_FIELD_OTHER
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_NONE
+
+ COM_COMPONENTBUILDER_FIELD_ZERO
+
+ COM_COMPONENTBUILDER_FIELD_ONE
+
+ COM_COMPONENTBUILDER_FIELD_CURRENT_TIMESTAMP
+
+ COM_COMPONENTBUILDER_FIELD_DATETIME
+
+ COM_COMPONENTBUILDER_FIELD_OTHER
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_FIELD_DEFAULT
+
+ COM_COMPONENTBUILDER_FIELD_JSON
+
+ COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR
+
+ COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY
+
+ COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY
+
+ COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml
index fe23918a5..cc2cfb43f 100644
--- a/admin/models/forms/fieldtype.xml
+++ b/admin/models/forms/fieldtype.xml
@@ -4,208 +4,228 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml
index 74d8d1290..3c9c9529c 100644
--- a/admin/models/forms/help_document.xml
+++ b/admin/models/forms/help_document.xml
@@ -4,198 +4,233 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_HELP_DOCUMENT_SELECT_AN_OPTION
- COM_COMPONENTBUILDER_HELP_DOCUMENT_JOOMLA_ARTICLE
- COM_COMPONENTBUILDER_HELP_DOCUMENT_TEXT
- COM_COMPONENTBUILDER_HELP_DOCUMENT_URL
-
-
-
-
-
-
- COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN
- COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_HELP_DOCUMENT_SOME
- COM_COMPONENTBUILDER_HELP_DOCUMENT_ALL
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_SELECT_AN_OPTION
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_JOOMLA_ARTICLE
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_TEXT
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_URL
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_SOME
+
+ COM_COMPONENTBUILDER_HELP_DOCUMENT_ALL
+
+
+
+
diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml
index 2973024af..dd0f65e1f 100644
--- a/admin/models/forms/joomla_component.xml
+++ b/admin/models/forms/joomla_component.xml
@@ -4,1237 +4,1307 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL_VERSION
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_VIEW_VERSION_DATE
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_TWO_NUMBER_OF_GLOBAL_VERSION_ONEZEROX
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_NUMBER_OF_GLOBAL_VERSION_ONEXX
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BOTH_VTWO_AMP_VTHREE
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_VTWO
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_VTHREE
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_ENCRYPTION_ONLY_TO_LOCK_DATAFIELDS
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_NOT_READY
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK_DOWN_USE_USED_TO_VERIFY_OWNERSHIP
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SERVER
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OTHER
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTHREE
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTWO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- JGLOBAL_USE_GLOBAL
- JGLOBAL_INDEX_FOLLOW
- JGLOBAL_NOINDEX_FOLLOW
- JGLOBAL_INDEX_NOFOLLOW
- JGLOBAL_NOINDEX_NOFOLLOW
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL_VERSION
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_VIEW_VERSION_DATE
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_TWO_NUMBER_OF_GLOBAL_VERSION_ONEZEROX
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_NUMBER_OF_GLOBAL_VERSION_ONEXX
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BOTH_VTWO_AMP_VTHREE
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_VTWO
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_VTHREE
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_ENCRYPTION_ONLY_TO_LOCK_DATAFIELDS
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_NOT_READY
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK_DOWN_USE_USED_TO_VERIFY_OWNERSHIP
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SERVER
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OTHER
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTHREE
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTWO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ JGLOBAL_USE_GLOBAL
+ JGLOBAL_INDEX_FOLLOW
+ JGLOBAL_NOINDEX_FOLLOW
+ JGLOBAL_INDEX_NOFOLLOW
+ JGLOBAL_NOINDEX_NOFOLLOW
+
+
+
+
+
+
+
diff --git a/admin/models/forms/language.xml b/admin/models/forms/language.xml
index fae90ae83..2b839fd00 100644
--- a/admin/models/forms/language.xml
+++ b/admin/models/forms/language.xml
@@ -4,107 +4,117 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml
index 842476ecc..37cf94414 100644
--- a/admin/models/forms/language_translation.xml
+++ b/admin/models/forms/language_translation.xml
@@ -4,138 +4,151 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/layout.xml b/admin/models/forms/layout.xml
index dccab4d59..574d9dbeb 100644
--- a/admin/models/forms/layout.xml
+++ b/admin/models/forms/layout.xml
@@ -4,217 +4,221 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_LAYOUT_YES
- COM_COMPONENTBUILDER_LAYOUT_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_LAYOUT_YES
+
+ COM_COMPONENTBUILDER_LAYOUT_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml
index fbaf9e792..369531180 100644
--- a/admin/models/forms/library.xml
+++ b/admin/models/forms/library.xml
@@ -4,331 +4,320 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_LIBRARY_MAIN
- COM_COMPONENTBUILDER_LIBRARY_BUNDLE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_LIBRARY_MAIN
+
+ COM_COMPONENTBUILDER_LIBRARY_BUNDLE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/library_config.xml b/admin/models/forms/library_config.xml
index 7b1f5e582..def3e6c41 100644
--- a/admin/models/forms/library_config.xml
+++ b/admin/models/forms/library_config.xml
@@ -4,142 +4,155 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/library_files_folders_urls.xml b/admin/models/forms/library_files_folders_urls.xml
index 79dacfe67..3f2b924c7 100644
--- a/admin/models/forms/library_files_folders_urls.xml
+++ b/admin/models/forms/library_files_folders_urls.xml
@@ -4,362 +4,365 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/server.xml b/admin/models/forms/server.xml
index 5bc1421b9..791105fa1 100644
--- a/admin/models/forms/server.xml
+++ b/admin/models/forms/server.xml
@@ -4,253 +4,282 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION
- COM_COMPONENTBUILDER_SERVER_FTP
- COM_COMPONENTBUILDER_SERVER_SFTP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION
- COM_COMPONENTBUILDER_SERVER_PASSWORD
- COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_FILE_PATH
- COM_COMPONENTBUILDER_SERVER_BOTH_PASSWORD_PRIVATE_KEY_FILE_PATH
- COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_TEXT_FIELD
- COM_COMPONENTBUILDER_SERVER_BOTH_PASSWORD_PRIVATE_KEY_TEXT_FIELD
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION
+
+ COM_COMPONENTBUILDER_SERVER_FTP
+
+ COM_COMPONENTBUILDER_SERVER_SFTP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION
+
+ COM_COMPONENTBUILDER_SERVER_PASSWORD
+
+ COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_FILE_PATH
+
+ COM_COMPONENTBUILDER_SERVER_BOTH_PASSWORD_PRIVATE_KEY_FILE_PATH
+
+ COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_TEXT_FIELD
+
+ COM_COMPONENTBUILDER_SERVER_BOTH_PASSWORD_PRIVATE_KEY_TEXT_FIELD
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/site_view.xml b/admin/models/forms/site_view.xml
index cdcbb9c03..727e5b64b 100644
--- a/admin/models/forms/site_view.xml
+++ b/admin/models/forms/site_view.xml
@@ -4,877 +4,1178 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_NONE
- COM_COMPONENTBUILDER_SITE_VIEW_TOP_RIGHT
- COM_COMPONENTBUILDER_SITE_VIEW_TOP_LEFT
- COM_COMPONENTBUILDER_SITE_VIEW_BOTTOM_RIGHT
- COM_COMPONENTBUILDER_SITE_VIEW_BOTTOM_LEFT
- COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_SITE_VIEW_YES
- COM_COMPONENTBUILDER_SITE_VIEW_NO
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NONE
+
+ COM_COMPONENTBUILDER_SITE_VIEW_TOP_RIGHT
+
+ COM_COMPONENTBUILDER_SITE_VIEW_TOP_LEFT
+
+ COM_COMPONENTBUILDER_SITE_VIEW_BOTTOM_RIGHT
+
+ COM_COMPONENTBUILDER_SITE_VIEW_BOTTOM_LEFT
+
+ COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_SITE_VIEW_YES
+
+ COM_COMPONENTBUILDER_SITE_VIEW_NO
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/snippet.xml b/admin/models/forms/snippet.xml
index 4cce0af32..9a724dd65 100644
--- a/admin/models/forms/snippet.xml
+++ b/admin/models/forms/snippet.xml
@@ -4,225 +4,250 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/snippet_type.xml b/admin/models/forms/snippet_type.xml
index 27562a661..7ca8620c3 100644
--- a/admin/models/forms/snippet_type.xml
+++ b/admin/models/forms/snippet_type.xml
@@ -4,110 +4,120 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/forms/template.xml b/admin/models/forms/template.xml
index c359edb8b..1e32a8c7e 100644
--- a/admin/models/forms/template.xml
+++ b/admin/models/forms/template.xml
@@ -4,217 +4,221 @@
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
-
-
-
-
-
-
-
-
-
- JPUBLISHED
- JUNPUBLISHED
- JARCHIVED
- JTRASHED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_TEMPLATE_YES
- COM_COMPONENTBUILDER_TEMPLATE_NO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ JPUBLISHED
+
+ JUNPUBLISHED
+
+ JARCHIVED
+
+ JTRASHED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_TEMPLATE_YES
+
+ COM_COMPONENTBUILDER_TEMPLATE_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index de272cfe7..cd3079c57 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -713,86 +713,91 @@ class ComponentbuilderModelJoomla_components extends JModelList
*/
protected function smartExportBuilder()
{
- // set db data
- $data = serialize($this->smartExport);
- // lock the data if set
- if (ComponentbuilderHelper::checkArray($this->key))
+ // check if data is set
+ if (isset($this->smartExport) && ComponentbuilderHelper::checkArray($this->smartExport))
{
- // lock the data
- $this->key = md5(implode('', $this->key));
- $locker = new FOFEncryptAes($this->key, 128);
- $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);
- // making provision for future changes
- if (count($this->exportBuyLinks) == 1)
+ // set db data
+ $data = serialize($this->smartExport);
+ // lock the data if set
+ if (ComponentbuilderHelper::checkArray($this->key))
{
- $this->info['getKeyFrom']['buy_links'] = $this->exportBuyLinks;
+ // lock the data
+ $this->key = md5(implode('', $this->key));
+ $locker = new FOFEncryptAes($this->key, 128);
+ $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);
+ // making provision for future changes
+ if (count($this->exportBuyLinks) == 1)
+ {
+ $this->info['getKeyFrom']['buy_links'] = $this->exportBuyLinks;
+ }
+ else
+ {
+ // use global if more then one component is exported, or if none has a buy link
+ $this->info['getKeyFrom']['buy_link'] = $this->params->get('export_buy_link', null);
+ }
+ $this->info['getKeyFrom']['package_links'] = $this->exportPackageLinks;
}
else
{
- // use global if more then one component is exported, or if none has a buy link
- $this->info['getKeyFrom']['buy_link'] = $this->params->get('export_buy_link', null);
+ // Set the owner information
+ $data = base64_encode($data);
}
- $this->info['getKeyFrom']['package_links'] = $this->exportPackageLinks;
- }
- else
- {
- // Set the owner information
- $data = base64_encode($data);
- }
- // set the path
- $dbPath = $this->packagePath . '/db.vdm';
- // write the db data to file in package
- if (!ComponentbuilderHelper::writeFile($dbPath, wordwrap($data, 128, "\n", true)))
- {
- return false;
- }
- // set info data
- $locker = new FOFEncryptAes('V4stD3vel0pmEntMethOd@YoUrS3rv!s', 128);
- $info = $locker->encryptString(json_encode($this->info));
- // set the path
- $infoPath = $this->packagePath . '/info.vdm';
- // write the db data to file in package
- if (!ComponentbuilderHelper::writeFile($infoPath, wordwrap($info, 128, "\n", true)))
- {
- return false;
- }
- // lock all files
- $this->lockFiles();
- // remove old zip files with the same name
- if (JFile::exists($this->zipPath))
- {
- // remove file if found
- JFile::delete($this->zipPath);
- }
- // zip the folder
- if (!ComponentbuilderHelper::zip($this->packagePath, $this->zipPath))
- {
- return false;
- }
- // move to remote server if needed
- if (2 == $this->backupType)
- {
- if (!ComponentbuilderHelper::moveToServer($this->zipPath, $this->packageName.'.zip', $this->backupServer, null, 'joomla_component.export'))
+ // set the path
+ $dbPath = $this->packagePath . '/db.vdm';
+ // write the db data to file in package
+ if (!ComponentbuilderHelper::writeFile($dbPath, wordwrap($data, 128, "\n", true)))
{
return false;
}
- // remove the local file
- JFile::delete($this->zipPath);
+ // set info data
+ $locker = new FOFEncryptAes('V4stD3vel0pmEntMethOd@YoUrS3rv!s', 128);
+ $info = $locker->encryptString(json_encode($this->info));
+ // set the path
+ $infoPath = $this->packagePath . '/info.vdm';
+ // write the db data to file in package
+ if (!ComponentbuilderHelper::writeFile($infoPath, wordwrap($info, 128, "\n", true)))
+ {
+ return false;
+ }
+ // lock all files
+ $this->lockFiles();
+ // remove old zip files with the same name
+ if (JFile::exists($this->zipPath))
+ {
+ // remove file if found
+ JFile::delete($this->zipPath);
+ }
+ // zip the folder
+ if (!ComponentbuilderHelper::zip($this->packagePath, $this->zipPath))
+ {
+ return false;
+ }
+ // move to remote server if needed
+ if (2 == $this->backupType)
+ {
+ if (!ComponentbuilderHelper::moveToServer($this->zipPath, $this->packageName.'.zip', $this->backupServer, null, 'joomla_component.export'))
+ {
+ return false;
+ }
+ // remove the local file
+ JFile::delete($this->zipPath);
+ }
+ // remove the folder
+ if (!ComponentbuilderHelper::removeFolder($this->packagePath))
+ {
+ return false;
+ }
+ return true;
}
- // remove the folder
- if (!ComponentbuilderHelper::removeFolder($this->packagePath))
- {
- return false;
- }
- return true;
+ return false;
}
/**
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 8cd1f1ba8..233730d40 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 11th March, 2018
+ 18th March, 2018
Llewellyn van der Merwe
llewellyn@joomlacomponentbuilder.com
http://joomlacomponentbuilder.com
diff --git a/script.php b/script.php
index 3a85c9e1f..7ad675e0f 100644
--- a/script.php
+++ b/script.php
@@ -3594,7 +3594,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","percentagelanguageadd":"50","set_browser_storage":"1","storage_time_to_live":"global","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","minify":"0","percentagelanguageadd":"50","compiler_field_builder_type":"2","set_browser_storage":"1","storage_time_to_live":"global","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(
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index 014e20207..fb2a7e361 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -620,16 +620,19 @@ abstract class ComponentbuilderHelper
}
/**
- * get the localkey
+ * the basic localkey
**/
protected static $localkey = false;
-
+
+ /**
+ * get the localkey
+ **/
public static function getLocalKey()
{
if (!self::$localkey)
{
- // get the main key
- self::$localkey = md5(JComponentHelper::getParams('com_componentbuilder')->get('basic_key', 'localKey34fdWEkl'));
+ // get the basic key
+ self::$localkey = md5(self::getCryptKey('basic', 'localKey34fdWEkl'));
}
return self::$localkey;
}
@@ -702,8 +705,18 @@ abstract class ComponentbuilderHelper
}
return false;
}
-
- public static function getBetween($content,$start,$end)
+
+ /**
+ * get between
+ *
+ * @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
+ *
+ */
+ public static function getBetween($content, $start, $end)
{
$r = explode($start, $content);
if (isset($r[1]))
@@ -713,17 +726,32 @@ abstract class ComponentbuilderHelper
}
return '';
}
-
- public static function getAllBetween($content,$start,$end)
+
+ /**
+ * get all between
+ *
+ * @param string $content The content to search
+ * @param string $start The starting value
+ * @param string $end The ending value
+ *
+ * @return array On success
+ *
+ */
+ public static function getAllBetween($content, $start, $end)
{
- $buket = array();
+ // reset bucket
+ $bucket = array();
for ($i = 0; ; $i++)
{
+ // search for string
$found = self::getBetween($content,$start,$end);
if (self::checkString($found))
{
- $buket[] = $found;
+ // add to bucket
+ $bucket[] = $found;
+ // build removal string
$remove = $start.$found.$end;
+ // remove from content
$content = str_replace($remove,'',$content);
}
else
@@ -736,9 +764,10 @@ abstract class ComponentbuilderHelper
break;
}
}
- return array_unique($buket);
+ // only return unique array of values
+ return array_unique($bucket);
}
-
+
public static function typeField($type,$option = 'default')
{
// list of default fields
@@ -1560,6 +1589,7 @@ abstract class ComponentbuilderHelper
// return the object
return self::$CRYPT[$TYPE];
}
+
public static function jsonToString($value, $sperator = ", ", $table = null)
{