Fixed the Categories link on the dashboard to follow the new single list view naming convention.

This commit is contained in:
Llewellyn van der Merwe 2020-08-13 03:03:56 +02:00
parent 3ca4c3c3d6
commit 861347318d
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
10 changed files with 85 additions and 59 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 safe 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.11.3) 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.11.4) 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)
@ -144,11 +144,11 @@ 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*: 8th August, 2020
+ *Version*: 2.11.3
+ *Last Build*: 13th August, 2020
+ *Version*: 2.11.4
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **283076**
+ *Line count*: **283086**
+ *Field count*: **1527**
+ *File count*: **1785**
+ *Folder count*: **295**

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 safe 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.11.3) 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.11.4) 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)
@ -144,11 +144,11 @@ 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*: 8th August, 2020
+ *Version*: 2.11.3
+ *Last Build*: 13th August, 2020
+ *Version*: 2.11.4
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **283076**
+ *Line count*: **283086**
+ *Field count*: **1527**
+ *File count*: **1785**
+ *Folder count*: **295**

View File

@ -51,8 +51,8 @@ class ###Component###Model###Component### extends JModelList
$viewName = $name;
$alt = $name;
$url = $url;
$image = $name.'.'.$type;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
}
}
// internal views
@ -74,17 +74,27 @@ class ###Component###Model###Component### extends JModelList
switch($action)
{
case 'add':
$url = 'index.php?option=com_###component###&view='.$name.'&layout=edit';
$image = $name.'_'.$action.'.'.$type;
$alt = $name.' '.$action;
$url = 'index.php?option=com_###component###&view=' . $name . '&layout=edit';
$image = $name . '_' . $action. '.' . $type;
$alt = $name . ' ' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_ADD';
$add = true;
break;
default:
$url = 'index.php?option=com_categories&view=categories&extension=com_###component###.'.$name;
$image = $name.'_'.$action.'.'.$type;
$alt = $name.' '.$action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_'.###Component###Helper::safeString($action,'U');
// check for new convention (more stable)
if (strpos($action, '_qpo0O0oqp_') !== false)
{
list($action, $extension) = (array) explode('_qpo0O0oqp_', $action);
$extension = str_replace('_po0O0oq_', '.', $extension);
}
else
{
$extension = 'com_###component###.' . $name;
}
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type;
$alt = $viewName . ' ' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U') . '_' . ###Component###Helper::safeString($action,'U');
break;
}
}
@ -92,9 +102,9 @@ class ###Component###Model###Component### extends JModelList
{
$viewName = $name;
$alt = $name;
$url = 'index.php?option=com_###component###&view='.$name;
$image = $name.'.'.$type;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
$url = 'index.php?option=com_###component###&view=' . $name;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
$hover = false;
}
}
@ -102,8 +112,8 @@ class ###Component###Model###Component### extends JModelList
{
$viewName = $view;
$alt = $view;
$url = 'index.php?option=com_###component###&view='.$view;
$image = $view.'.png';
$url = 'index.php?option=com_###component###&view=' . $view;
$image = $view . '.png';
$name = ucwords($view).'<br /><br />';
$hover = false;
}
@ -115,7 +125,7 @@ class ###Component###Model###Component### extends JModelList
$dashboard_list = false;
$accessTo = '';
$accessAdd = '';
// acces checking start
// access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.access']):false;
// set main controllers
@ -130,7 +140,7 @@ class ###Component###Model###Component### extends JModelList
{
$accessAdd = 'core.create';
}
// check if acces to view is set
// check if access to view is set
if ($accessAccess)
{
$accessTo = $viewAccess[$viewName.'.access'];

View File

@ -4038,7 +4038,7 @@ class Get
{
$field['permission'] = array($field['permission']);
}
// set unigue name keeper
// set unique name keeper
if ($listViewName)
{
$this->setUniqueNameCounter(
@ -4176,7 +4176,7 @@ class Get
);
// set the name of the field
$name = ComponentbuilderHelper::safeFieldName($field['settings']->name);
// check that we have the poperties
// check that we have the properties
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
{
foreach ($field['settings']->properties as $property)

View File

@ -4438,7 +4438,7 @@ class Fields extends Structure
}
else
{
// set lang (just incase)
// set lang (just in case)
$listLangName = $langView . '_'
. ComponentbuilderHelper::safeFieldName($name, true);
// add to lang array
@ -4654,7 +4654,7 @@ class Fields extends Structure
$this->app->enqueueMessage(
JText::sprintf(
'<hr /><h3>Category targeting view mismatch</h3>
<a>The <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open field">
<p>The <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open field">
category field</a> in <b>(%s) admin view</b> has a mismatching target view.
<br />To correct the mismatch, the <b>extension</b> value <code>%s</code> in the <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open category field">
field</a> must be changed to <code>%s</code>
@ -5080,7 +5080,7 @@ class Fields extends Structure
{
// reset the php bucket
$phpBucket = '';
// only set if avaliable
// only set if available
if (isset($data['custom']['php' . $x])
&& ComponentbuilderHelper::checkArray(
$data['custom']['php' . $x]

View File

@ -21165,6 +21165,7 @@ class Interpretation extends Fields
$this->setLangContent($this->lang, $langKey, $langName);
$counter++;
}
// dashboard link to category on dashboard is build here
if (isset($this->categoryBuilder[$name_list])
&& ComponentbuilderHelper::checkArray(
$this->categoryBuilder[$name_list]
@ -21194,8 +21195,13 @@ class Interpretation extends Fields
$otherViews, 'W'
);
}
// only load this category once
if (!in_array($otherViews, $catArray))
{
// set the extension key string, new convention (more stable)
$_key_extension = str_replace('.', '_po0O0oq_',
$this->categoryBuilder[$name_list]['extension']);
// add to lang
$langKey = $this->langPrefix . '_DASHBOARD_'
. ComponentbuilderHelper::safeString(
@ -21223,12 +21229,12 @@ class Interpretation extends Fields
if ($counter == 0)
{
$icons .= "'" . $type . $otherViews . "." . $catCode
. "'";
. '_qpo0O0oqp_' . $_key_extension . "'";
}
else
{
$icons .= ", '" . $type . $otherViews . "."
. $catCode . "'";
. $catCode . '_qpo0O0oqp_' . $_key_extension . "'";
}
$counter++;
// make sure we add a category only once
@ -21770,14 +21776,14 @@ class Interpretation extends Fields
)
&& !in_array($otherViews, $catArray))
{
// get the extention array
$_extetion_array = (array) explode(
// get the extension array
$_extension_array = (array) explode(
'.', $this->categoryBuilder[$nameList]['extension']
);
// set the meny selection
if (isset($_extetion_array[1]))
// set the menu selection
if (isset($_extension_array[1]))
{
$_menu = "categories." . trim($_extetion_array[1]);
$_menu = "categories." . trim($_extension_array[1]);
}
else
{

View File

@ -25,7 +25,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$icons = array();
// view groups array
$viewGroups = array(
'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents')
'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents')
);
// view access array
$viewAccess = array(
@ -232,8 +232,8 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$viewName = $name;
$alt = $name;
$url = $url;
$image = $name.'.'.$type;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U');
$image = $name . '.' . $type;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_' . ComponentbuilderHelper::safeString($name,'U');
}
}
// internal views
@ -255,17 +255,27 @@ class ComponentbuilderModelComponentbuilder extends JModelList
switch($action)
{
case 'add':
$url = 'index.php?option=com_componentbuilder&view='.$name.'&layout=edit';
$image = $name.'_'.$action.'.'.$type;
$alt = $name.'&nbsp;'.$action;
$url = 'index.php?option=com_componentbuilder&view=' . $name . '&layout=edit';
$image = $name . '_' . $action. '.' . $type;
$alt = $name . '&nbsp;' . $action;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_ADD';
$add = true;
break;
default:
$url = 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.'.$name;
$image = $name.'_'.$action.'.'.$type;
$alt = $name.'&nbsp;'.$action;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U').'_'.ComponentbuilderHelper::safeString($action,'U');
// check for new convention (more stable)
if (strpos($action, '_qpo0O0oqp_') !== false)
{
list($action, $extension) = (array) explode('_qpo0O0oqp_', $action);
$extension = str_replace('_po0O0oq_', '.', $extension);
}
else
{
$extension = 'com_componentbuilder.' . $name;
}
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type;
$alt = $viewName . '&nbsp;' . $action;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_' . ComponentbuilderHelper::safeString($name,'U') . '_' . ComponentbuilderHelper::safeString($action,'U');
break;
}
}
@ -273,9 +283,9 @@ class ComponentbuilderModelComponentbuilder extends JModelList
{
$viewName = $name;
$alt = $name;
$url = 'index.php?option=com_componentbuilder&view='.$name;
$image = $name.'.'.$type;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_'.ComponentbuilderHelper::safeString($name,'U');
$url = 'index.php?option=com_componentbuilder&view=' . $name;
$image = $name . '.' . $type;
$name = 'COM_COMPONENTBUILDER_DASHBOARD_' . ComponentbuilderHelper::safeString($name,'U');
$hover = false;
}
}
@ -283,8 +293,8 @@ class ComponentbuilderModelComponentbuilder extends JModelList
{
$viewName = $view;
$alt = $view;
$url = 'index.php?option=com_componentbuilder&view='.$view;
$image = $view.'.png';
$url = 'index.php?option=com_componentbuilder&view=' . $view;
$image = $view . '.png';
$name = ucwords($view).'<br /><br />';
$hover = false;
}
@ -296,7 +306,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
$dashboard_list = false;
$accessTo = '';
$accessAdd = '';
// acces checking start
// access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ComponentbuilderHelper::checkString($viewAccess[$viewName.'.access']):false;
// set main controllers
@ -311,7 +321,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
{
$accessAdd = 'core.create';
}
// check if acces to view is set
// check if access to view is set
if ($accessAccess)
{
$accessTo = $viewAccess[$viewName.'.access'];

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>8th August, 2020</creationDate>
<creationDate>13th August, 2020</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.11.3</version>
<version>2.11.4</version>
<description><![CDATA[
<h1>Component Builder (v.2.11.3)</h1>
<h1>Component Builder (v.2.11.4)</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

@ -956,10 +956,10 @@
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.11.3</version>
<version>2.11.4</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.3/JCB_v2.11.3.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.4/JCB_v2.11.4.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>

View File

@ -9213,7 +9213,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.11.3 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.11.4 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))