Skip to content
Permalink
Browse files

Few more corrections to the category filter, and field integration

  • Loading branch information...
Llewellynvdm committed Jun 9, 2019
1 parent 37d3f14 commit c966720f798d0370312f023ba93246cc2c0ed44b
@@ -146,7 +146,7 @@ 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*: 7th June, 2019
+ *Last Build*: 9th June, 2019
+ *Version*: 2.9.18
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
@@ -146,7 +146,7 @@ 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*: 7th June, 2019
+ *Last Build*: 9th June, 2019
+ *Version*: 2.9.18
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
@@ -774,7 +774,7 @@ private function setStatic()
{
if (ComponentbuilderHelper::checkObject($this->joomlaVersionData->move->static))
{
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
$codeName = $this->componentCodeName;
// TODO needs more looking at this must be dynamic actualy
$this->notNew[] = 'PHPExcel.php';
$this->notNew[] = 'LICENSE.txt';
@@ -2702,6 +2702,11 @@ public function setBuilders($langLabel, $langView, $view_name_single, $view_name
}
// get the xml extension name
$_extension = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'extension="', '"'), $this->placeholders);
// if they left out the extention for some reason
if (!ComponentbuilderHelper::checkString($_extension))
{
$_extension = 'com_' . $this->componentCodeName . '.' . $otherView;
}
// load the category builder
$this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName, 'extension' => $_extension);
// also set code name for title alias fix
@@ -7501,11 +7501,11 @@ public function setEditBody(&$view)
$header = '';
$mainwidth = 12;
$sidewidth = 0;
// sort the tabs based on key order
ksort($this->tabCounter[$viewName_single]);
// start tab builinging loop
foreach ($this->tabCounter[$viewName_single] as $tabNr => $tabName)
{
// check if we must load a custom tab

$tabWidth = 12;
$lrCounter = 0;
// set tab lang
@@ -7530,6 +7530,7 @@ public function setEditBody(&$view)
$buildLayout = false;
}
}
// build layout since just fields
if ($buildLayout)
{
// sort to make sure it loads left first
@@ -7542,7 +7543,9 @@ public function setEditBody(&$view)
// reset each time
$items = '';
$itemCounter = 0;
// sort the names based on order of keys
ksort($names);
// build the items array for this alignment
foreach ($names as $nr => $name)
{
if ($itemCounter == 0)
@@ -7555,6 +7558,7 @@ public function setEditBody(&$view)
}
$itemCounter++;
}
// based on alignment build the layout
switch ($alignment)
{
case 1: // left
{
$function = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
foreach ($this->filterBuilder[$viewName_list] as $filter)
{
if ($filter['type'] != 'category' && ComponentbuilderHelper::checkArray($filter['custom']) && $filter['custom']['extends'] === 'user')
{
if (isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list]))
{
// get the actual extention
$_extension = $this->categoryBuilder[$viewName_list]['extension'];
$_extension = explode('.', $_extension);
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
if (ComponentbuilderHelper::checkArray($_extension))
{
$component = str_replace('com_', '', $_extension[0]);
}
else
{
$component = $this->componentCodeName;
}
// check if category has another name
if (isset($this->catOtherName[$viewName_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$viewName_list]))
{
// set script to global helper file
$includeHelper = array();
$includeHelper[] = "\n//" . $this->setLine(__LINE__) . "Insure this view category file is loaded.";
$includeHelper[] = "\$classname = '" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . ucfirst($viewName_list) . "Categories';";
$includeHelper[] = "\$classname = '" . ucfirst( $component ) . ucfirst($viewName_list) . "Categories';";
$includeHelper[] = "if (!class_exists(\$classname))";
$includeHelper[] = "{";
$includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/helpers/category" . $viewName_list . ".php';";
$includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $component . "/helpers/category" . $viewName_list . ".php';";
$includeHelper[] = $this->_t(1) . "if (is_file(\$path))";
$includeHelper[] = $this->_t(1) . "{";
$includeHelper[] = $this->_t(2) . "include_once \$path;";
// return category view string
if (isset($this->fileContentStatic[$this->hhh . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]) && ComponentbuilderHelper::checkString($this->fileContentStatic[$this->hhh . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]))
{
return "," . PHP_EOL . $this->_t(3) . '"com_' . $component . '.' . $otherViews . '" => "' . $otherView . '"';
return "," . PHP_EOL . $this->_t(3) . '"' . $this->categoryBuilder[$viewName_list]['extension'] . '" => "' . $otherView . '"';
}
else
{
return PHP_EOL . $this->_t(3) . '"com_' . $component . '.' . $otherViews . '" => "' . $otherView . '"';
return PHP_EOL . $this->_t(3) . '"' . $this->categoryBuilder[$viewName_list]['extension'] . '" => "' . $otherView . '"';
}
}
return '';
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// prepare custom permission script
$customAllow = $this->getCustomScriptBuilder('php_allowadd', $viewName_single, '', null, true);
// setup correct core target
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// prepare custom permission script
$customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, '', null, true);
// setup correct core target
public function setJmodelAdminGetForm($viewName_single, $viewName_list)
{
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// allways load these
$allow = array();
$allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the form.";
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// prepare custom permission script
$customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, $this->_t(2) . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;" . PHP_EOL);
// setup correct core target
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
{
$allow = array();
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
if ($view != 'component')
{
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
// set label
$label = 'Permissions in relation to this ' . $view;
// set the access fieldset
// main lang prefix
$lang = $this->langPrefix . '_SUBMENU';
// set the code name
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
$codeName = $this->componentCodeName;
// set default dashboard
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
{
// main lang prefix
$lang = $this->langPrefix . '_MENU';
// set the code name
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
$codeName = $this->componentCodeName;
// default prefix is none
$prefix = '';
// check if local is set
// set the custom fields
if (isset($this->componentData->config) && ComponentbuilderHelper::checkArray($this->componentData->config))
{
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;
$viewName = 'config';
$listViewName = 'configs';
// set place holders
$placeholders = array();
$placeholders[$this->hhh . 'component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code);
$placeholders[$this->hhh . 'component' . $this->hhh] = $this->componentCodeName;
$placeholders[$this->hhh . 'Component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'F');
$placeholders[$this->hhh . 'COMPONENT' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U');
$placeholders[$this->hhh . 'view' . $this->hhh] = $viewName;
$placeholders[$this->hhh . 'views' . $this->hhh] = $listViewName;
$placeholders[$this->bbb . 'component' . $this->ddd] = $placeholders[$this->hhh . 'component' . $this->hhh];
$placeholders[$this->bbb . 'component' . $this->ddd] = $this->componentCodeName;
$placeholders[$this->bbb . 'Component' . $this->ddd] = $placeholders[$this->hhh . 'Component' . $this->hhh];
$placeholders[$this->bbb . 'COMPONENT' . $this->ddd] = $placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
$placeholders[$this->bbb . 'view' . $this->ddd] = $viewName;
public function setGlobalConfigFieldsets($lang, $autorName, $autorEmail)
{
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$component = $this->componentCodeName;

// start building field set for config
$this->configFieldSets[] = '<fieldset';
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>7th June, 2019</creationDate>
<creationDate>9th June, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
@@ -17,7 +17,7 @@
*/
//Insure this view category file is loaded.
$classname = 'componentbuilderFieldsCategories';
$classname = 'ComponentbuilderFieldsCategories';
if (!class_exists($classname))
{
$path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfields.php';
@@ -27,7 +27,7 @@
}
}
//Insure this view category file is loaded.
$classname = 'componentbuilderFieldtypesCategories';
$classname = 'ComponentbuilderFieldtypesCategories';
if (!class_exists($classname))
{
$path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtypes.php';

0 comments on commit c966720

Please sign in to comment.
You can’t perform that action at this time.