Resolves gh-644 and addes the option to add, or hide the category sub-menu of a view.

This commit is contained in:
Llewellyn van der Merwe 2021-01-06 12:02:55 +02:00
parent d9da5d9fc4
commit 12600431ca
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
16 changed files with 860 additions and 738 deletions

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.4) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.5) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -143,13 +143,13 @@ 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*: 3rd January, 2021
+ *Version*: 2.12.4
+ *Last Build*: 6th January, 2021
+ *Version*: 2.12.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **291460**
+ *Field count*: **1609**
+ *File count*: **1934**
+ *Line count*: **291576**
+ *Field count*: **1611**
+ *File count*: **1935**
+ *Folder count*: **322**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.4) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.5) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -143,13 +143,13 @@ 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*: 3rd January, 2021
+ *Version*: 2.12.4
+ *Last Build*: 6th January, 2021
+ *Version*: 2.12.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **291460**
+ *Field count*: **1609**
+ *File count*: **1934**
+ *Line count*: **291576**
+ *Field count*: **1611**
+ *File count*: **1935**
+ *Folder count*: **322**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -45,6 +45,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getAjaxDisplay', 'ajax');
$this->registerTask('getLinked', 'ajax');
$this->registerTask('checkAliasField', 'ajax');
$this->registerTask('checkCategoryField', 'ajax');
$this->registerTask('templateDetails', 'ajax');
$this->registerTask('getLayoutDetails', 'ajax');
$this->registerTask('dbTableColumns', 'ajax');
@ -768,6 +769,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'checkCategoryField':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'ALNUM');
if($typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkCategoryField($typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'templateDetails':
try
{

View File

@ -23390,27 +23390,27 @@ class Interpretation extends Fields
);
}
$catArray = array();
// loop over all the admin views
foreach ($this->componentData->admin_views as $view)
{
// set custom menu
$menus .= $this->addCustomSubMenu($view, $codeName, $lang);
$nameSingle = ComponentbuilderHelper::safeString(
$view['settings']->name_single
);
$nameList = ComponentbuilderHelper::safeString(
$view['settings']->name_list
$menus .= $this->addCustomSubMenu(
$view, $codeName, $lang
);
$nameSingleCode = $view['settings']->name_single_code;
$nameListCode = $view['settings']->name_list_code;
$nameUpper = ComponentbuilderHelper::safeString(
$view['settings']->name_list, 'U'
);
// check if view is set to be in the sub-menu
if (isset($view['submenu']) && $view['submenu'] == 1)
{
// setup access defaults
$tab = "";
$coreLoad = false;
if (isset($this->permissionCore[$nameSingle]))
if (isset($this->permissionCore[$nameSingleCode]))
{
$core = $this->permissionCore[$nameSingle];
$core = $this->permissionCore[$nameSingleCode];
$coreLoad = true;
}
// check if the item has permissions.
@ -23420,14 +23420,14 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
)
&& in_array(
$nameSingle,
$nameSingleCode,
$this->permissionBuilder['global'][$core['core.access']]
))
{
$menus .= PHP_EOL . $this->_t(2)
. "if (\$user->authorise('" . $core['core.access']
. "', 'com_" . $codeName
. "') && \$user->authorise('" . $nameSingle
. "') && \$user->authorise('" . $nameSingleCode
. ".submenu', 'com_" . $codeName . "'))";
$menus .= PHP_EOL . $this->_t(2) . "{";
// add tab to lines to follow
@ -23436,33 +23436,38 @@ class Interpretation extends Fields
$menus .= PHP_EOL . $this->_t(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), 'index.php?option=com_" . $codeName
. "&view=" . $nameList . "', \$submenu === '"
. $nameList . "');";
. "&view=" . $nameListCode . "', \$submenu === '"
. $nameListCode . "');";
$this->setLangContent(
$this->lang, $lang . "_" . $nameUpper,
$view['settings']->name_list
);
// check if category has another name
if (isset($this->catOtherName[$nameList])
if (isset($this->catOtherName[$nameListCode])
&& ComponentbuilderHelper::checkArray(
$this->catOtherName[$nameList]
$this->catOtherName[$nameListCode]
))
{
$otherViews = $this->catOtherName[$nameList]['views'];
$otherViews
= $this->catOtherName[$nameListCode]['views'];
}
else
{
$otherViews = $nameList;
$otherViews = $nameListCode;
}
if (isset($this->categoryBuilder[$nameList])
// first check if category sub-menu should be added
// then check if view has category, if true add sub-menu for it
if ($view['settings']->add_category_submenu == 1
&& isset($this->categoryBuilder[$nameListCode])
&& ComponentbuilderHelper::checkArray(
$this->categoryBuilder[$nameList]
$this->categoryBuilder[$nameListCode]
)
&& !in_array($otherViews, $catArray))
{
// get the extension array
$_extension_array = (array) explode(
'.', $this->categoryBuilder[$nameList]['extension']
'.',
$this->categoryBuilder[$nameListCode]['extension']
);
// set the menu selection
if (isset($_extension_array[1]))
@ -23476,9 +23481,9 @@ class Interpretation extends Fields
// now load the menus
$menus .= PHP_EOL . $this->_t(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('"
. $this->categoryBuilder[$nameList]['name']
. $this->categoryBuilder[$nameListCode]['name']
. "'), 'index.php?option=com_categories&view=categories&extension="
. $this->categoryBuilder[$nameList]['extension']
. $this->categoryBuilder[$nameListCode]['extension']
. "', \$submenu === '" . $_menu . "');";
// make sure we add a category only once
$catArray[] = $otherViews;
@ -23490,7 +23495,7 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
)
&& in_array(
$nameSingle,
$nameSingleCode,
$this->permissionBuilder['global'][$core['core.access']]
))
{
@ -23508,13 +23513,13 @@ class Interpretation extends Fields
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper
. "_FIELDS'), 'index.php?option=com_fields&context=com_"
. $codeName . "." . $nameSingle
. $codeName . "." . $nameSingleCode
. "', \$submenu === 'fields.fields');";
$menus .= PHP_EOL . $this->_t(3)
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper
. "_FIELDS_GROUPS'), 'index.php?option=com_fields&view=groups&context=com_"
. $codeName . "." . $nameSingle
. $codeName . "." . $nameSingleCode
. "', \$submenu === 'fields.groups');";
$menus .= PHP_EOL . $this->_t(2) . "}";
$this->setLangContent(
@ -23527,9 +23532,10 @@ class Interpretation extends Fields
$view['settings']->name_list . ' Field Groups'
);
// build uninstall script for fields
$this->uninstallScriptBuilder[$nameSingle] = 'com_'
. $codeName . '.' . $nameSingle;
$this->uninstallScriptFields[$nameSingle] = $nameSingle;
$this->uninstallScriptBuilder[$nameSingleCode] = 'com_'
. $codeName . '.' . $nameSingleCode;
$this->uninstallScriptFields[$nameSingleCode]
= $nameSingleCode;
}
}
if (isset($this->lastCustomSubMenu)

View File

@ -484,6 +484,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL="Tables"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABS="Addtabs"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABS_DESCRIPTION="Setup tabs for this view."
COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABS_LABEL="Tabs"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CATEGORY_SUBMENU="Add Category Submenu"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CATEGORY_SUBMENU_DESCRIPTION="Do you want to add the category to the sub-menu?"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CATEGORY_SUBMENU_LABEL="Add Category Sub-menu"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEW="Add Css View"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS="Add Css Views"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS_LABEL="Add CSS (views)"
@ -945,6 +948,8 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION="The defa
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL="Default Alias Behaviour"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="<p>Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.</p>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CATEGORY_MENU_SWITCH_DESCRIPTION="You can now choose whether this view's category is added to the sub-menu."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CATEGORY_MENU_SWITCH_LABEL="Category Menu Switch"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="Some Shortcut Buttons<hr /><div id='jform_create_edit_buttons'></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="<hr />
<h4>Linked Fields <span id='header_admin_fields_buttons'></span></h4>

View File

@ -30,7 +30,9 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'alias_builder_type',
'note_alias_builder_custom',
'note_alias_builder_default',
'alias_builder'
'alias_builder',
'note_category_menu_switch',
'add_category_submenu'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -141,7 +141,9 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
'alias_builder_type',
'note_alias_builder_custom',
'note_alias_builder_default',
'alias_builder'
'alias_builder',
'note_category_menu_switch',
'add_category_submenu'
),
'right' => array(
'note_create_edit_buttons'
@ -295,82 +297,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_before_cancel))
if (!empty($item->php_allowedit))
{
// base64 Decode php_before_cancel.
$item->php_before_cancel = base64_decode($item->php_before_cancel);
}
if (!empty($item->php_allowadd))
{
// base64 Decode php_allowadd.
$item->php_allowadd = base64_decode($item->php_allowadd);
}
if (!empty($item->php_save))
{
// base64 Decode php_save.
$item->php_save = base64_decode($item->php_save);
}
if (!empty($item->php_getform))
{
// base64 Decode php_getform.
$item->php_getform = base64_decode($item->php_getform);
}
if (!empty($item->php_import_display))
{
// base64 Decode php_import_display.
$item->php_import_display = base64_decode($item->php_import_display);
}
if (!empty($item->php_before_delete))
{
// base64 Decode php_before_delete.
$item->php_before_delete = base64_decode($item->php_before_delete);
}
if (!empty($item->php_batchcopy))
{
// base64 Decode php_batchcopy.
$item->php_batchcopy = base64_decode($item->php_batchcopy);
}
if (!empty($item->php_before_publish))
{
// base64 Decode php_before_publish.
$item->php_before_publish = base64_decode($item->php_before_publish);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_import_setdata))
{
// base64 Decode php_import_setdata.
$item->php_import_setdata = base64_decode($item->php_import_setdata);
}
if (!empty($item->php_getlistquery))
{
// base64 Decode php_getlistquery.
$item->php_getlistquery = base64_decode($item->php_getlistquery);
}
if (!empty($item->php_before_save))
{
// base64 Decode php_before_save.
$item->php_before_save = base64_decode($item->php_before_save);
// base64 Decode php_allowedit.
$item->php_allowedit = base64_decode($item->php_allowedit);
}
if (!empty($item->php_postsavehook))
@ -379,10 +309,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_postsavehook = base64_decode($item->php_postsavehook);
}
if (!empty($item->php_allowedit))
if (!empty($item->php_before_save))
{
// base64 Decode php_allowedit.
$item->php_allowedit = base64_decode($item->php_allowedit);
// base64 Decode php_before_save.
$item->php_before_save = base64_decode($item->php_before_save);
}
if (!empty($item->php_getlistquery))
{
// base64 Decode php_getlistquery.
$item->php_getlistquery = base64_decode($item->php_getlistquery);
}
if (!empty($item->php_import_ext))
{
// base64 Decode php_import_ext.
$item->php_import_ext = base64_decode($item->php_import_ext);
}
if (!empty($item->php_after_publish))
{
// base64 Decode php_after_publish.
$item->php_after_publish = base64_decode($item->php_after_publish);
}
if (!empty($item->php_after_cancel))
@ -397,12 +345,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_batchmove = base64_decode($item->php_batchmove);
}
if (!empty($item->php_after_publish))
{
// base64 Decode php_after_publish.
$item->php_after_publish = base64_decode($item->php_after_publish);
}
if (!empty($item->php_after_delete))
{
// base64 Decode php_after_delete.
@ -415,10 +357,76 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import = base64_decode($item->php_import);
}
if (!empty($item->php_import_ext))
if (!empty($item->php_getitems_after_all))
{
// base64 Decode php_import_ext.
$item->php_import_ext = base64_decode($item->php_import_ext);
// base64 Decode php_getitems_after_all.
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
}
if (!empty($item->php_getform))
{
// base64 Decode php_getform.
$item->php_getform = base64_decode($item->php_getform);
}
if (!empty($item->php_save))
{
// base64 Decode php_save.
$item->php_save = base64_decode($item->php_save);
}
if (!empty($item->php_allowadd))
{
// base64 Decode php_allowadd.
$item->php_allowadd = base64_decode($item->php_allowadd);
}
if (!empty($item->php_before_cancel))
{
// base64 Decode php_before_cancel.
$item->php_before_cancel = base64_decode($item->php_before_cancel);
}
if (!empty($item->php_batchcopy))
{
// base64 Decode php_batchcopy.
$item->php_batchcopy = base64_decode($item->php_batchcopy);
}
if (!empty($item->php_before_publish))
{
// base64 Decode php_before_publish.
$item->php_before_publish = base64_decode($item->php_before_publish);
}
if (!empty($item->php_before_delete))
{
// base64 Decode php_before_delete.
$item->php_before_delete = base64_decode($item->php_before_delete);
}
if (!empty($item->php_document))
{
// base64 Decode php_document.
$item->php_document = base64_decode($item->php_document);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_import_display))
{
// base64 Decode php_import_display.
$item->php_import_display = base64_decode($item->php_import_display);
}
if (!empty($item->php_import_setdata))
{
// base64 Decode php_import_setdata.
$item->php_import_setdata = base64_decode($item->php_import_setdata);
}
if (!empty($item->css_view))
@ -487,40 +495,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_getitem))
{
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (!empty($item->html_import_view))
{
// base64 Decode html_import_view.
$item->html_import_view = base64_decode($item->html_import_view);
}
if (!empty($item->php_getitem))
{
// base64 Decode php_getitem.
$item->php_getitem = base64_decode($item->php_getitem);
}
if (!empty($item->php_import_headers))
{
// base64 Decode php_import_headers.
$item->php_import_headers = base64_decode($item->php_import_headers);
}
if (!empty($item->php_getitems))
{
// base64 Decode php_getitems.
$item->php_getitems = base64_decode($item->php_getitems);
}
if (!empty($item->php_import_save))
{
// base64 Decode php_import_save.
$item->php_import_save = base64_decode($item->php_import_save);
}
if (!empty($item->php_getitems_after_all))
if (!empty($item->php_getitems))
{
// base64 Decode php_getitems_after_all.
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// base64 Decode php_getitems.
$item->php_getitems = base64_decode($item->php_getitems);
}
if (!empty($item->addpermissions))
@ -1595,82 +1597,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['ajax_input'] = '';
}
// Set the php_before_cancel string to base64 string.
if (isset($data['php_before_cancel']))
// Set the php_allowedit string to base64 string.
if (isset($data['php_allowedit']))
{
$data['php_before_cancel'] = base64_encode($data['php_before_cancel']);
}
// Set the php_allowadd string to base64 string.
if (isset($data['php_allowadd']))
{
$data['php_allowadd'] = base64_encode($data['php_allowadd']);
}
// Set the php_save string to base64 string.
if (isset($data['php_save']))
{
$data['php_save'] = base64_encode($data['php_save']);
}
// Set the php_getform string to base64 string.
if (isset($data['php_getform']))
{
$data['php_getform'] = base64_encode($data['php_getform']);
}
// Set the php_import_display string to base64 string.
if (isset($data['php_import_display']))
{
$data['php_import_display'] = base64_encode($data['php_import_display']);
}
// Set the php_before_delete string to base64 string.
if (isset($data['php_before_delete']))
{
$data['php_before_delete'] = base64_encode($data['php_before_delete']);
}
// Set the php_batchcopy string to base64 string.
if (isset($data['php_batchcopy']))
{
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
}
// Set the php_before_publish string to base64 string.
if (isset($data['php_before_publish']))
{
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
{
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_import_setdata string to base64 string.
if (isset($data['php_import_setdata']))
{
$data['php_import_setdata'] = base64_encode($data['php_import_setdata']);
}
// Set the php_getlistquery string to base64 string.
if (isset($data['php_getlistquery']))
{
$data['php_getlistquery'] = base64_encode($data['php_getlistquery']);
}
// Set the php_before_save string to base64 string.
if (isset($data['php_before_save']))
{
$data['php_before_save'] = base64_encode($data['php_before_save']);
$data['php_allowedit'] = base64_encode($data['php_allowedit']);
}
// Set the php_postsavehook string to base64 string.
@ -1679,10 +1609,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
}
// Set the php_allowedit string to base64 string.
if (isset($data['php_allowedit']))
// Set the php_before_save string to base64 string.
if (isset($data['php_before_save']))
{
$data['php_allowedit'] = base64_encode($data['php_allowedit']);
$data['php_before_save'] = base64_encode($data['php_before_save']);
}
// Set the php_getlistquery string to base64 string.
if (isset($data['php_getlistquery']))
{
$data['php_getlistquery'] = base64_encode($data['php_getlistquery']);
}
// Set the php_import_ext string to base64 string.
if (isset($data['php_import_ext']))
{
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
}
// Set the php_after_publish string to base64 string.
if (isset($data['php_after_publish']))
{
$data['php_after_publish'] = base64_encode($data['php_after_publish']);
}
// Set the php_after_cancel string to base64 string.
@ -1697,12 +1645,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_batchmove'] = base64_encode($data['php_batchmove']);
}
// Set the php_after_publish string to base64 string.
if (isset($data['php_after_publish']))
{
$data['php_after_publish'] = base64_encode($data['php_after_publish']);
}
// Set the php_after_delete string to base64 string.
if (isset($data['php_after_delete']))
{
@ -1715,10 +1657,76 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import'] = base64_encode($data['php_import']);
}
// Set the php_import_ext string to base64 string.
if (isset($data['php_import_ext']))
// Set the php_getitems_after_all string to base64 string.
if (isset($data['php_getitems_after_all']))
{
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
}
// Set the php_getform string to base64 string.
if (isset($data['php_getform']))
{
$data['php_getform'] = base64_encode($data['php_getform']);
}
// Set the php_save string to base64 string.
if (isset($data['php_save']))
{
$data['php_save'] = base64_encode($data['php_save']);
}
// Set the php_allowadd string to base64 string.
if (isset($data['php_allowadd']))
{
$data['php_allowadd'] = base64_encode($data['php_allowadd']);
}
// Set the php_before_cancel string to base64 string.
if (isset($data['php_before_cancel']))
{
$data['php_before_cancel'] = base64_encode($data['php_before_cancel']);
}
// Set the php_batchcopy string to base64 string.
if (isset($data['php_batchcopy']))
{
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
}
// Set the php_before_publish string to base64 string.
if (isset($data['php_before_publish']))
{
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
}
// Set the php_before_delete string to base64 string.
if (isset($data['php_before_delete']))
{
$data['php_before_delete'] = base64_encode($data['php_before_delete']);
}
// Set the php_document string to base64 string.
if (isset($data['php_document']))
{
$data['php_document'] = base64_encode($data['php_document']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_import_display string to base64 string.
if (isset($data['php_import_display']))
{
$data['php_import_display'] = base64_encode($data['php_import_display']);
}
// Set the php_import_setdata string to base64 string.
if (isset($data['php_import_setdata']))
{
$data['php_import_setdata'] = base64_encode($data['php_import_setdata']);
}
// Set the css_view string to base64 string.
@ -1787,40 +1795,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
}
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the html_import_view string to base64 string.
if (isset($data['html_import_view']))
{
$data['html_import_view'] = base64_encode($data['html_import_view']);
}
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the php_import_headers string to base64 string.
if (isset($data['php_import_headers']))
{
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
}
// Set the php_getitems string to base64 string.
if (isset($data['php_getitems']))
{
$data['php_getitems'] = base64_encode($data['php_getitems']);
}
// Set the php_import_save string to base64 string.
if (isset($data['php_import_save']))
{
$data['php_import_save'] = base64_encode($data['php_import_save']);
}
// Set the php_getitems_after_all string to base64 string.
if (isset($data['php_getitems_after_all']))
// Set the php_getitems string to base64 string.
if (isset($data['php_getitems']))
{
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
$data['php_getitems'] = base64_encode($data['php_getitems']);
}
// Set the Params Items to data

View File

@ -345,7 +345,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.')');
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')');
}
}
@ -546,48 +546,50 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue;
}
// decode php_before_cancel
$item->php_before_cancel = base64_decode($item->php_before_cancel);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_after_cancel
$item->php_after_cancel = base64_decode($item->php_after_cancel);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_before_cancel
$item->php_before_cancel = base64_decode($item->php_before_cancel);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode sql
$item->sql = base64_decode($item->sql);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode css_views
@ -610,18 +612,16 @@ class ComponentbuilderModelAdmin_views extends JModelList
$item->php_model_list = base64_decode($item->php_model_list);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);

View File

@ -396,6 +396,37 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
public function checkCategoryField($type)
{
// get the view name & id
$values = $this->getViewID();
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray))
{
// get the fields
if ($fields = ComponentbuilderHelper::getVar('admin_fields', $values['a_id'], 'admin_view', 'addfields'))
{
// open the fields
if (ComponentbuilderHelper::checkJson($fields))
{
$fields = json_decode($fields, true);
if (ComponentbuilderHelper::checkArray($fields))
{
foreach($fields as $field)
{
if (isset($field['field']) &&
($field_values = ComponentbuilderHelper::getFieldNameAndType($field['field'])) !== false &&
$field_values['type'] === 'category' )
{
return true;
}
}
}
}
}
}
return false;
}
public function getDynamicScripts($type)
{
// get from global helper

View File

@ -811,6 +811,8 @@ jQuery(document).ready(function()
{
// check if this view has alias field
checkAliasField();
// check if this view has category field
checkCategoryField();
// get the linked details
getLinked();
// set button
@ -848,17 +850,16 @@ function checkAliasField() {
});
}
function checkAliasField_server(type){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type > 0){
var request = token+'=1&type=' + type;
function checkCategoryField() {
getCodeFrom_server(1, 'type', 'type', 'checkCategoryField').done(function(result) {
if(result){
// remove the notice
jQuery('.note_create_edit_notice_p').remove();
} else {
// hide everything about category management
jQuery('#jform_add_category_submenu').closest('.control-group').remove();
jQuery('.note_category_menu_switch').closest('.control-group').remove();
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}

File diff suppressed because it is too large Load Diff

View File

@ -310,6 +310,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` (
CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`add_category_submenu` TINYINT(1) NOT NULL DEFAULT 1,
`add_css_view` TINYINT(1) NOT NULL DEFAULT 0,
`add_css_views` TINYINT(1) NOT NULL DEFAULT 0,
`add_custom_button` INT(1) NOT NULL DEFAULT 0,
@ -415,44 +416,45 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_name_single` (`name_single`),
KEY `idx_name_list` (`name_list`),
KEY `idx_add_fadein` (`add_fadein`),
KEY `idx_mysql_table_row_format` (`mysql_table_row_format`),
KEY `idx_type` (`type`),
KEY `idx_mysql_table_charset` (`mysql_table_charset`),
KEY `idx_type` (`type`),
KEY `idx_source` (`source`),
KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_mysql_table_row_format` (`mysql_table_row_format`),
KEY `idx_add_category_submenu` (`add_category_submenu`),
KEY `idx_name_list` (`name_list`),
KEY `idx_add_php_getlistquery` (`add_php_getlistquery`),
KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_add_php_getform` (`add_php_getform`),
KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_php_before_save` (`add_php_before_save`),
KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_php_save` (`add_php_save`),
KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
KEY `idx_add_php_postsavehook` (`add_php_postsavehook`),
KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
KEY `idx_add_php_allowadd` (`add_php_allowadd`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_php_allowedit` (`add_php_allowedit`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_php_before_cancel` (`add_php_before_cancel`),
KEY `idx_add_javascript_views_file` (`add_javascript_views_file`),
KEY `idx_add_php_after_cancel` (`add_php_after_cancel`),
KEY `idx_add_javascript_views_file` (`add_javascript_views_file`),
KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_add_php_batchmove` (`add_php_batchmove`),
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_add_php_before_publish` (`add_php_before_publish`),
KEY `idx_add_custom_button` (`add_custom_button`),
KEY `idx_add_php_after_publish` (`add_php_after_publish`),
KEY `idx_add_custom_button` (`add_custom_button`),
KEY `idx_add_php_before_delete` (`add_php_before_delete`),
KEY `idx_add_php_after_delete` (`add_php_after_delete`),
KEY `idx_add_php_document` (`add_php_document`),
KEY `idx_mysql_table_engine` (`mysql_table_engine`),
KEY `idx_mysql_table_collate` (`mysql_table_collate`),
KEY `idx_add_php_ajax` (`add_php_ajax`),
KEY `idx_add_sql` (`add_sql`),
KEY `idx_add_php_getitem` (`add_php_getitem`),
KEY `idx_add_php_ajax` (`add_php_ajax`),
KEY `idx_add_custom_import` (`add_custom_import`),
KEY `idx_add_php_getitem` (`add_php_getitem`),
KEY `idx_add_php_getitems` (`add_php_getitems`),
KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_guid` (`guid`),
KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),

View File

@ -0,0 +1 @@
ALTER TABLE `#__componentbuilder_admin_view` ADD `add_category_submenu` TINYINT(1) NOT NULL DEFAULT 1 AFTER `asset_id`;

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>3rd January, 2021</creationDate>
<creationDate>6th January, 2021</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.12.4</version>
<version>2.12.5</version>
<description><![CDATA[
<h1>Component Builder (v.2.12.4)</h1>
<h1>Component Builder (v.2.12.5)</h1>
<div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

@ -1019,4 +1019,21 @@
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.12.5</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">http://domain.com/demo.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates>

View File

@ -6060,9 +6060,9 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_before_cancel","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","php_before_cancel":"php_before_cancel","php_allowadd":"php_allowadd","php_save":"php_save","php_getform":"php_getform","name_list":"name_list","php_import_display":"php_import_display","icon":"icon","php_before_delete":"php_before_delete","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","php_batchcopy":"php_batchcopy","mysql_table_row_format":"mysql_table_row_format","php_before_publish":"php_before_publish","type":"type","php_document":"php_document","sql":"sql","php_import_setdata":"php_import_setdata","php_getlistquery":"php_getlistquery","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_allowedit":"php_allowedit","php_after_cancel":"php_after_cancel","php_batchmove":"php_batchmove","php_after_publish":"php_after_publish","alias_builder_type":"alias_builder_type","php_after_delete":"php_after_delete","mysql_table_charset":"mysql_table_charset","source":"source","alias_builder":"alias_builder","php_import":"php_import","php_import_ext":"php_import_ext","add_css_view":"add_css_view","add_php_getlistquery":"add_php_getlistquery","css_view":"css_view","add_php_getform":"add_php_getform","add_css_views":"add_css_views","add_php_before_save":"add_php_before_save","css_views":"css_views","add_php_save":"add_php_save","add_javascript_view_file":"add_javascript_view_file","add_php_postsavehook":"add_php_postsavehook","javascript_view_file":"javascript_view_file","add_php_allowadd":"add_php_allowadd","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_before_cancel":"add_php_before_cancel","add_javascript_views_file":"add_javascript_views_file","add_php_after_cancel":"add_php_after_cancel","javascript_views_file":"javascript_views_file","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_footer":"add_javascript_views_footer","add_php_batchmove":"add_php_batchmove","javascript_views_footer":"javascript_views_footer","add_php_before_publish":"add_php_before_publish","add_custom_button":"add_custom_button","add_php_after_publish":"add_php_after_publish","add_php_before_delete":"add_php_before_delete","php_controller":"php_controller","add_php_after_delete":"add_php_after_delete","php_model":"php_model","add_php_document":"add_php_document","php_controller_list":"php_controller_list","mysql_table_engine":"mysql_table_engine","php_model_list":"php_model_list","mysql_table_collate":"mysql_table_collate","add_php_ajax":"add_php_ajax","add_sql":"add_sql","php_ajaxmethod":"php_ajaxmethod","add_php_getitem":"add_php_getitem","add_custom_import":"add_custom_import","php_getitem":"php_getitem","html_import_view":"html_import_view","add_php_getitems":"add_php_getitems","php_import_headers":"php_import_headers","php_getitems":"php_getitems","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","guid":"guid","php_getitems_after_all":"php_getitems_after_all"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_allowedit","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","php_allowedit":"php_allowedit","php_postsavehook":"php_postsavehook","php_before_save":"php_before_save","php_getlistquery":"php_getlistquery","php_import_ext":"php_import_ext","icon":"icon","php_after_publish":"php_after_publish","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","php_after_cancel":"php_after_cancel","mysql_table_charset":"mysql_table_charset","php_batchmove":"php_batchmove","type":"type","php_after_delete":"php_after_delete","source":"source","php_import":"php_import","php_getitems_after_all":"php_getitems_after_all","php_getform":"php_getform","php_save":"php_save","php_allowadd":"php_allowadd","php_before_cancel":"php_before_cancel","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","alias_builder_type":"alias_builder_type","php_before_delete":"php_before_delete","php_document":"php_document","mysql_table_row_format":"mysql_table_row_format","alias_builder":"alias_builder","sql":"sql","php_import_display":"php_import_display","add_category_submenu":"add_category_submenu","php_import_setdata":"php_import_setdata","name_list":"name_list","add_php_getlistquery":"add_php_getlistquery","add_css_view":"add_css_view","add_php_getform":"add_php_getform","css_view":"css_view","add_php_before_save":"add_php_before_save","add_css_views":"add_css_views","add_php_save":"add_php_save","css_views":"css_views","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_file":"add_javascript_view_file","add_php_allowadd":"add_php_allowadd","javascript_view_file":"javascript_view_file","add_php_allowedit":"add_php_allowedit","add_javascript_view_footer":"add_javascript_view_footer","add_php_before_cancel":"add_php_before_cancel","javascript_view_footer":"javascript_view_footer","add_php_after_cancel":"add_php_after_cancel","add_javascript_views_file":"add_javascript_views_file","add_php_batchcopy":"add_php_batchcopy","javascript_views_file":"javascript_views_file","add_php_batchmove":"add_php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","add_php_before_publish":"add_php_before_publish","javascript_views_footer":"javascript_views_footer","add_php_after_publish":"add_php_after_publish","add_custom_button":"add_custom_button","add_php_before_delete":"add_php_before_delete","add_php_after_delete":"add_php_after_delete","php_controller":"php_controller","add_php_document":"add_php_document","php_model":"php_model","mysql_table_engine":"mysql_table_engine","php_controller_list":"php_controller_list","mysql_table_collate":"mysql_table_collate","php_model_list":"php_model_list","add_sql":"add_sql","add_php_ajax":"add_php_ajax","php_ajaxmethod":"php_ajaxmethod","add_custom_import":"add_custom_import","add_php_getitem":"add_php_getitem","html_import_view":"html_import_view","php_getitem":"php_getitem","php_import_headers":"php_import_headers","add_php_getitems":"add_php_getitems","php_import_save":"php_import_save","php_getitems":"php_getitems","guid":"guid","add_php_getitems_after_all":"add_php_getitems_after_all"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","type","source","add_css_view","add_php_getlistquery","add_php_getform","add_css_views","add_php_before_save","add_php_save","add_javascript_view_file","add_php_postsavehook","add_php_allowadd","add_javascript_view_footer","add_php_allowedit","add_php_before_cancel","add_javascript_views_file","add_php_after_cancel","add_php_batchcopy","add_javascript_views_footer","add_php_batchmove","add_php_before_publish","add_custom_button","add_php_after_publish","add_php_before_delete","add_php_after_delete","add_php_document","add_php_ajax","add_sql","add_php_getitem","add_custom_import","add_php_getitems","add_php_getitems_after_all"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","type","source","add_category_submenu","add_php_getlistquery","add_css_view","add_php_getform","add_php_before_save","add_css_views","add_php_save","add_php_postsavehook","add_javascript_view_file","add_php_allowadd","add_php_allowedit","add_javascript_view_footer","add_php_before_cancel","add_php_after_cancel","add_javascript_views_file","add_php_batchcopy","add_php_batchmove","add_javascript_views_footer","add_php_before_publish","add_php_after_publish","add_custom_button","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem","add_php_getitems","add_php_getitems_after_all"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$admin_view_Inserted = $db->insertObject('#__content_types', $admin_view);
@ -7552,9 +7552,9 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_before_cancel","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","php_before_cancel":"php_before_cancel","php_allowadd":"php_allowadd","php_save":"php_save","php_getform":"php_getform","name_list":"name_list","php_import_display":"php_import_display","icon":"icon","php_before_delete":"php_before_delete","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","php_batchcopy":"php_batchcopy","mysql_table_row_format":"mysql_table_row_format","php_before_publish":"php_before_publish","type":"type","php_document":"php_document","sql":"sql","php_import_setdata":"php_import_setdata","php_getlistquery":"php_getlistquery","php_before_save":"php_before_save","php_postsavehook":"php_postsavehook","php_allowedit":"php_allowedit","php_after_cancel":"php_after_cancel","php_batchmove":"php_batchmove","php_after_publish":"php_after_publish","alias_builder_type":"alias_builder_type","php_after_delete":"php_after_delete","mysql_table_charset":"mysql_table_charset","source":"source","alias_builder":"alias_builder","php_import":"php_import","php_import_ext":"php_import_ext","add_css_view":"add_css_view","add_php_getlistquery":"add_php_getlistquery","css_view":"css_view","add_php_getform":"add_php_getform","add_css_views":"add_css_views","add_php_before_save":"add_php_before_save","css_views":"css_views","add_php_save":"add_php_save","add_javascript_view_file":"add_javascript_view_file","add_php_postsavehook":"add_php_postsavehook","javascript_view_file":"javascript_view_file","add_php_allowadd":"add_php_allowadd","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_before_cancel":"add_php_before_cancel","add_javascript_views_file":"add_javascript_views_file","add_php_after_cancel":"add_php_after_cancel","javascript_views_file":"javascript_views_file","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_footer":"add_javascript_views_footer","add_php_batchmove":"add_php_batchmove","javascript_views_footer":"javascript_views_footer","add_php_before_publish":"add_php_before_publish","add_custom_button":"add_custom_button","add_php_after_publish":"add_php_after_publish","add_php_before_delete":"add_php_before_delete","php_controller":"php_controller","add_php_after_delete":"add_php_after_delete","php_model":"php_model","add_php_document":"add_php_document","php_controller_list":"php_controller_list","mysql_table_engine":"mysql_table_engine","php_model_list":"php_model_list","mysql_table_collate":"mysql_table_collate","add_php_ajax":"add_php_ajax","add_sql":"add_sql","php_ajaxmethod":"php_ajaxmethod","add_php_getitem":"add_php_getitem","add_custom_import":"add_custom_import","php_getitem":"php_getitem","html_import_view":"html_import_view","add_php_getitems":"add_php_getitems","php_import_headers":"php_import_headers","php_getitems":"php_getitems","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","guid":"guid","php_getitems_after_all":"php_getitems_after_all"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_allowedit","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","php_allowedit":"php_allowedit","php_postsavehook":"php_postsavehook","php_before_save":"php_before_save","php_getlistquery":"php_getlistquery","php_import_ext":"php_import_ext","icon":"icon","php_after_publish":"php_after_publish","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","php_after_cancel":"php_after_cancel","mysql_table_charset":"mysql_table_charset","php_batchmove":"php_batchmove","type":"type","php_after_delete":"php_after_delete","source":"source","php_import":"php_import","php_getitems_after_all":"php_getitems_after_all","php_getform":"php_getform","php_save":"php_save","php_allowadd":"php_allowadd","php_before_cancel":"php_before_cancel","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","alias_builder_type":"alias_builder_type","php_before_delete":"php_before_delete","php_document":"php_document","mysql_table_row_format":"mysql_table_row_format","alias_builder":"alias_builder","sql":"sql","php_import_display":"php_import_display","add_category_submenu":"add_category_submenu","php_import_setdata":"php_import_setdata","name_list":"name_list","add_php_getlistquery":"add_php_getlistquery","add_css_view":"add_css_view","add_php_getform":"add_php_getform","css_view":"css_view","add_php_before_save":"add_php_before_save","add_css_views":"add_css_views","add_php_save":"add_php_save","css_views":"css_views","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_file":"add_javascript_view_file","add_php_allowadd":"add_php_allowadd","javascript_view_file":"javascript_view_file","add_php_allowedit":"add_php_allowedit","add_javascript_view_footer":"add_javascript_view_footer","add_php_before_cancel":"add_php_before_cancel","javascript_view_footer":"javascript_view_footer","add_php_after_cancel":"add_php_after_cancel","add_javascript_views_file":"add_javascript_views_file","add_php_batchcopy":"add_php_batchcopy","javascript_views_file":"javascript_views_file","add_php_batchmove":"add_php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","add_php_before_publish":"add_php_before_publish","javascript_views_footer":"javascript_views_footer","add_php_after_publish":"add_php_after_publish","add_custom_button":"add_custom_button","add_php_before_delete":"add_php_before_delete","add_php_after_delete":"add_php_after_delete","php_controller":"php_controller","add_php_document":"add_php_document","php_model":"php_model","mysql_table_engine":"mysql_table_engine","php_controller_list":"php_controller_list","mysql_table_collate":"mysql_table_collate","php_model_list":"php_model_list","add_sql":"add_sql","add_php_ajax":"add_php_ajax","php_ajaxmethod":"php_ajaxmethod","add_custom_import":"add_custom_import","add_php_getitem":"add_php_getitem","html_import_view":"html_import_view","php_getitem":"php_getitem","php_import_headers":"php_import_headers","add_php_getitems":"add_php_getitems","php_import_save":"php_import_save","php_getitems":"php_getitems","guid":"guid","add_php_getitems_after_all":"add_php_getitems_after_all"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","type","source","add_css_view","add_php_getlistquery","add_php_getform","add_css_views","add_php_before_save","add_php_save","add_javascript_view_file","add_php_postsavehook","add_php_allowadd","add_javascript_view_footer","add_php_allowedit","add_php_before_cancel","add_javascript_views_file","add_php_after_cancel","add_php_batchcopy","add_javascript_views_footer","add_php_batchmove","add_php_before_publish","add_custom_button","add_php_after_publish","add_php_before_delete","add_php_after_delete","add_php_document","add_php_ajax","add_sql","add_php_getitem","add_custom_import","add_php_getitems","add_php_getitems_after_all"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","type","source","add_category_submenu","add_php_getlistquery","add_css_view","add_php_getform","add_php_before_save","add_css_views","add_php_save","add_php_postsavehook","add_javascript_view_file","add_php_allowadd","add_php_allowedit","add_javascript_view_footer","add_php_before_cancel","add_php_after_cancel","add_javascript_views_file","add_php_batchcopy","add_php_batchmove","add_javascript_views_footer","add_php_before_publish","add_php_after_publish","add_custom_button","add_php_before_delete","add_php_after_delete","add_php_document","add_sql","add_php_ajax","add_custom_import","add_php_getitem","add_php_getitems","add_php_getitems_after_all"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
// Check if admin_view type is already in content_type DB.
$admin_view_id = null;
@ -9250,7 +9250,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.12.4 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.12.5 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))