Fixed gh-434 to add the missing table path if not set. Resolved gh-427 to allow numbers in the name of a field. Impoved the compiler by adding a method to set the Lang Content array.
This commit is contained in:
parent
b9c758b800
commit
9e6233c64f
@ -146,12 +146,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 1st July, 2019
|
||||
+ *Last Build*: 4th July, 2019
|
||||
+ *Version*: 2.9.20
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **211430**
|
||||
+ *Field count*: **1142**
|
||||
+ *Line count*: **211563**
|
||||
+ *Field count*: **1143**
|
||||
+ *File count*: **1346**
|
||||
+ *Folder count*: **209**
|
||||
|
||||
|
@ -146,12 +146,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 1st July, 2019
|
||||
+ *Last Build*: 4th July, 2019
|
||||
+ *Version*: 2.9.20
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **211430**
|
||||
+ *Field count*: **1142**
|
||||
+ *Line count*: **211563**
|
||||
+ *Field count*: **1143**
|
||||
+ *File count*: **1346**
|
||||
+ *Folder count*: **209**
|
||||
|
||||
|
@ -496,38 +496,42 @@ abstract class ###Component###Helper
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = '###Component###', $config = array())
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array())
|
||||
{
|
||||
// fix the name
|
||||
$name = self::safeString($name);
|
||||
// full path
|
||||
$fullPath = $path . '/models';
|
||||
// set prefix
|
||||
$prefix = $component.'Model';
|
||||
// full path to models
|
||||
$fullPathModels = $path . '/models';
|
||||
// load the model file
|
||||
JModelLegacy::addIncludePath($fullPath, $prefix);
|
||||
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
|
||||
// make sure the table path is loaded
|
||||
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
|
||||
{
|
||||
// This is the JCB default path to tables in Joomla 3.x
|
||||
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
|
||||
}
|
||||
// get instance
|
||||
$model = JModelLegacy::getInstance($name, $prefix, $config);
|
||||
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
|
||||
// if model not found (strange)
|
||||
if ($model == false)
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
// get file path
|
||||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPath = $fullPath.'/'.$name.'.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPath))
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPath;
|
||||
require_once $fullPathModel;
|
||||
}
|
||||
// build class names
|
||||
$modelClass = $prefix.$name;
|
||||
$modelClass = $Component . 'Model' . $name;
|
||||
if (class_exists($modelClass))
|
||||
{
|
||||
// initialize the model
|
||||
|
@ -139,38 +139,42 @@ abstract class ###Component###Helper
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = '###Component###', $config = array())
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array())
|
||||
{
|
||||
// fix the name
|
||||
$name = self::safeString($name);
|
||||
// full path
|
||||
$fullPath = $path . '/models';
|
||||
// set prefix
|
||||
$prefix = $component.'Model';
|
||||
// full path to models
|
||||
$fullPathModels = $path . '/models';
|
||||
// load the model file
|
||||
JModelLegacy::addIncludePath($fullPath, $prefix);
|
||||
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
|
||||
// make sure the table path is loaded
|
||||
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
|
||||
{
|
||||
// This is the JCB default path to tables in Joomla 3.x
|
||||
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
|
||||
}
|
||||
// get instance
|
||||
$model = JModelLegacy::getInstance($name, $prefix, $config);
|
||||
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
|
||||
// if model not found (strange)
|
||||
if ($model == false)
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
// get file path
|
||||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPath = $fullPath.'/'.$name.'.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPath))
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPath;
|
||||
require_once $fullPathModel;
|
||||
}
|
||||
// build class names
|
||||
$modelClass = $prefix.$name;
|
||||
$modelClass = $Component . 'Model' . $name;
|
||||
if (class_exists($modelClass))
|
||||
{
|
||||
// initialize the model
|
||||
|
@ -249,6 +249,20 @@
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
|
||||
</field>
|
||||
<!-- Field_name_builder Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="field_name_builder"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
|
||||
<!-- Api Field. Type: User. (joomla) -->
|
||||
|
@ -1581,6 +1581,29 @@ class Get
|
||||
return $component;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the language content values to language content array
|
||||
*
|
||||
* @param string $target The target area for the language string
|
||||
* @param string $language The language key string
|
||||
* @param string $string The language string
|
||||
* @param boolean $addPrefix The switch to add langPrefix
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function setLangContent($target, $language, $string, $addPrefix = false)
|
||||
{
|
||||
if ($addPrefix && !isset($this->langContent[$target][$this->langPrefix . '_' . $language]))
|
||||
{
|
||||
$this->langContent[$target][$this->langPrefix . '_' . $language] = trim($string);
|
||||
}
|
||||
elseif (!isset($this->langContent[$target][$language]))
|
||||
{
|
||||
$this->langContent[$target][$language] = trim($string);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Admin View Data
|
||||
*
|
||||
@ -1708,7 +1731,7 @@ class Get
|
||||
$tab['name'] = (isset($tab['name']) && ComponentbuilderHelper::checkString($tab['name'])) ? $tab['name'] : 'Tab';
|
||||
// set lang
|
||||
$tab['lang'] = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tab['view'], 'U') . '_' . ComponentbuilderHelper::safeString($tab['name'], 'U');
|
||||
$this->langContent['both'][$tab['lang']] = trim($tab['name']);
|
||||
$this->setLangContent('both', $tab['lang'], $tab['name']);
|
||||
// set code name
|
||||
$tab['code'] = ComponentbuilderHelper::safeString($tab['name']);
|
||||
// check if the permissions for the tab should be added
|
||||
@ -1747,8 +1770,8 @@ class Get
|
||||
$tab['lang_permission'] = $tab['lang'] . '_TAB_PERMISSION';
|
||||
$tab['lang_permission_desc'] = $tab['lang'] . '_TAB_PERMISSION_DESC';
|
||||
$tab['lang_permission_title'] = $this->placeholders[$this->hhh . 'Views' . $this->hhh] . ' View ' . $tab['name'] . ' Tab';
|
||||
$this->langContent['both'][$tab['lang_permission']] = $tab['lang_permission_title'];
|
||||
$this->langContent['both'][$tab['lang_permission_desc']] = 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh];
|
||||
$this->setLangContent('both', $tab['lang_permission'], $tab['lang_permission_title']);
|
||||
$this->setLangContent('both', $tab['lang_permission_desc'], 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh]);
|
||||
// set the sort key
|
||||
$tab['sortKey'] = ComponentbuilderHelper::safeString($tab['lang_permission_title']);
|
||||
}
|
||||
@ -2036,7 +2059,7 @@ class Get
|
||||
if ('default' !== $check_column_name)
|
||||
{
|
||||
$column_name_lang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($name_list, 'U') . '_' . ComponentbuilderHelper::safeString($relationsValue['column_name'], 'U');
|
||||
$this->langContent['admin'][$column_name_lang] = trim($relationsValue['column_name']);
|
||||
$this->setLangContent('admin', $column_name_lang, $relationsValue['column_name']);
|
||||
$this->listHeadOverRide[$name_list][(int) $relationsValue['listfield']] = $column_name_lang;
|
||||
}
|
||||
}
|
||||
@ -4369,12 +4392,11 @@ class Get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// only load if string is not already set
|
||||
// build lang key
|
||||
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
|
||||
if (!isset($this->langContent[$this->lang][$keyLang]))
|
||||
{
|
||||
$this->langContent[$this->lang][$keyLang] = trim($string);
|
||||
}
|
||||
// set the language string
|
||||
$this->setLangContent($this->lang, $keyLang, $string);
|
||||
|
||||
return $keyLang;
|
||||
}
|
||||
|
||||
@ -6334,12 +6356,10 @@ class Get
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// only load if string is not already set
|
||||
// build lang key
|
||||
$keyLang = $this->langPrefix . '_' . $_keyLang;
|
||||
if (!isset($this->langContent[$this->lang][$keyLang]))
|
||||
{
|
||||
$this->langContent[$this->lang][$keyLang] = trim($lang);
|
||||
}
|
||||
// set lang content string
|
||||
$this->setLangContent($this->lang, $keyLang, $lang);
|
||||
// reverse the placeholders
|
||||
foreach ($langStringTargets as $langStringTarget)
|
||||
{
|
||||
|
@ -380,42 +380,42 @@ class Fields extends Structure
|
||||
$langView = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
|
||||
$langViews = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
|
||||
// set default lang
|
||||
$this->langContent[$this->lang][$langView] = $view['settings']->name_single;
|
||||
$this->langContent[$this->lang][$langViews] = $view['settings']->name_list;
|
||||
$this->setLangContent($this->lang, $langView, $view['settings']->name_single);
|
||||
$this->setLangContent($this->lang, $langViews, $view['settings']->name_list);
|
||||
// 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.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_0'] = "No " . $view['settings']->name_single . " successfully checked in.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_1'] = "%d " . $view['settings']->name_single . " successfully checked in.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_MORE'] = "%d " . $view['settings']->name_list . " successfully checked in.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED'] = "%s " . $view['settings']->name_list . " deleted.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED_1'] = "%s " . $view['settings']->name_single . " deleted.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED'] = "%s " . $view['settings']->name_list . " featured.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED_1'] = "%s " . $view['settings']->name_single . " featured.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED'] = "%s " . $view['settings']->name_list . " published.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED_1'] = "%s " . $view['settings']->name_single . " published.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED'] = "%s " . $view['settings']->name_list . " trashed.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED_1'] = "%s " . $view['settings']->name_single . " trashed.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED'] = "%s " . $view['settings']->name_list . " unfeatured.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED_1'] = "%s " . $view['settings']->name_single . " unfeatured.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED'] = "%s " . $view['settings']->name_list . " unpublished.";
|
||||
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED_1'] = "%s " . $view['settings']->name_single . " unpublished.";
|
||||
$this->langContent[$this->lang][$langViews . '_BATCH_OPTIONS'] = "Batch process the selected " . $view['settings']->name_list;
|
||||
$this->langContent[$this->lang][$langViews . '_BATCH_TIP'] = "All changes will be applied to all selected " . $view['settings']->name_list;
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED', "%s " . $view['settings']->name_list . " archived.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED_1', "%s " . $view['settings']->name_single . " archived.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_0', "No " . $view['settings']->name_single . " successfully checked in.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_1', "%d " . $view['settings']->name_single . " successfully checked in.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_MORE', "%d " . $view['settings']->name_list . " successfully checked in.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED', "%s " . $view['settings']->name_list . " deleted.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED_1', "%s " . $view['settings']->name_single . " deleted.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED', "%s " . $view['settings']->name_list . " featured.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED_1', "%s " . $view['settings']->name_single . " featured.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED', "%s " . $view['settings']->name_list . " published.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED_1', "%s " . $view['settings']->name_single . " published.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED', "%s " . $view['settings']->name_list . " trashed.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED_1', "%s " . $view['settings']->name_single . " trashed.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED', "%s " . $view['settings']->name_list . " unfeatured.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED_1', "%s " . $view['settings']->name_single . " unfeatured.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED', "%s " . $view['settings']->name_list . " unpublished.");
|
||||
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED_1', "%s " . $view['settings']->name_single . " unpublished.");
|
||||
$this->setLangContent($this->lang, $langViews . '_BATCH_OPTIONS', "Batch process the selected " . $view['settings']->name_list);
|
||||
$this->setLangContent($this->lang, $langViews . '_BATCH_TIP', "All changes will be applied to all selected " . $view['settings']->name_list);
|
||||
// set some basic defaults
|
||||
$this->langContent[$this->lang][$langView . '_ERROR_UNIQUE_ALIAS'] = "Another " . $view['settings']->name_single . " has the same alias.";
|
||||
$this->langContent[$this->lang][$langView . '_CREATED_DATE_LABEL'] = "Created Date";
|
||||
$this->langContent[$this->lang][$langView . '_CREATED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was created.";
|
||||
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_LABEL'] = "Modified Date";
|
||||
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was modified.";
|
||||
$this->langContent[$this->lang][$langView . '_CREATED_BY_LABEL'] = "Created By";
|
||||
$this->langContent[$this->lang][$langView . '_CREATED_BY_DESC'] = "The user that created this " . $view['settings']->name_single . ".";
|
||||
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_LABEL'] = "Modified By";
|
||||
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_DESC'] = "The last user that modified this " . $view['settings']->name_single . ".";
|
||||
$this->langContent[$this->lang][$langView . '_ORDERING_LABEL'] = "Ordering";
|
||||
$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.";
|
||||
$this->setLangContent($this->lang, $langView . '_ERROR_UNIQUE_ALIAS', "Another " . $view['settings']->name_single . " has the same alias.");
|
||||
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_LABEL', "Created Date");
|
||||
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_DESC', "The date this " . $view['settings']->name_single . " was created.");
|
||||
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_LABEL', "Modified Date");
|
||||
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_DESC', "The date this " . $view['settings']->name_single . " was modified.");
|
||||
$this->setLangContent($this->lang, $langView . '_CREATED_BY_LABEL', "Created By");
|
||||
$this->setLangContent($this->lang, $langView . '_CREATED_BY_DESC', "The user that created this " . $view['settings']->name_single . ".");
|
||||
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_LABEL', "Modified By");
|
||||
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_DESC', "The last user that modified this " . $view['settings']->name_single . ".");
|
||||
$this->setLangContent($this->lang, $langView . '_ORDERING_LABEL', "Ordering");
|
||||
$this->setLangContent($this->lang, $langView . '_VERSION_LABEL', "Revision");
|
||||
$this->setLangContent($this->lang, $langView . '_VERSION_DESC', "A count of the number of times this " . $view['settings']->name_single . " has been revised.");
|
||||
$this->setLangContent($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.");
|
||||
// check what type of field builder to use
|
||||
if ($this->fieldBuilderType == 1)
|
||||
{
|
||||
@ -1214,7 +1214,7 @@ class Fields extends Structure
|
||||
if ($setType === 'option')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<field";
|
||||
$optionSet = '';
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
@ -1236,9 +1236,9 @@ class Fields extends Structure
|
||||
{
|
||||
// has other value then text
|
||||
list($v, $t) = explode('|', $option);
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
$this->setLangContent($this->lang, $langValue, $t);
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
|
||||
$optionArray[$v] = $langValue;
|
||||
@ -1246,9 +1246,9 @@ class Fields extends Structure
|
||||
else
|
||||
{
|
||||
// text is also the value
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $option;
|
||||
$this->setLangContent($this->lang, $langValue, $option);
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $option . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$option] = $langValue;
|
||||
@ -1262,9 +1262,9 @@ class Fields extends Structure
|
||||
{
|
||||
// has other value then text
|
||||
list($v, $t) = explode('|', $value);
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
$this->setLangContent($this->lang, $langValue, $t);
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$v] = $langValue;
|
||||
@ -1272,9 +1272,9 @@ class Fields extends Structure
|
||||
else
|
||||
{
|
||||
// text is also the value
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $value;
|
||||
$this->setLangContent($this->lang, $langValue, $value);
|
||||
// no add to option set
|
||||
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $value . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
|
||||
$optionArray[$value] = $langValue;
|
||||
@ -1306,7 +1306,7 @@ class Fields extends Structure
|
||||
elseif ($setType === 'plain')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1320,7 +1320,7 @@ class Fields extends Structure
|
||||
elseif ($setType === 'spacer')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1337,7 +1337,7 @@ class Fields extends Structure
|
||||
if ($typeName === 'repeatable')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . "<field";
|
||||
$fieldsSet = array();
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
@ -1412,9 +1412,9 @@ class Fields extends Structure
|
||||
// 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');
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
|
||||
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
|
||||
// if label was set use instead
|
||||
if (ComponentbuilderHelper::checkString($r_langLabel))
|
||||
{
|
||||
@ -1437,7 +1437,7 @@ class Fields extends Structure
|
||||
elseif ($typeName === 'subform')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
|
||||
$fieldsSet = array();
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
@ -1529,9 +1529,9 @@ class Fields extends Structure
|
||||
// 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');
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
|
||||
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
|
||||
// if label was set use instead
|
||||
if (ComponentbuilderHelper::checkString($r_langLabel))
|
||||
{
|
||||
@ -1553,7 +1553,7 @@ class Fields extends Structure
|
||||
elseif ($setType === 'custom')
|
||||
{
|
||||
// now add to the field set
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
|
||||
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1602,7 +1602,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1624,9 +1624,9 @@ class Fields extends Structure
|
||||
{
|
||||
// has other value then text
|
||||
list($v, $t) = explode('|', $option);
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
$this->setLangContent($this->lang, $langValue, $t);
|
||||
// no add to option set
|
||||
$optionXML->addAttribute('value', $v);
|
||||
$optionArray[$v] = $langValue;
|
||||
@ -1634,9 +1634,9 @@ class Fields extends Structure
|
||||
else
|
||||
{
|
||||
// text is also the value
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $option;
|
||||
$this->setLangContent($this->lang, $langValue, $option);
|
||||
// no add to option set
|
||||
$optionXML->addAttribute('value', $option);
|
||||
$optionArray[$option] = $langValue;
|
||||
@ -1652,9 +1652,9 @@ class Fields extends Structure
|
||||
{
|
||||
// has other value then text
|
||||
list($v, $t) = explode('|', $value);
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $t;
|
||||
$this->setLangContent($this->lang, $langValue, $t);
|
||||
// no add to option set
|
||||
$optionXML->addAttribute('value', $v);
|
||||
$optionArray[$v] = $langValue;
|
||||
@ -1662,9 +1662,9 @@ class Fields extends Structure
|
||||
else
|
||||
{
|
||||
// text is also the value
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $value;
|
||||
$this->setLangContent($this->lang, $langValue, $value);
|
||||
// no add to option set
|
||||
$optionXML->addAttribute('value', $value);
|
||||
$optionArray[$value] = $langValue;
|
||||
@ -1683,7 +1683,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1697,7 +1697,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
|
||||
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1714,7 +1714,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
|
||||
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1791,9 +1791,9 @@ class Fields extends Structure
|
||||
// now add to the field set
|
||||
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||
// set lang (just incase)
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
|
||||
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
|
||||
// if label was set use instead
|
||||
if (ComponentbuilderHelper::checkString($r_langLabel))
|
||||
{
|
||||
@ -1814,7 +1814,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
|
||||
// add all properties
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
@ -1918,9 +1918,9 @@ class Fields extends Structure
|
||||
// now add to the field set
|
||||
ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
|
||||
// set lang (just incase)
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
|
||||
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
|
||||
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
|
||||
// if label was set use instead
|
||||
if (ComponentbuilderHelper::checkString($r_langLabel))
|
||||
{
|
||||
@ -1942,7 +1942,7 @@ class Fields extends Structure
|
||||
{
|
||||
// now add to the field set
|
||||
$field->fieldXML = new SimpleXMLElement('<field/>');
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
|
||||
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
|
||||
foreach ($fieldAttributes as $property => $value)
|
||||
{
|
||||
if ($property != 'option')
|
||||
@ -2328,9 +2328,9 @@ class Fields extends Structure
|
||||
$customLabel = $xmlValue;
|
||||
}
|
||||
// set lang key
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($name . ' ' . $property['name'], 'U');
|
||||
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($name . ' ' . $property['name'], true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$langValue] = $xmlValue;
|
||||
$this->setLangContent($this->lang, $langValue, $xmlValue);
|
||||
// use lang value
|
||||
$xmlValue = $langValue;
|
||||
}
|
||||
@ -2560,16 +2560,16 @@ class Fields extends Structure
|
||||
$tempName = $view_name_single . ' category';
|
||||
}
|
||||
// set lang
|
||||
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
|
||||
$listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
|
||||
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
|
||||
}
|
||||
else
|
||||
{
|
||||
// set lang (just incase)
|
||||
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
|
||||
$listLangName = $langView . '_' .ComponentbuilderHelper::safeFieldName($name, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($name, 'W');
|
||||
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($name, 'W'));
|
||||
// if label was set use instead
|
||||
if (ComponentbuilderHelper::checkString($langLabel))
|
||||
{
|
||||
@ -3009,9 +3009,9 @@ class Fields extends Structure
|
||||
// temp holder for name
|
||||
$tempName = $data['custom']['label'] . ' Group';
|
||||
// set lang
|
||||
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
|
||||
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
|
||||
// add to lang array
|
||||
$this->langContent[$this->lang][$groupLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
|
||||
$this->setLangContent($this->lang, $groupLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
|
||||
// build the Group Control
|
||||
$this->setGroupControl[$data['type']] = $groupLangName;
|
||||
// JFORM_GETGROUPS_PHP <<<DYNAMIC>>>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -628,14 +628,8 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'sviews' . $this->hhh] = $view['settings']->code;
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SVIEWS' . $this->hhh] = $view['settings']->CODE;
|
||||
// add to lang array
|
||||
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE]))
|
||||
{
|
||||
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
|
||||
}
|
||||
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
|
||||
{
|
||||
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
|
||||
}
|
||||
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
|
||||
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
|
||||
// ICOMOON <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
|
||||
|
||||
@ -929,14 +923,8 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_AFTER_GET_ITEMS' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
|
||||
}
|
||||
// add to lang array
|
||||
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
|
||||
{
|
||||
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
|
||||
}
|
||||
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
|
||||
{
|
||||
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
|
||||
}
|
||||
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
|
||||
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
|
||||
// SITE_CUSTOM_METHODS <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] = $this->setCustomViewCustomItemMethods($view['settings']->main_get, $view['settings']->code);
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] .= $this->setCustomViewCustomMethods($view, $view['settings']->code);
|
||||
|
@ -133,18 +133,20 @@ abstract class ComponentbuilderHelper
|
||||
* Making field names safe
|
||||
*
|
||||
* @input string The you would like to make safe
|
||||
* @input boolean The switch to return an ALL UPPER CASE string
|
||||
* @input string The string to use in white space
|
||||
*
|
||||
* @returns string on success
|
||||
**/
|
||||
public static function safeFieldName($string, $spacer = '_')
|
||||
public static function safeFieldName($string, $allcap = false, $spacer = '_')
|
||||
{
|
||||
// get global value
|
||||
if (self::$fieldNameBuilder === false)
|
||||
{
|
||||
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 0); // change this to 1 for testing the new convention
|
||||
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 1);
|
||||
}
|
||||
// use the new convention
|
||||
if (1 == self::$fieldNameBuilder)
|
||||
if (2 == self::$fieldNameBuilder)
|
||||
{
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
@ -162,12 +164,22 @@ abstract class ComponentbuilderHelper
|
||||
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
|
||||
// replace white space with underscore (SAFEST OPTION)
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all caps
|
||||
if ($allcap)
|
||||
{
|
||||
return strtoupper($string);
|
||||
}
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
// return all caps
|
||||
if ($allcap)
|
||||
{
|
||||
return self::safeString($string, 'U');
|
||||
}
|
||||
// use the default (original behaviour/convention)
|
||||
return self::safeString($string);
|
||||
}
|
||||
@ -5526,38 +5538,42 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Componentbuilder', $config = array())
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Componentbuilder', $config = array())
|
||||
{
|
||||
// fix the name
|
||||
$name = self::safeString($name);
|
||||
// full path
|
||||
$fullPath = $path . '/models';
|
||||
// set prefix
|
||||
$prefix = $component.'Model';
|
||||
// full path to models
|
||||
$fullPathModels = $path . '/models';
|
||||
// load the model file
|
||||
JModelLegacy::addIncludePath($fullPath, $prefix);
|
||||
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
|
||||
// make sure the table path is loaded
|
||||
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
|
||||
{
|
||||
// This is the JCB default path to tables in Joomla 3.x
|
||||
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
|
||||
}
|
||||
// get instance
|
||||
$model = JModelLegacy::getInstance($name, $prefix, $config);
|
||||
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
|
||||
// if model not found (strange)
|
||||
if ($model == false)
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
// get file path
|
||||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPath = $fullPath.'/'.$name.'.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPath))
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPath;
|
||||
require_once $fullPathModel;
|
||||
}
|
||||
// build class names
|
||||
$modelClass = $prefix.$name;
|
||||
$modelClass = $Component . 'Model' . $name;
|
||||
if (class_exists($modelClass))
|
||||
{
|
||||
// initialize the model
|
||||
|
@ -549,7 +549,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_DESCRIPTION="null & zero values"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_LABEL="Allow"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="ARCHIVE"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_ARMSCIIEIGHT_ARMENIAN_MOST_SUITABLE_COLLATION_ARMSCIIEIGHT_GENERAL_CI="armscii8 - ARMSCII-8 Armenian (most suitable collation = armscii8_general_ci)"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_BIN_CHARSET_ARMSCIIEIGHT="armscii8_bin (charset = armscii8)"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_GENERAL_CI_CHARSET_ARMSCIIEIGHT="armscii8_general_ci (charset = armscii8)"
|
||||
@ -1173,7 +1173,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_TISSIX_HUNDRED_AND_TWENTY_TISSIX_HUNDRED_AND_TWE
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TREE="Tree"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TREE_TWO="Tree 2"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE="Type"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="for list target"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="Set the type of view"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL="Type"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_BIN_CHARSET_UCSTWO="ucs2_bin (charset = ucs2)"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_CROATIAN_CI_CHARSET_UCSTWO="ucs2_croatian_ci (charset = ucs2)"
|
||||
@ -2767,7 +2767,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_MESSAGE="Error! Please add url here."
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESC="A count of the number of times this Component Updates has been revised."
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESCRIPTION="1.0.0"
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_HINT="1.0.0"
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="SQL Update Version"
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="Revision"
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE="Version Update"
|
||||
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!"
|
||||
@ -2778,6 +2778,7 @@ COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
|
||||
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
|
||||
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
|
||||
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
|
||||
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
|
||||
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info"
|
||||
@ -2999,6 +3000,8 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_HINT="http://www.example.com"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL="Website"
|
||||
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_MESSAGE="Error! Please add website here."
|
||||
COM_COMPONENTBUILDER_CONFIG_FALSE="False"
|
||||
COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like <em>1</em> becomes <b>one</b>.<br />Alphanumeric keeps the numbers unconverted unless it is at the beginning of the field name.<br />Should you change this it will cause a database updates <i>(during your next compilation)</i> for all fields that has numbers in the name of the field. So it is really not a good idea to change this option every so often, you should rather select what you would like to use and keep it like that.<br />All VDM/JCB components work on the <b>Default</b> option."
|
||||
COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL="Field Name Builder<br /><small>(in compiler)</small>"
|
||||
COM_COMPONENTBUILDER_CONFIG_FLAT_LOAD="Flat"
|
||||
COM_COMPONENTBUILDER_CONFIG_FOLDER_PATHS="Folder Paths"
|
||||
COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force"
|
||||
@ -3159,7 +3162,7 @@ COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
|
||||
COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER="Could not clear the tmp folder!"
|
||||
COM_COMPONENTBUILDER_CREATE="Create"
|
||||
COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet"
|
||||
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
|
||||
COM_COMPONENTBUILDER_CREATE_NEW_S="Create new %s"
|
||||
COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
|
||||
@ -4027,7 +4030,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_DESCRIPTION="The type of filter you
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_LABEL="Filter Type"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_FUNCTIONVAR="FunctionVar"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_G="g"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="Getcustom"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="getCustom"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOMS="getCustoms"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_DESCRIPTION="Set the Method name for this dynamic get."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_HINT="getMethodName"
|
||||
@ -4095,10 +4098,10 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_MULTIPLE="Multiple"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_N="n"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME="Name"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="The variable name."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="variableName"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="Enter Name Here"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="Name Here"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_LABEL="Name"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add variable name here."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NEW="A New Dynamic Get"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NN="nn"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NO="No"
|
||||
@ -4198,7 +4201,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_TAGS="Tags"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_THIS="This"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_TT="tt"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_TWEAK="Tweak"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Set Type"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Type"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_U="u"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_USER="User"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_USER_GROUPS="User Groups"
|
||||
@ -4876,7 +4879,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_MESSAGE="Error! Please add title here."
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE="Type"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type."
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL="Type"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="Url"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="URL"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_DESCRIPTION="Enter url"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_HINT="http://www.example.com"
|
||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_LABEL="URL"
|
||||
@ -4947,7 +4950,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import
|
||||
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates."
|
||||
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES="Select the file to import data to validation_rules."
|
||||
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL="Enter file URL"
|
||||
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful."
|
||||
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Import Success!"
|
||||
COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns"
|
||||
COM_COMPONENTBUILDER_IMPORT_TITLE="Data Importer"
|
||||
COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found."
|
||||
@ -5169,10 +5172,10 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT="Editing the Joomla Component"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL="Email"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Email"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="demo@example.com"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Email"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please add email address here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Author Email"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="Author Email Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Author Email"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please author email address here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS="Emptycontributors"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a list of empty contributor fields should be added."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields"
|
||||
@ -5236,9 +5239,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_HINT="codename"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL="Name in Code"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_MESSAGE="Error! Please add name in code here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION="Enter Name Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Component Name"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Name Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_LABEL="Name"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add component name here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW="A New Joomla Component"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO="No"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE="None"
|
||||
@ -5252,8 +5255,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION="
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL="Dynamic Builder (mySql) Option"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_DESCRIPTION="You can add custom files and folders to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here.<span id='jform_button_component_files_folders'></span>"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_LABEL="Adding Custom Files & Folder"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION="
|
||||
<div class='alert alert-warning'>
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION="<div class='alert alert-warning'>
|
||||
<h4>Feature not ready?</h4>
|
||||
<p>We are still working on this integration, so it is not fully ready. Hopefully with the next update.</p>
|
||||
</div>
|
||||
@ -5459,7 +5461,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="Revision"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Website"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Author Website"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE="Error! Please add website here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK="Whmcs Buy Link"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_DESCRIPTION="Enter link where your WHMCS License key can be bought."
|
||||
@ -5638,7 +5640,7 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT="Translated String Here"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translated String"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translation"
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_MESSAGE="Error! Please add translated string here."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_DESC="A count of the number of times this Language Translation has been revised."
|
||||
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_LABEL="Revision"
|
||||
@ -5764,7 +5766,7 @@ COM_COMPONENTBUILDER_LAYOUT_VERSION_LABEL="Revision"
|
||||
COM_COMPONENTBUILDER_LAYOUT_YES="Yes"
|
||||
COM_COMPONENTBUILDER_LEFT_IN_TAB="Left in Tab"
|
||||
COM_COMPONENTBUILDER_LEFT_OF_TABS="Left of Tabs"
|
||||
COM_COMPONENTBUILDER_LIBRARIES="Libraries"
|
||||
COM_COMPONENTBUILDER_LIBRARIES="libraries"
|
||||
COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access"
|
||||
COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries"
|
||||
COM_COMPONENTBUILDER_LIBRARIES_BATCH_OPTIONS="Batch process the selected Libraries"
|
||||
@ -5893,7 +5895,7 @@ COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_
|
||||
COM_COMPONENTBUILDER_LIBRARY_BEHAVIOUR="Behaviour"
|
||||
COM_COMPONENTBUILDER_LIBRARY_BUNDLE="Bundle"
|
||||
COM_COMPONENTBUILDER_LIBRARY_CHAIN="Chain"
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONFIG="Library Config"
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONFIG="Config"
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG="Addconfig"
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION="Setup config fields."
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_LABEL="Config"
|
||||
@ -5946,7 +5948,7 @@ COM_COMPONENTBUILDER_LIBRARY_EXCLUDE="exclude"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT="Options here"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL="Field Options"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILE="File"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Library Files, Folders & URLs"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Files, Folders & URLs"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES="Addfiles"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH="Addfilesfullpath"
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH_DESCRIPTION="Add files to this component using the full path."
|
||||
@ -6179,7 +6181,7 @@ COM_COMPONENTBUILDER_NONE_DB="None DB"
|
||||
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
|
||||
COM_COMPONENTBUILDER_NOTICE_BOARD="Notice Board"
|
||||
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
|
||||
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
|
||||
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
|
||||
COM_COMPONENTBUILDER_NOT_SET="not set"
|
||||
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
|
||||
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
|
||||
@ -7106,7 +7108,7 @@ COM_COMPONENTBUILDER_SNIPPET_SNIPPET="Snippet"
|
||||
COM_COMPONENTBUILDER_SNIPPET_SNIPPET_HINT="// Add the snippets code here"
|
||||
COM_COMPONENTBUILDER_SNIPPET_SNIPPET_LABEL="Snippet"
|
||||
COM_COMPONENTBUILDER_SNIPPET_STATUS="Status"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE="Snippet Type"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE="Type"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPES="Snippet Types"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types"
|
||||
@ -7147,7 +7149,7 @@ COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_DESC="The user that created this Sn
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_LABEL="Created By"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_DESC="The date this Snippet Type was created."
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_LABEL="Created Date"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Description"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Snippet Types"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_DESCRIPTION="Enter some description"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_HINT="Description Here"
|
||||
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL="Description"
|
||||
|
@ -215,11 +215,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -134,11 +134,18 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -87,11 +87,18 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -127,11 +127,18 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -113,11 +113,18 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -93,11 +93,18 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -238,11 +238,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -91,11 +91,18 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -104,11 +104,18 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -71,11 +71,18 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -137,11 +137,18 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -91,11 +91,18 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
*
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>1st July, 2019</creationDate>
|
||||
<creationDate>4th July, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -4124,7 +4124,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","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","field_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
);
|
||||
// Condition.
|
||||
$conditions = array(
|
||||
|
@ -133,18 +133,20 @@ abstract class ComponentbuilderHelper
|
||||
* Making field names safe
|
||||
*
|
||||
* @input string The you would like to make safe
|
||||
* @input boolean The switch to return an ALL UPPER CASE string
|
||||
* @input string The string to use in white space
|
||||
*
|
||||
* @returns string on success
|
||||
**/
|
||||
public static function safeFieldName($string, $spacer = '_')
|
||||
public static function safeFieldName($string, $allcap = false, $spacer = '_')
|
||||
{
|
||||
// get global value
|
||||
if (self::$fieldNameBuilder === false)
|
||||
{
|
||||
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 0); // change this to 1 for testing the new convention
|
||||
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 1);
|
||||
}
|
||||
// use the new convention
|
||||
if (1 == self::$fieldNameBuilder)
|
||||
if (2 == self::$fieldNameBuilder)
|
||||
{
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
@ -162,12 +164,22 @@ abstract class ComponentbuilderHelper
|
||||
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
|
||||
// replace white space with underscore (SAFEST OPTION)
|
||||
$string = preg_replace('/\s+/', $spacer, $string);
|
||||
// return all caps
|
||||
if ($allcap)
|
||||
{
|
||||
return strtoupper($string);
|
||||
}
|
||||
// default is to return lower
|
||||
return strtolower($string);
|
||||
}
|
||||
// not a string
|
||||
return '';
|
||||
}
|
||||
// return all caps
|
||||
if ($allcap)
|
||||
{
|
||||
return self::safeString($string, 'U');
|
||||
}
|
||||
// use the default (original behaviour/convention)
|
||||
return self::safeString($string);
|
||||
}
|
||||
@ -4805,38 +4817,42 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = 'Componentbuilder', $config = array())
|
||||
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = 'Componentbuilder', $config = array())
|
||||
{
|
||||
// fix the name
|
||||
$name = self::safeString($name);
|
||||
// full path
|
||||
$fullPath = $path . '/models';
|
||||
// set prefix
|
||||
$prefix = $component.'Model';
|
||||
// full path to models
|
||||
$fullPathModels = $path . '/models';
|
||||
// load the model file
|
||||
JModelLegacy::addIncludePath($fullPath, $prefix);
|
||||
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
|
||||
// make sure the table path is loaded
|
||||
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
|
||||
{
|
||||
// This is the JCB default path to tables in Joomla 3.x
|
||||
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
|
||||
}
|
||||
// get instance
|
||||
$model = JModelLegacy::getInstance($name, $prefix, $config);
|
||||
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
|
||||
// if model not found (strange)
|
||||
if ($model == false)
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
// get file path
|
||||
$filePath = $path . '/' . $name . '.php';
|
||||
$fullPath = $fullPath.'/'.$name.'.php';
|
||||
$fullPathModel = $fullPathModels . '/' . $name . '.php';
|
||||
// check if it exists
|
||||
if (JFile::exists($filePath))
|
||||
{
|
||||
// get the file
|
||||
require_once $filePath;
|
||||
}
|
||||
elseif (JFile::exists($fullPath))
|
||||
elseif (JFile::exists($fullPathModel))
|
||||
{
|
||||
// get the file
|
||||
require_once $fullPath;
|
||||
require_once $fullPathModel;
|
||||
}
|
||||
// build class names
|
||||
$modelClass = $prefix.$name;
|
||||
$modelClass = $Component . 'Model' . $name;
|
||||
if (class_exists($modelClass))
|
||||
{
|
||||
// initialize the model
|
||||
|
Loading…
Reference in New Issue
Block a user