Added Plugin and Module Translation integration. #537

Merged
Llewellyn merged 8 commits from staging into master 2020-04-05 00:02:02 +00:00
17 changed files with 403 additions and 181 deletions
Showing only changes of commit 86f671c87c - Show all commits

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! 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.10.11) 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.10.12) 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) > 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,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 27th February, 2020 + *Last Build*: 13th March, 2020
+ *Version*: 2.10.11 + *Version*: 2.10.12
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **278669** + *Line count*: **278824**
+ *Field count*: **1505** + *Field count*: **1506**
+ *File count*: **1756** + *File count*: **1757**
+ *Folder count*: **278** + *Folder count*: **278**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > 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 safe you lots of time and money. A real must have! 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.10.11) 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.10.12) 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) > 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,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 27th February, 2020 + *Last Build*: 13th March, 2020
+ *Version*: 2.10.11 + *Version*: 2.10.12
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **278669** + *Line count*: **278824**
+ *Field count*: **1505** + *Field count*: **1506**
+ *File count*: **1756** + *File count*: **1757**
+ *Folder count*: **278** + *Folder count*: **278**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -6278,6 +6278,64 @@ class Get
return false; return false;
} }
/**
* get the Joomla module path
*
* @return array of module path and target site area on success
*
*/
protected function getModulePath($id)
{
if (is_numeric($id) && $id > 0)
{
// Create a new query object.
$query = $this->db->getQuery(true);
$query->select('a.*');
$query->select(
$this->db->quoteName(
array(
'a.name',
'a.target'
), array(
'name',
'target'
)
)
);
// from these tables
$query->from('#__componentbuilder_joomla_module AS a');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows())
{
// get the module data
$module = $this->db->loadObject();
// update the name if it has dynamic values
$module->name = $this->setPlaceholders($this->setDynamicValues($module->name), $this->globalPlaceholders);
// set safe class function name
$module->code_name = ComponentbuilderHelper::safeClassFunctionName($module->name);
// set module folder name
$module->folder_name = 'mod_' . strtolower($module->code_name);
// set the lang key
$this->langKeys[strtoupper($module->folder_name)] = $module->id . '_M0dU|3';
// return the path
if ($module->target == 2)
{
// administrator client area
return JPATH_ADMINISTRATOR . '/modules/' . $module->folder_name;
}
else
{
// default is the site client area
return JPATH_ROOT . '/modules/' . $module->folder_name;
}
}
}
return false;
}
/** /**
* get the Joomla Modules IDs * get the Joomla Modules IDs
* *
@ -6379,11 +6437,22 @@ class Get
{ {
$module->module_version = '1.0.0'; $module->module_version = '1.0.0';
} }
// set target client
if ($module->target == 2)
{
$module->target_client = 'admin';
}
else
{
// default is site area
$module->target_client = 'site';
}
unset($module->target);
// set GUI mapper // set GUI mapper
$guiMapper = array( 'table' => 'joomla_module', 'id' => (int) $id, 'type' => 'php'); $guiMapper = array( 'table' => 'joomla_module', 'id' => (int) $id, 'type' => 'php');
// update the name if it has dynamic values // update the name if it has dynamic values
$module->name = $this->setPlaceholders($this->setDynamicValues($module->name), $this->placeholders); $module->name = $this->setPlaceholders($this->setDynamicValues($module->name), $this->placeholders);
// update the name if it has dynamic values // set safe class function name
$module->code_name = ComponentbuilderHelper::safeClassFunctionName($module->name); $module->code_name = ComponentbuilderHelper::safeClassFunctionName($module->name);
// set official name // set official name
$module->official_name = ComponentbuilderHelper::safeString($module->name, 'W'); $module->official_name = ComponentbuilderHelper::safeString($module->name, 'W');
@ -6832,7 +6901,7 @@ class Get
public function getModuleXMLTemplate(&$module) public function getModuleXMLTemplate(&$module)
{ {
$xml = '<?xml version="1.0" encoding="utf-8"?>'; $xml = '<?xml version="1.0" encoding="utf-8"?>';
$xml .= PHP_EOL . '<extension type="module" version="3.8" client="site" method="upgrade">'; $xml .= PHP_EOL . '<extension type="module" version="3.8" client="' . $module->target_client . '" method="upgrade">';
$xml .= PHP_EOL . $this->_t(1) . '<name>' . $module->lang_prefix . '</name>'; $xml .= PHP_EOL . $this->_t(1) . '<name>' . $module->lang_prefix . '</name>';
$xml .= PHP_EOL . $this->_t(1) . '<creationDate>' . $this->hhh . 'BUILDDATE' . $this->hhh . '</creationDate>'; $xml .= PHP_EOL . $this->_t(1) . '<creationDate>' . $this->hhh . 'BUILDDATE' . $this->hhh . '</creationDate>';
$xml .= PHP_EOL . $this->_t(1) . '<author>' . $this->hhh . 'AUTHOR' . $this->hhh . '</author>'; $xml .= PHP_EOL . $this->_t(1) . '<author>' . $this->hhh . 'AUTHOR' . $this->hhh . '</author>';
@ -6912,7 +6981,6 @@ class Get
$query->from('#__componentbuilder_joomla_plugin AS a'); $query->from('#__componentbuilder_joomla_plugin AS a');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $this->db->quoteName('a.joomla_plugin_group') . ' = ' . $this->db->quoteName('g.id') . ')'); $query->join('LEFT', $this->db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $this->db->quoteName('a.joomla_plugin_group') . ' = ' . $this->db->quoteName('g.id') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
$query->where($this->db->quoteName('a.published') . ' >= 1');
$this->db->setQuery($query); $this->db->setQuery($query);
$this->db->execute(); $this->db->execute();
if ($this->db->getNumRows()) if ($this->db->getNumRows())
@ -8390,12 +8458,12 @@ class Get
{ {
foreach ($module_ids as $module_id) foreach ($module_ids as $module_id)
{ {
// get the module group and folder name // get the module folder path
// if (($path = $this->getModulePath($module_id)) !== false) if (($path = $this->getModulePath($module_id)) !== false)
// { {
// // set the path // set the path
// $localPaths['module_' . str_replace('/', '_', $path)] = JPATH_ROOT . '/modules/' . $path; $localPaths['module_' . str_replace('/', '_', $path)] = $path;
// } }
} }
} }
// Painfull but we need to folder paths for the linked plugins // Painfull but we need to folder paths for the linked plugins

View File

@ -6167,6 +6167,7 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_SQL_UNINSTALL="Add Sql Uninstall"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_SQL_UNINSTALL_LABEL="Add MySQL - (Uninstall)" COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_SQL_UNINSTALL_LABEL="Add MySQL - (Uninstall)"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_UPDATE_SERVER="Add Update Server" COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_UPDATE_SERVER="Add Update Server"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_UPDATE_SERVER_LABEL="Add Update Server" COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_UPDATE_SERVER_LABEL="Add Update Server"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADMIN="Admin"
COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS="class" COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS="class"
COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS_HELPER_CODE="Class Helper Code" COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS_HELPER_CODE="Class Helper Code"
COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS_HELPER_CODE_DESCRIPTION="Add the class properties & methods here." COM_COMPONENTBUILDER_JOOMLA_MODULE_CLASS_HELPER_CODE_DESCRIPTION="Add the class properties & methods here."
@ -6422,6 +6423,7 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_SALES_SERVER_LABEL="Sales Server"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Module to customise the alias." COM_COMPONENTBUILDER_JOOMLA_MODULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Module to customise the alias."
COM_COMPONENTBUILDER_JOOMLA_MODULE_SCRIPT_FILE="Script File" COM_COMPONENTBUILDER_JOOMLA_MODULE_SCRIPT_FILE="Script File"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SERVER="Server" COM_COMPONENTBUILDER_JOOMLA_MODULE_SERVER="Server"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SITE="Site"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET="Snippet" COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET="Snippet"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review." COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_DESCRIPTION="Select a snippet you would like to use or review."
COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_LABEL="Select a Snippet" COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_LABEL="Select a Snippet"
@ -6439,6 +6441,9 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_DESCRIPTION="Used only in the sys
COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_HINT="The System Name Here" COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_HINT="The System Name Here"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL="System Name" COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL="System Name"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_MESSAGE="Error! Please add some text here." COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET="Target"
COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_DESCRIPTION="Set the area this module is targeting."
COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL="Target Area"
COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES="Joomla Module Updates" COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES="Joomla Module Updates"
COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_CREATED_BY_DESC="The user that created this Joomla Module Updates." COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_CREATED_BY_DESC="The user that created this Joomla Module Updates."
COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_CREATED_BY_LABEL="Created By"

View File

@ -27,7 +27,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'system_name', 'system_name',
'module_version' 'module_version',
'target'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -99,6 +99,22 @@
message="COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_MESSAGE" message="COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_HINT" hint="COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_HINT"
/> />
<!-- Target Field. Type: Radio. (joomla) -->
<field
type="radio"
name="target"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true"
validate="int">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_SITE</option>
<option value="2">
COM_COMPONENTBUILDER_JOOMLA_MODULE_ADMIN</option>
</field>
<!-- Description Field. Type: Textarea. (joomla) --> <!-- Description Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
@ -111,6 +127,34 @@
filter="HTML" filter="HTML"
hint="COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_HINT" hint="COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_HINT"
/> />
<!-- Add_php_method_uninstall Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_method_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_PHP_METHOD_UNINSTALL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Add_php_postflight_update Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_postflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_PHP_POSTFLIGHT_UPDATE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Add_php_postflight_install Field. Type: Radio. (joomla) --> <!-- Add_php_postflight_install Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -139,17 +183,76 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option> COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field> </field>
<!-- Update_server Field. Type: Servers. (custom) --> <!-- Addreadme Field. Type: Radio. (joomla) -->
<field <field
type="servers" type="radio"
name="update_server" name="addreadme"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATE_SERVER_LABEL" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDREADME_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATE_SERVER_DESCRIPTION" class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Note_libraries_options Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_options" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_options" />
<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" />
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="一_一"
/>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Snippet Field. Type: Snippets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_DESCRIPTION"
class="list_class" class="list_class"
multiple="false" multiple="false"
default="0" required="false"
button="true" button="true"
/> />
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Add_sql Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sql"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_SQL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Update_server_target Field. Type: Radio. (joomla) --> <!-- Update_server_target Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -167,108 +270,6 @@
<option value="3"> <option value="3">
COM_COMPONENTBUILDER_JOOMLA_MODULE_OTHER</option> COM_COMPONENTBUILDER_JOOMLA_MODULE_OTHER</option>
</field> </field>
<!-- Addreadme Field. Type: Radio. (joomla) -->
<field
type="radio"
name="addreadme"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADDREADME_LABEL"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Add_sql Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sql"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_SQL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Snippet Field. Type: Snippets. (custom) -->
<field
type="snippets"
name="snippet"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_SNIPPET_DESCRIPTION"
class="list_class"
multiple="false"
required="false"
button="true"
/>
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Note_libraries_options Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_libraries_options" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_options" />
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="libraries"
name="libraries"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_LIBRARIES_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_LIBRARIES_DESCRIPTION"
class="list_class"
multiple="true"
default="0"
required="false"
button="true"
/>
<!-- Add_php_postflight_update Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_postflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_PHP_POSTFLIGHT_UPDATE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Add_php_method_uninstall Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_method_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_ADD_PHP_METHOD_UNINSTALL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_MODULE_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field>
<!-- Default Field. Type: Editor. (joomla) -->
<field
type="editor"
name="default"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_DEFAULT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_DEFAULT_DESCRIPTION"
width="100%"
height="500px"
cols="15"
rows="30"
buttons="no"
syntax="html"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Add_sql_uninstall Field. Type: Radio. (joomla) --> <!-- Add_sql_uninstall Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -283,8 +284,17 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option> COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field> </field>
<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) --> <!-- Update_server Field. Type: Servers. (custom) -->
<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" /> <field
type="servers"
name="update_server"
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATE_SERVER_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATE_SERVER_DESCRIPTION"
class="list_class"
multiple="false"
default="0"
button="true"
/>
<!-- Add_update_server Field. Type: Radio. (joomla) --> <!-- Add_update_server Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -299,11 +309,17 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option> COM_COMPONENTBUILDER_JOOMLA_MODULE_NO</option>
</field> </field>
<!-- Not_required Field. Type: Hidden. (joomla) --> <!-- Libraries Field. Type: Libraries. (custom) -->
<field <field
type="hidden" type="libraries"
name="not_required" name="libraries"
default="一_一" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_LIBRARIES_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_LIBRARIES_DESCRIPTION"
class="list_class"
multiple="true"
default="0"
required="false"
button="true"
/> />
<!-- Note_update_server_note_zip Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_update_server_note_zip Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_zip" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_DESCRIPTION" heading="h4" class="alert alert-info note_update_server_note_zip" /> <field type="note" name="note_update_server_note_zip" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_UPDATE_SERVER_NOTE_ZIP_DESCRIPTION" heading="h4" class="alert alert-info note_update_server_note_zip" />

View File

@ -131,16 +131,14 @@ class ComponentbuilderModelJoomla_components extends JModelList
{ {
// set custom folder path // set custom folder path
$this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); $this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
// set the backup paths
$comConfig = JFactory::getConfig();
$this->backupPath = $comConfig->get('tmp_path');
// check what type of export or backup this is // check what type of export or backup this is
if ('backup' === $this->activeType || 'manualBackup' === $this->activeType) if ('backup' === $this->activeType || 'manualBackup' === $this->activeType)
{ {
// set the paths // set the zip path
if (!$this->backupPath = $this->params->get('cronjob_backup_folder_path', null)) $this->zipPath = $this->params->get('cronjob_backup_folder_path', $this->backupPath);
{
// set the paths
$comConfig = JFactory::getConfig();
$this->backupPath = $comConfig->get('tmp_path');
}
// check what backup type we are working with here // check what backup type we are working with here
$this->backupType = $this->params->get('cronjob_backup_type', 1); // 1 = local folder; 2 = remote server (default is local) $this->backupType = $this->params->get('cronjob_backup_type', 1); // 1 = local folder; 2 = remote server (default is local)
// if remote server get the ID // if remote server get the ID
@ -162,9 +160,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
} }
else else
{ {
// set the paths // set the zip path
$comConfig = JFactory::getConfig(); $this->zipPath = $this->backupPath;
$this->backupPath = $comConfig->get('tmp_path');
// set the package name // set the package name
if (count($items) == 1) if (count($items) == 1)
{ {
@ -177,7 +174,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
} }
// set the package path // set the package path
$this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName; $this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName;
$this->zipPath = $this->packagePath .'.zip'; $this->zipPath = rtrim($this->zipPath, '/') . '/' . $this->packageName .'.zip';
if (JFolder::exists($this->packagePath)) if (JFolder::exists($this->packagePath))
{ {
// remove if old folder is found // remove if old folder is found
@ -187,7 +184,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
JFolder::create($this->packagePath); JFolder::create($this->packagePath);
// Get the basic encryption. // Get the basic encryption.
$basickey = ComponentbuilderHelper::getCryptKey('basic'); $basickey = ComponentbuilderHelper::getCryptKey('basic');
// Get the encription object. // Get the encryption object.
if ($basickey) if ($basickey)
{ {
$basic = new FOFEncryptAes($basickey, 128); $basic = new FOFEncryptAes($basickey, 128);

View File

@ -45,7 +45,8 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin
), ),
'above' => array( 'above' => array(
'system_name', 'system_name',
'module_version' 'module_version',
'target'
) )
), ),
'script_file' => array( 'script_file' => array(
@ -66,19 +67,6 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin
'php_method_uninstall' 'php_method_uninstall'
) )
), ),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
)
),
'readme' => array( 'readme' => array(
'left' => array( 'left' => array(
'addreadme', 'addreadme',
@ -93,6 +81,19 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin
'sql_uninstall' 'sql_uninstall'
) )
), ),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
)
),
'code' => array( 'code' => array(
'left' => array( 'left' => array(
'custom_get' 'custom_get'

View File

@ -28,7 +28,8 @@ class ComponentbuilderModelJoomla_modules extends JModelList
'a.created_by','created_by', 'a.created_by','created_by',
'a.modified_by','modified_by', 'a.modified_by','modified_by',
'a.system_name','system_name', 'a.system_name','system_name',
'a.description','description' 'a.description','description',
'a.target','target'
); );
} }
@ -55,6 +56,9 @@ class ComponentbuilderModelJoomla_modules extends JModelList
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description); $this->setState('filter.description', $description);
$target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target');
$this->setState('filter.target', $target);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting); $this->setState('filter.sorting', $sorting);
@ -111,10 +115,44 @@ class ComponentbuilderModelJoomla_modules extends JModelList
} }
} }
// set selection value to a translatable value
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert target
$item->target = $this->selectionTranslation($item->target, 'target');
}
}
// return items // return items
return $items; return $items;
} }
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of target language strings
if ($name === 'target')
{
$targetArray = array(
1 => 'COM_COMPONENTBUILDER_JOOMLA_MODULE_SITE',
2 => 'COM_COMPONENTBUILDER_JOOMLA_MODULE_ADMIN'
);
// Now check if value is found in this array
if (isset($targetArray[$value]) && ComponentbuilderHelper::checkString($targetArray[$value]))
{
return $targetArray[$value];
}
}
return $value;
}
/** /**
* Method to build an SQL query to load the list data. * Method to build an SQL query to load the list data.
* *
@ -174,6 +212,11 @@ class ComponentbuilderModelJoomla_modules extends JModelList
} }
} }
// Filter by Target.
if ($target = $this->getState('filter.target'))
{
$query->where('a.target = ' . $db->quote($db->escape($target)));
}
// Add the list ordering clause. // Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
@ -203,6 +246,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList
$id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.system_name'); $id .= ':' . $this->getState('filter.system_name');
$id .= ':' . $this->getState('filter.description'); $id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.target');
return parent::getStoreId($id); return parent::getStoreId($id);
} }

File diff suppressed because one or more lines are too long

View File

@ -101,6 +101,9 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules&task=joomla_m
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
</td> </td>
<td class="hidden-phone">
<?php echo JText::_($item->target); ?>
</td>
<td class="hidden-phone"> <td class="hidden-phone">
<?php echo $this->escape($item->description); ?> <?php echo $this->escape($item->description); ?>
</td> </td>

View File

@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
?> ?>
<tr> <tr>
<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td> <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
</tr> </tr>

View File

@ -32,6 +32,9 @@ defined('_JEXEC') or die('Restricted access');
<th class="nowrap" > <th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL', 'system_name', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_JOOMLA_MODULE_SYSTEM_NAME_LABEL', 'system_name', $this->listDirn, $this->listOrder); ?>
</th> </th>
<th class="nowrap hidden-phone" >
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL'); ?>
</th>
<th class="nowrap hidden-phone" > <th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_JOOMLA_MODULE_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
</th> </th>

View File

@ -185,6 +185,36 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text') JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
); );
} }
// Set Target Selection
$this->targetOptions = $this->getTheTargetSelections();
// We do some sanitation for Target filter
if (ComponentbuilderHelper::checkArray($this->targetOptions) &&
isset($this->targetOptions[0]->value) &&
!ComponentbuilderHelper::checkString($this->targetOptions[0]->value))
{
unset($this->targetOptions[0]);
}
// Only load Target filter if it has values
if (ComponentbuilderHelper::checkArray($this->targetOptions))
{
// Target Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL').' -',
'filter_target',
JHtml::_('select.options', $this->targetOptions, 'value', 'text', $this->state->get('filter.target'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Target Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_JOOMLA_MODULE_TARGET_LABEL').' -',
'batch[target]',
JHtml::_('select.options', $this->targetOptions, 'value', 'text')
);
}
}
} }
/** /**
@ -235,4 +265,40 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy
'a.id' => JText::_('JGRID_HEADING_ID') 'a.id' => JText::_('JGRID_HEADING_ID')
); );
} }
protected function getTheTargetSelections()
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('target'));
$query->from($db->quoteName('#__componentbuilder_joomla_module'));
$query->order($db->quoteName('target') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// get model
$model = $this->getModel();
$results = array_unique($results);
$_filter = array();
foreach ($results as $target)
{
// Translate the target selection
$text = $model->selectionTranslation($target,'target');
// Now add the target and its text to the options array
$_filter[] = JHtml::_('select.option', $target, JText::_($text));
}
return $_filter;
}
return false;
}
} }

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>27th February, 2020</creationDate> <creationDate>13th March, 2020</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.</copyright> <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> <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.10.11</version> <version>2.10.12</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.2.10.11)</h1> <h1>Component Builder (v.2.10.12)</h1>
<div style="clear: both;"></div> <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. <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

@ -934,4 +934,21 @@
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl> <maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/> <targetplatform name="joomla" version="3.*"/>
</update> </update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.10.12</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> </updates>

View File

@ -5938,9 +5938,9 @@ class com_componentbuilderInstallerScript
$joomla_module->type_title = 'Componentbuilder Joomla_module'; $joomla_module->type_title = 'Componentbuilder Joomla_module';
$joomla_module->type_alias = 'com_componentbuilder.joomla_module'; $joomla_module->type_alias = 'com_componentbuilder.joomla_module';
$joomla_module->table = '{"special": {"dbtable": "#__componentbuilder_joomla_module","key": "id","type": "Joomla_module","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $joomla_module->table = '{"special": {"dbtable": "#__componentbuilder_joomla_module","key": "id","type": "Joomla_module","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$joomla_module->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "default","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","description":"description","add_php_postflight_install":"add_php_postflight_install","add_php_preflight_uninstall":"add_php_preflight_uninstall","update_server":"update_server","update_server_target":"update_server_target","addreadme":"addreadme","add_sql":"add_sql","snippet":"snippet","libraries":"libraries","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","default":"default","add_sql_uninstall":"add_sql_uninstall","add_update_server":"add_update_server","not_required":"not_required","module_version":"module_version","sales_server":"sales_server","custom_get":"custom_get","php_preflight_update":"php_preflight_update","php_preflight_uninstall":"php_preflight_uninstall","mod_code":"mod_code","php_postflight_install":"php_postflight_install","add_class_helper":"add_class_helper","php_postflight_update":"php_postflight_update","add_class_helper_header":"add_class_helper_header","php_method_uninstall":"php_method_uninstall","class_helper_header":"class_helper_header","sql":"sql","class_helper_code":"class_helper_code","sql_uninstall":"sql_uninstall","readme":"readme","add_php_script_construct":"add_php_script_construct","update_server_url":"update_server_url","php_script_construct":"php_script_construct","add_php_preflight_install":"add_php_preflight_install","php_preflight_install":"php_preflight_install","add_sales_server":"add_sales_server","add_php_preflight_update":"add_php_preflight_update","guid":"guid","name":"name"}}'; $joomla_module->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "default","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","target":"target","description":"description","add_php_method_uninstall":"add_php_method_uninstall","add_php_postflight_update":"add_php_postflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_preflight_uninstall":"add_php_preflight_uninstall","addreadme":"addreadme","not_required":"not_required","default":"default","snippet":"snippet","add_sql":"add_sql","update_server_target":"update_server_target","add_sql_uninstall":"add_sql_uninstall","update_server":"update_server","add_update_server":"add_update_server","libraries":"libraries","module_version":"module_version","sales_server":"sales_server","custom_get":"custom_get","php_preflight_update":"php_preflight_update","php_preflight_uninstall":"php_preflight_uninstall","mod_code":"mod_code","php_postflight_install":"php_postflight_install","add_class_helper":"add_class_helper","php_postflight_update":"php_postflight_update","add_class_helper_header":"add_class_helper_header","php_method_uninstall":"php_method_uninstall","class_helper_header":"class_helper_header","sql":"sql","class_helper_code":"class_helper_code","sql_uninstall":"sql_uninstall","readme":"readme","add_php_script_construct":"add_php_script_construct","update_server_url":"update_server_url","php_script_construct":"php_script_construct","add_php_preflight_install":"add_php_preflight_install","php_preflight_install":"php_preflight_install","add_sales_server":"add_sales_server","add_php_preflight_update":"add_php_preflight_update","guid":"guid","name":"name"}}';
$joomla_module->router = 'ComponentbuilderHelperRoute::getJoomla_moduleRoute'; $joomla_module->router = 'ComponentbuilderHelperRoute::getJoomla_moduleRoute';
$joomla_module->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_module.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_postflight_install","add_php_preflight_uninstall","update_server","update_server_target","addreadme","add_sql","snippet","add_php_postflight_update","add_php_method_uninstall","add_sql_uninstall","add_update_server","sales_server","add_class_helper","add_class_helper_header","add_php_script_construct","add_php_preflight_install","add_sales_server","add_php_preflight_update"],"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": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; $joomla_module->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_module.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","target","add_php_method_uninstall","add_php_postflight_update","add_php_postflight_install","add_php_preflight_uninstall","addreadme","snippet","add_sql","update_server_target","add_sql_uninstall","update_server","add_update_server","sales_server","add_class_helper","add_class_helper_header","add_php_script_construct","add_php_preflight_install","add_sales_server","add_php_preflight_update"],"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": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table. // Set the object into the content types table.
$joomla_module_Inserted = $db->insertObject('#__content_types', $joomla_module); $joomla_module_Inserted = $db->insertObject('#__content_types', $joomla_module);
@ -7380,9 +7380,9 @@ class com_componentbuilderInstallerScript
$joomla_module->type_title = 'Componentbuilder Joomla_module'; $joomla_module->type_title = 'Componentbuilder Joomla_module';
$joomla_module->type_alias = 'com_componentbuilder.joomla_module'; $joomla_module->type_alias = 'com_componentbuilder.joomla_module';
$joomla_module->table = '{"special": {"dbtable": "#__componentbuilder_joomla_module","key": "id","type": "Joomla_module","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $joomla_module->table = '{"special": {"dbtable": "#__componentbuilder_joomla_module","key": "id","type": "Joomla_module","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$joomla_module->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "default","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","description":"description","add_php_postflight_install":"add_php_postflight_install","add_php_preflight_uninstall":"add_php_preflight_uninstall","update_server":"update_server","update_server_target":"update_server_target","addreadme":"addreadme","add_sql":"add_sql","snippet":"snippet","libraries":"libraries","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","default":"default","add_sql_uninstall":"add_sql_uninstall","add_update_server":"add_update_server","not_required":"not_required","module_version":"module_version","sales_server":"sales_server","custom_get":"custom_get","php_preflight_update":"php_preflight_update","php_preflight_uninstall":"php_preflight_uninstall","mod_code":"mod_code","php_postflight_install":"php_postflight_install","add_class_helper":"add_class_helper","php_postflight_update":"php_postflight_update","add_class_helper_header":"add_class_helper_header","php_method_uninstall":"php_method_uninstall","class_helper_header":"class_helper_header","sql":"sql","class_helper_code":"class_helper_code","sql_uninstall":"sql_uninstall","readme":"readme","add_php_script_construct":"add_php_script_construct","update_server_url":"update_server_url","php_script_construct":"php_script_construct","add_php_preflight_install":"add_php_preflight_install","php_preflight_install":"php_preflight_install","add_sales_server":"add_sales_server","add_php_preflight_update":"add_php_preflight_update","guid":"guid","name":"name"}}'; $joomla_module->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "default","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","target":"target","description":"description","add_php_method_uninstall":"add_php_method_uninstall","add_php_postflight_update":"add_php_postflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_preflight_uninstall":"add_php_preflight_uninstall","addreadme":"addreadme","not_required":"not_required","default":"default","snippet":"snippet","add_sql":"add_sql","update_server_target":"update_server_target","add_sql_uninstall":"add_sql_uninstall","update_server":"update_server","add_update_server":"add_update_server","libraries":"libraries","module_version":"module_version","sales_server":"sales_server","custom_get":"custom_get","php_preflight_update":"php_preflight_update","php_preflight_uninstall":"php_preflight_uninstall","mod_code":"mod_code","php_postflight_install":"php_postflight_install","add_class_helper":"add_class_helper","php_postflight_update":"php_postflight_update","add_class_helper_header":"add_class_helper_header","php_method_uninstall":"php_method_uninstall","class_helper_header":"class_helper_header","sql":"sql","class_helper_code":"class_helper_code","sql_uninstall":"sql_uninstall","readme":"readme","add_php_script_construct":"add_php_script_construct","update_server_url":"update_server_url","php_script_construct":"php_script_construct","add_php_preflight_install":"add_php_preflight_install","php_preflight_install":"php_preflight_install","add_sales_server":"add_sales_server","add_php_preflight_update":"add_php_preflight_update","guid":"guid","name":"name"}}';
$joomla_module->router = 'ComponentbuilderHelperRoute::getJoomla_moduleRoute'; $joomla_module->router = 'ComponentbuilderHelperRoute::getJoomla_moduleRoute';
$joomla_module->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_module.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_postflight_install","add_php_preflight_uninstall","update_server","update_server_target","addreadme","add_sql","snippet","add_php_postflight_update","add_php_method_uninstall","add_sql_uninstall","add_update_server","sales_server","add_class_helper","add_class_helper_header","add_php_script_construct","add_php_preflight_install","add_sales_server","add_php_preflight_update"],"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": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; $joomla_module->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_module.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","target","add_php_method_uninstall","add_php_postflight_update","add_php_postflight_install","add_php_preflight_uninstall","addreadme","snippet","add_sql","update_server_target","add_sql_uninstall","update_server","add_update_server","sales_server","add_class_helper","add_class_helper_header","add_php_script_construct","add_php_preflight_install","add_sales_server","add_php_preflight_update"],"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": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}';
// Check if joomla_module type is already in content_type DB. // Check if joomla_module type is already in content_type DB.
$joomla_module_id = null; $joomla_module_id = null;
@ -9115,7 +9115,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder"> echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.10.11 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.10.12 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already. // Set db if not set already.
if (!isset($db)) if (!isset($db))