Compare commits

...

18 Commits

Author SHA1 Message Date
2562473f8c File and folder path fix for Joomla 3.9.25 2021-03-10 21:14:19 +02:00
5ae7bb76ef Added the company name set in the GUI as the exported company value for excel. 2021-03-09 01:12:35 +02:00
08d529aba9 Continued to add the namespacing for the file and folder classes across the system. gh-682 2021-03-09 00:36:30 +02:00
1279a5d2f9 Added the namespacing for the file and folder classes to the compiler. gh-682 2021-03-08 06:02:12 +02:00
552a2664ba Adds the namespacing to the compiler classes for the File, and Folder classes of Joomla. 2021-03-07 23:40:55 +02:00
3c3951ae83 Converted all files from dos to unix, as most servers are UNIX based anyway. This fixes the linebreak mismatching issue mentioned in gh-638. 2021-03-05 05:08:47 +02:00
192d44b477 Stable Release 2.12.8 2021-03-05 03:42:38 +02:00
1dfc674318 Fixed gh-678 moved the compilation success message out of the redirection message to a user state message, that get loaded to the page on successful compilation. This preserves the button scripts needed to install the compiled packages. 2021-03-04 08:13:05 +02:00
934cf839c5 Stable release v2.12.7 2021-02-21 11:29:10 +02:00
8abe3bced8 Adds the option to select between old and new gif animation in the compiler GUI area. 2021-02-20 01:53:14 +02:00
e579cd421a Changed the compiler gif image, and improved the overall compiler GUI experience. Added the feature for dynamic hashing of strings and or files. 2021-02-19 02:35:54 +02:00
9f59578f8c Adds update server link. Set v2.12.6. Little bug fix on the Component admin list view. 2021-02-02 23:13:59 +02:00
54a86fb530 Reordered some helper class code in the GUI. Fixed gh-663 so that the label is used in the filter instead of the code_name. Renames field to Modeling Method in the field area. 2021-01-30 15:41:35 +02:00
60f4e8af32 Added new filters to admin, and custom admin, and site list view. gh-651 2021-01-19 00:10:59 +02:00
30cb1a531a Improved how the filters in the langauge translation are behave when no language is found. gh-651 2021-01-18 19:42:28 +02:00
3357f2cb40 Added new filters to language translation, and fields admin list view. resolved gh-651 2021-01-18 19:20:26 +02:00
bb414c980c Removes the custom component field from JCB. Made some filters to be multiple selection in site & component list view. Adds the combo field more correctly to JCB. 2021-01-15 09:13:20 +02:00
12600431ca Resolves gh-644 and addes the option to add, or hide the category sub-menu of a view. 2021-01-06 12:03:07 +02:00
1656 changed files with 120379 additions and 118001 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.9) 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*: 10th March, 2021
+ *Version*: 2.12.9
+ *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*: **292188**
+ *Field count*: **1629**
+ *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.9) 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*: 10th March, 2021
+ *Version*: 2.12.9
+ *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*: **292188**
+ *Field count*: **1629**
+ *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

@ -107,6 +107,7 @@
<action name="class_property.import" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT_DESC" />
<action name="compiler.access" title="COM_COMPONENTBUILDER_COMPILER_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC" />
<action name="compiler.clear_tmp" title="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="compiler.compiler_animations" title="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC" />
<action name="compiler.dashboard_list" title="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC" />
<action name="compiler.run_expansion" title="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="compiler.submenu" title="COM_COMPONENTBUILDER_COMPILER_SUBMENU" description="COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC" />

View File

@ -10,4 +10,10 @@
/* CSS Document */
html, body {
background-color: #fefcfe !important;
}
.jcb-sponsor-banner {
-webkit-box-shadow: 0 0 7px 1px #f0f0f0;
box-shadow: 0 0 7px 1px #f0f0f0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 KiB

View File

@ -569,12 +569,12 @@ abstract class ###Component###Helper
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPathModel))
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;

View File

@ -201,12 +201,12 @@ abstract class ###Component###Helper
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPathModel))
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -227,7 +229,7 @@ class ###Component###ModelImport extends JModelLegacy
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -383,12 +385,12 @@ class ###Component###ModelImport extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}###IMPORT_SETDATA_METHOD######IMPORT_SAVE_METHOD###

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -116,8 +118,7 @@ class ###Component###Model###View### extends JModelLegacy
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -274,12 +275,12 @@ class ###Component###Model###View### extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}
###IMPORT_SETDATA_METHOD###

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
###CUSTOM_ADMIN_VIEW_HTML_HEADER###
/**
* ###Component### View class for the ###SView###
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###ADMIN_VIEW_HTML_HEADER###
/**
* ###View### View class
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###SITE_ADMIN_VIEW_HTML_HEADER###
/**
* ###View### View class
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
###ADMIN_VIEWS_HTML_HEADER###
/**
* ###Component### View class for the ###Views###
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
###CUSTOM_ADMIN_VIEWS_HTML_HEADER###
/**
* ###Component### View class for the ###SViews###
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_GET_MODULE_JIMPORT###
###SITE_VIEWS_HTML_HEADER###
/**
* ###Component### View class for the ###SViews###
*/

View File

@ -16,7 +16,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_GET_MODULE_JIMPORT###
###SITE_VIEW_HTML_HEADER###
/**
* ###Component### View class for the ###SView###
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
JHTML::_('behavior.modal');
/**
@ -97,12 +99,12 @@ class com_###component###InstallerScript
{###PREINSTALLSCRIPT###
}
// check if the PHPExcel stuff is still around
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php'))
if (File::exists(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php'))
{
// We need to remove this old PHPExcel folder
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel');
// We need to remove this old PHPExcel file
JFile::delete(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php');
File::delete(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php');
}
return true;
}
@ -141,7 +143,7 @@ class com_###component###InstallerScript
*/
protected function removeFolder($dir, $ignore = false)
{
if (JFolder::exists($dir))
if (Folder::exists($dir))
{
$it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -171,7 +173,7 @@ class com_###component###InstallerScript
{
continue;
}
JFolder::delete($file_dir);
Folder::delete($file_dir);
}
else
{
@ -190,13 +192,13 @@ class com_###component###InstallerScript
{
continue;
}
JFile::delete($file_dir);
File::delete($file_dir);
}
}
// delete the root folder if not ignore found
if (!$this->checkArray($ignore))
{
return JFolder::delete($dir);
return Folder::delete($dir);
}
return true;
}

View File

@ -657,6 +657,24 @@
name="compiler_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_COMPILER">
<!-- Builder_gif_size Field. Type: List. (joomla) -->
<field
type="list"
name="builder_gif_size"
label="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
default="480-272">
<!-- Option Set. -->
<option value="480-272">
COM_COMPONENTBUILDER_CONFIG_ORIGINAL_VDM</option>
<option value="480-540">
COM_COMPONENTBUILDER_CONFIG_THREED_PARTICLE_EXPLORATIONS</option>
</field>
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
<field
type="plugins"
@ -667,8 +685,8 @@
folder="extension"
filter="cmd"
/>
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
<!-- Add_menu_prefix Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -699,8 +717,8 @@
autocomplete="on"
showon="add_menu_prefix:1"
/>
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
<!-- Minify Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -715,8 +733,8 @@
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
<!-- Spacer_hr_eight Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_eight" hr="true" class="spacer_hr_eight" />
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
<!-- Language Field. Type: Lang. (custom) -->
@ -757,8 +775,8 @@
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Spacer_hr_eight Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_eight" hr="true" class="spacer_hr_eight" />
<!-- Spacer_hr_nine Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_nine" hr="true" class="spacer_hr_nine" />
<!-- Assets_table_fix Field. Type: List. (joomla) -->
<field
type="list"
@ -857,9 +875,9 @@
min="1"
showon="development_method:2">
<form hidden="true" name="list_expansion_modal" repeat="true">
<!-- Component Field. Type: Component. (custom) -->
<!-- Component Field. Type: Joomlacomponent. (custom) -->
<field
type="component"
type="joomlacomponent"
name="component"
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL"
class="list_class"

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

@ -37,6 +37,36 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
return;
}
/**
* get all the animations used in the compiler
*
* @return true on success
*/
public function getCompilerAnimations()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS');
// currently only administrators can compile a component
if($user->authorise('compiler.compiler_animations', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
if ($model->getCompilerAnimations($message))
{
$message = JText::_('COM_COMPONENTBUILDER_BALL_THE_COMPILER_ANIMATIONS_WERE_SUCCESSFULLY_DOWNLOADED_TO_THIS_JOOMLA_INSTALLB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Run the Compiler
*
@ -225,8 +255,10 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$message[] = '<p><small><b>Remember!</b> This zip file is in your tmp folder and therefore publicly accessible until you click [Clear tmp]!</small> </p>';
}
$message[] = '<p><small>Compilation took <b>'.$model->compiler->secondsCompiled.'</b> seconds to complete.</small> </p>';
// pass the message via the user state... wow this is painful
$app->setUserState('com_componentbuilder.success_message', implode(PHP_EOL, $message));
// set redirect
$this->setRedirect($redirect_url, implode(PHP_EOL, $message), 'message');
$this->setRedirect($redirect_url, '<h2>Successful Build!</h2>', 'message');
$app->setUserState('com_componentbuilder.component_folder_name', $model->compiler->filepath['component-folder']);
// check if we have modules
if ($add_module_install)
@ -248,6 +280,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
// set redirect
$this->setRedirect($redirect_url, $message);
}
@ -288,6 +321,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
// loop and install all extensions found
foreach ($fileNames as $fileName)
@ -342,6 +376,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
if ($this->installExtension($fileName))
{
@ -379,6 +414,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
if (ComponentbuilderHelper::checkArray($fileNames))
{
@ -421,6 +457,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
if (ComponentbuilderHelper::checkArray($fileNames))
{
@ -534,6 +571,14 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
// get application
$app = JFactory::getApplication();
// wipe out the user c-m-p since we are done with them all
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
return true;
}
}

View File

@ -172,6 +172,14 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
// get application
$app = JFactory::getApplication();
// wipe out the user c-m-p since we are done with them all
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.modules_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
$app->setUserState('com_componentbuilder.success_message', '');
return true;
}
}

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
// Use the component builder autoloader
ComponentbuilderHelper::autoLoader();
@ -391,7 +393,7 @@ class Compiler extends Infusion
// first we do the static files
foreach ($this->newFiles['static'] as $static)
{
if (JFile::exists($static['path']))
if (File::exists($static['path']))
{
$this->setFileContent(
$static['name'], $static['path'], $bom
@ -410,7 +412,7 @@ class Compiler extends Infusion
{
if ($file['view'] == $view)
{
if (JFile::exists($file['path']))
if (File::exists($file['path']))
{
$this->setFileContent(
$file['name'], $file['path'], $bom,
@ -492,7 +494,7 @@ class Compiler extends Infusion
// update the module files
foreach ($this->newFiles[$module->key] as $module_file)
{
if (JFile::exists($module_file['path']))
if (File::exists($module_file['path']))
{
$this->setFileContent(
$module_file['name'], $module_file['path'],
@ -573,7 +575,7 @@ class Compiler extends Infusion
// update the plugin files
foreach ($this->newFiles[$plugin->key] as $plugin_file)
{
if (JFile::exists($plugin_file['path']))
if (File::exists($plugin_file['path']))
{
$this->setFileContent(
$plugin_file['name'], $plugin_file['path'],
@ -674,7 +676,7 @@ class Compiler extends Infusion
$update_server_xml_path = $this->componentPath . '/'
. $this->updateServerFileName . '.xml';
// make sure we have the correct file
if (JFile::exists($update_server_xml_path)
if (File::exists($update_server_xml_path)
&& isset($this->componentData->update_server))
{
// move to server
@ -685,7 +687,7 @@ class Compiler extends Infusion
$this->componentData->update_server_protocol
);
// remove the local file
JFile::delete($update_server_xml_path);
File::delete($update_server_xml_path);
}
}
// move the plugins update server to host
@ -702,7 +704,7 @@ class Compiler extends Infusion
&& is_numeric($plugin->update_server)
&& $plugin->update_server > 0
&& isset($plugin->update_server_xml_path)
&& JFile::exists($plugin->update_server_xml_path)
&& File::exists($plugin->update_server_xml_path)
&& isset($plugin->update_server_xml_file_name)
&& ComponentbuilderHelper::checkString(
$plugin->update_server_xml_file_name
@ -716,7 +718,7 @@ class Compiler extends Infusion
$plugin->update_server_protocol
);
// remove the local file
JFile::delete($plugin->update_server_xml_path);
File::delete($plugin->update_server_xml_path);
}
}
}
@ -810,7 +812,7 @@ class Compiler extends Infusion
if (('README.md' === $static['name']
|| 'README.txt' === $static['name'])
&& $this->componentData->addreadme
&& JFile::exists($static['path']))
&& File::exists($static['path']))
{
$this->setReadMe($static['path']);
$two++;
@ -934,7 +936,7 @@ class Compiler extends Infusion
// remove old data
$this->removeFolder($repoFullPath, $this->componentData->toignore);
// set the new data
JFolder::copy($this->componentPath, $repoFullPath, '', true);
Folder::copy($this->componentPath, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
$this->triggerEvent(
'jcb_ce_onAfterUpdateRepo',
@ -967,7 +969,7 @@ class Compiler extends Infusion
$repoFullPath, $this->componentData->toignore
);
// set the new data
JFolder::copy(
Folder::copy(
$module->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
@ -1004,7 +1006,7 @@ class Compiler extends Infusion
$repoFullPath, $this->componentData->toignore
);
// set the new data
JFolder::copy(
Folder::copy(
$plugin->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
@ -1050,13 +1052,12 @@ class Compiler extends Infusion
&$this->componentData)
);
// copy the zip to backup path
JFile::copy(
File::copy(
$this->filepath['component'],
$this->backupPath . '/' . $this->componentBackupName
. '.zip'
);
}
// move to sales server host
if ($this->componentData->add_sales_server == 1
&& $this->dynamicIntegration)
@ -1145,7 +1146,7 @@ class Compiler extends Infusion
&$module)
);
// copy the zip to backup path
JFile::copy(
File::copy(
$this->filepath['modules'][$module->id],
$this->backupPath . '/' . $module->zip_name
. '.zip'
@ -1239,7 +1240,7 @@ class Compiler extends Infusion
&$plugin)
);
// copy the zip to backup path
JFile::copy(
File::copy(
$this->filepath['plugins'][$plugin->id],
$this->backupPath . '/' . $plugin->zip_name
. '.zip'
@ -1325,7 +1326,7 @@ class Compiler extends Infusion
}
$counter = 0;
// check if file exist
if (JFile::exists($file))
if (File::exists($file))
{
foreach (
new SplFileObject($file) as $lineNumber => $lineContent

View File

@ -12,6 +12,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/**
* Get class as the main compilers class
*/
@ -5245,6 +5248,8 @@ class Get
{
$script = $this->setGuiCodePlaceholder($script, $config);
}
// add Dynamic HASHING option of a file/string
$script = $this->setDynamicHASHING($script);
// add base64 locking option of a string
$script = $this->setBase64LOCK($script);
// load the script
@ -7246,7 +7251,7 @@ class Get
if ((!filter_var($target, FILTER_VALIDATE_URL) === false
&& ComponentbuilderHelper::urlExists($target))
|| (JPath::clean($target) === $target
&& JFile::exists($target)))
&& File::exists($target)))
{
$this->getExternalCodeString($target, $bucket);
}
@ -10337,12 +10342,12 @@ class Get
foreach ($paths as $target => $path)
{
// we are changing the working directory to the componet path
// we are changing the working directory to the component path
chdir($path);
foreach ($fileTypes as $type)
{
// get a list of files in the current directory tree (only PHP, JS and XML for now)
$files = JFolder::files('.', $type, true, true);
$files = Folder::files('.', $type, true, true);
// check if files found
if (ComponentbuilderHelper::checkArray($files))
{
@ -10796,6 +10801,67 @@ class Get
}
}
/**
* Set a hash of a file and/or string
*
* @param string $string The code string
*
* @return string
*
*/
protected function setDynamicHASHING($script)
{
// check if we should hash a string
if (strpos($script, 'HASHSTRING((((') !== false)
{
// get the strings
$values = ComponentbuilderHelper::getAllBetween(
$script, 'HASHSTRING((((', '))))'
);
$locker = array();
// convert them
foreach ($values as $value)
{
$locker['HASHSTRING((((' . $value . '))))']
= md5($value);
}
// update the script
return $this->setPlaceholders($script, $locker);
}
// check if we should hash a file
if (strpos($script, 'HASHFILE((((') !== false)
{
// get the strings
$values = ComponentbuilderHelper::getAllBetween(
$script, 'HASHFILE((((', '))))'
);
$locker = array();
// convert them
foreach ($values as $path)
{
// we first get the file if it exist
if ($value = ComponentbuilderHelper::getFileContents($path))
{
// now we hash the file content
$locker['HASHFILE((((' . $path . '))))']
= md5($value);
}
else
{
// could not retrieve the file so we show error
$locker['HASHFILE((((' . $path . '))))']
= 'ERROR';
}
}
// update the script
return $this->setPlaceholders($script, $locker);
}
return $script;
}
/**
* Lock a string with bsae64 (basic)
*
@ -11477,7 +11543,7 @@ class Get
// check if the local install is found
foreach ($localPaths as $key => $localPath)
{
if (!JFolder::exists($localPath))
if (!Folder::exists($localPath))
{
unset($localPaths[$key]);
}

View File

@ -12,6 +12,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/**
* Structure class
*/
@ -1403,12 +1406,12 @@ class Structure extends Get
private function createFolder($path)
{
// check if the path exist
if (!JFolder::exists(
if (!Folder::exists(
$path
))
{
// create the path
JFolder::create(
Folder::create(
$path
);
// count the folder created
@ -1436,9 +1439,9 @@ class Structure extends Get
array(&$this->componentContext, &$this->libraries)
);
// creat the main component folder
if (!JFolder::exists($this->componentPath))
if (!Folder::exists($this->componentPath))
{
JFolder::create($this->componentPath);
Folder::create($this->componentPath);
// count the folder created
$this->folderCount++;
$this->indexHTML('');
@ -1736,9 +1739,9 @@ class Structure extends Get
))
{
// creat the main component folder
if (!JFolder::exists($this->componentPath))
if (!Folder::exists($this->componentPath))
{
JFolder::create($this->componentPath);
Folder::create($this->componentPath);
// count the folder created
$this->folderCount++;
$this->indexHTML('');
@ -1995,7 +1998,7 @@ class Structure extends Get
// now move the file
if ($details->type === 'file')
{
if (!JFile::exists($currentFullPath))
if (!File::exists($currentFullPath))
{
$this->app->enqueueMessage(
JText::_('<hr /><h3>File Path Error</h3>'), 'Error'
@ -2014,12 +2017,12 @@ class Structure extends Get
basename($packageFullPath), '', $packageFullPath
);
// check if path exist, if not creat it
if (!JFolder::exists($packageFullPath0nly))
if (!Folder::exists($packageFullPath0nly))
{
JFolder::create($packageFullPath0nly);
Folder::create($packageFullPath0nly);
}
// move the file to its place
JFile::copy($currentFullPath, $packageFullPath);
File::copy($currentFullPath, $packageFullPath);
// count the file created
$this->fileCount++;
// store the new files
@ -2054,7 +2057,7 @@ class Structure extends Get
}
elseif ($details->type === 'folder')
{
if (!JFolder::exists($currentFullPath))
if (!Folder::exists($currentFullPath))
{
$this->app->enqueueMessage(
JText::_('<hr /><h3>Folder Path Error</h3>'),
@ -2070,7 +2073,7 @@ class Structure extends Get
else
{
// move the folder to its place
JFolder::copy(
Folder::copy(
$currentFullPath, $packageFullPath, '', true
);
// count the folder created
@ -2359,13 +2362,13 @@ class Structure extends Get
if (!isset($this->extentionTrackingFilesMoved[$check]))
{
// check files exist
if (JFile::exists(
if (File::exists(
$this->componentPath . '/admin/models/fields/'
. $field['type_name'] . '.php'
))
{
// copy the custom field
JFile::copy(
File::copy(
$this->componentPath . '/admin/models/fields/'
. $field['type_name'] . '.php',
$path . '/fields/' . $field['type_name'] . '.php'
@ -2386,14 +2389,14 @@ class Structure extends Get
if (!isset($this->extentionTrackingFilesMoved[$check]))
{
// check files exist
if (JFile::exists(
if (File::exists(
$this->componentPath . '/admin/models/rules/'
. $this->validationLinkedFields[$field['field']]
. '.php'
))
{
// copy the custom field
JFile::copy(
File::copy(
$this->componentPath . '/admin/models/rules/'
. $this->validationLinkedFields[$field['field']]
. '.php', $path . '/rules/'
@ -2651,9 +2654,9 @@ class Structure extends Get
}
// setup the folder
if (!JFolder::exists($path))
if (!Folder::exists($path))
{
JFolder::create($path);
Folder::create($path);
$this->indexHTML($zipPath);
// count the folder created
$this->folderCount++;
@ -2683,10 +2686,10 @@ class Structure extends Get
{
$new = $item;
}
if (!JFile::exists($path . '/' . $new))
if (!File::exists($path . '/' . $new))
{
// move the file to its place
JFile::copy(
File::copy(
$this->templatePath . '/' . $item,
$path . '/' . $new
);
@ -3043,7 +3046,7 @@ class Structure extends Get
// use path if exist
if (strlen($path) > 0)
{
JFile::copy(
File::copy(
$this->templatePath . '/index.html',
$root . $path . '/index.html'
);
@ -3052,7 +3055,7 @@ class Structure extends Get
}
else
{
JFile::copy(
File::copy(
$this->templatePath . '/index.html', $root . '/index.html'
);
// count the file created

View File

@ -1321,15 +1321,18 @@ class Fields extends Structure
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
$this->setLine(__LINE__) . " Was added due to Permissions JS needing a Title field"
$this->setLine(__LINE__)
. " Was added due to Permissions JS needing a Title field"
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
$this->setLine(__LINE__) . " Let us know at gh-629 should this change"
$this->setLine(__LINE__)
. " Let us know at gh-629 should this change"
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
$this->setLine(__LINE__) . " https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235"
$this->setLine(__LINE__)
. " https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235"
);
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
@ -1486,6 +1489,7 @@ class Fields extends Structure
{
// set the permission for later
$this->hasPermissions[$nameSingleCode] = true;
// break out here
return true;
}
@ -1508,6 +1512,7 @@ class Fields extends Structure
{
// set the permission for later
$this->hasPermissions[$nameSingleCode] = true;
// break out here
return true;
}
@ -1530,12 +1535,14 @@ class Fields extends Structure
{
// set the permission for later
$this->hasPermissions[$nameSingleCode] = true;
// break out here
return true;
}
}
}
}
return $this->hasPermissions[$nameSingleCode];
}
@ -4724,6 +4731,31 @@ class Fields extends Structure
);
}
else
{
// if label was set use instead
if (ComponentbuilderHelper::checkString($langLabel))
{
$listLangName = $langLabel;
// get field label from the lang label
if (isset($this->langContent[$this->lang][$langLabel]))
{
$listFieldName
= $this->langContent[$this->lang][$langLabel];
}
else
{
// get it from the field xml string
$listFieldName = (string) $this->setPlaceholders(
ComponentbuilderHelper::getBetween(
$field['settings']->xml, 'label="',
'"'
), $this->placeholders
);
}
// make sure there is no html in the list field name
$listFieldName = strip_tags($listFieldName);
}
else
{
// set lang (just in case)
$listLangName = $langView . '_'
@ -4734,10 +4766,6 @@ class Fields extends Structure
$this->setLangContent(
$this->lang, $listLangName, $listFieldName
);
// if label was set use instead
if (ComponentbuilderHelper::checkString($langLabel))
{
$listLangName = $langLabel;
}
}
// build the list values
@ -4960,7 +4988,8 @@ class Fields extends Structure
// load the category builder - TODO must move all to single view
$this->categoryBuilder[$nameListCode] = array('code' => $name,
'name' => $listLangName,
'extension' => $_extension);
'extension' => $_extension,
'filter' => $field['filter']);
// also set code name for title alias fix
$this->catCodeBuilder[$nameSingleCode] = array('code' => $name,
'views' => $otherViews,
@ -5779,7 +5808,9 @@ class Fields extends Structure
&& ComponentbuilderHelper::checkArray(
$this->categoryBuilder[$nameListCode]
)
&& isset($this->categoryBuilder[$nameListCode]['extension']))
&& isset($this->categoryBuilder[$nameListCode]['extension'])
&& isset($this->categoryBuilder[$nameListCode]['filter'])
&& $this->categoryBuilder[$nameListCode]['filter'] >= 1)
{
$field_filter_sets[] = $this->_t(2) . '<field';
$field_filter_sets[] = $this->_t(3) . 'type="category"';

View File

@ -12,6 +12,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/**
* Compiler class
*/
@ -1010,11 +1013,9 @@ class Interpretation extends Fields
. " Prep the path a little";
$function[] = $this->_t(2)
. "\$path = '/'. trim(str_replace('//', '/', \$path), '/');";
$function[] = $this->_t(2)
. "jimport('joomla.filesystem.folder');";
$function[] = $this->_t(2) . "///" . $this->setLine(__LINE__)
$function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Check if folder exist";
$function[] = $this->_t(2) . "if (!JFolder::exists(\$path))";
$function[] = $this->_t(2) . "if (!Folder::exists(\$path))";
$function[] = $this->_t(2) . "{";
$function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Lock key.";
@ -1565,12 +1566,15 @@ class Interpretation extends Fields
{
if ($this->addEximport)
{
// we use the company name set in the GUI
$company_name = $this->fileContentStatic[$this->hhh . 'COMPANYNAME' . $this->hhh];
// start building the xml function
$exel = array();
$exel[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
$exel[] = $this->_t(1) . "* Prepares the xml document";
$exel[] = $this->_t(1) . "*/";
$exel[] = $this->_t(1)
. "public static function xls(\$rows, \$fileName = null, \$title = null, \$subjectTab = null, \$creator = 'Joomla Component Builder', \$description = null, \$category = null,\$keywords = null, \$modified = null)";
. "public static function xls(\$rows, \$fileName = null, \$title = null, \$subjectTab = null, \$creator = '$company_name', \$description = null, \$category = null,\$keywords = null, \$modified = null)";
$exel[] = $this->_t(1) . "{";
$exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " set the user";
@ -1611,7 +1615,7 @@ class Interpretation extends Fields
. " Set document properties";
$exel[] = $this->_t(2) . "\$spreadsheet->getProperties()";
$exel[] = $this->_t(3) . "->setCreator(\$creator)";
$exel[] = $this->_t(3) . "->setCompany('Joomla Component Builder')";
$exel[] = $this->_t(3) . "->setCompany('$company_name')";
$exel[] = $this->_t(3) . "->setLastModifiedBy(\$modified)";
$exel[] = $this->_t(3) . "->setTitle(\$title)";
$exel[] = $this->_t(3) . "->setSubject(\$subjectTab);";
@ -6660,7 +6664,7 @@ class Interpretation extends Fields
__LINE__
) . " check if the CSS file exists.";
$setter .= PHP_EOL . $tabV . $this->_t(5)
. "if (JFile::exists(JPATH_ROOT.'/media/com_"
. "if (File::exists(JPATH_ROOT.'/media/com_"
. $this->componentCodeName
. "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))";
$setter .= PHP_EOL . $tabV . $this->_t(5) . "{";
@ -6679,7 +6683,7 @@ class Interpretation extends Fields
__LINE__
) . " check if the JavaScript file exists.";
$setter .= PHP_EOL . $tabV . $this->_t(5)
. "if (JFile::exists(JPATH_ROOT.'/media/com_"
. "if (File::exists(JPATH_ROOT.'/media/com_"
. $this->componentCodeName
. "/uikit-v2/js/components/'.\$name.\$size.'.js'))";
$setter .= PHP_EOL . $tabV . $this->_t(5) . "{";
@ -6717,11 +6721,6 @@ class Interpretation extends Fields
. $this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh] . "Helper::checkArray(\$uikitComp))";
$setter .= PHP_EOL . $tabV . $this->_t(2) . "{";
$setter .= PHP_EOL . $tabV . $this->_t(3) . "//" . $this->setLine(
__LINE__
) . " load just in case.";
$setter .= PHP_EOL . $tabV . $this->_t(3)
. "jimport('joomla.filesystem.file');";
$setter .= PHP_EOL . $tabV . $this->_t(3) . "//" . $this->setLine(
__LINE__
) . " loading...";
@ -6736,7 +6735,7 @@ class Interpretation extends Fields
__LINE__
) . " check if the CSS file exists.";
$setter .= PHP_EOL . $tabV . $this->_t(5)
. "if (JFile::exists(JPATH_ROOT.'/media/com_"
. "if (File::exists(JPATH_ROOT.'/media/com_"
. $this->componentCodeName
. "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))";
$setter .= PHP_EOL . $tabV . $this->_t(5) . "{";
@ -6755,7 +6754,7 @@ class Interpretation extends Fields
__LINE__
) . " check if the JavaScript file exists.";
$setter .= PHP_EOL . $tabV . $this->_t(5)
. "if (JFile::exists(JPATH_ROOT.'/media/com_"
. "if (File::exists(JPATH_ROOT.'/media/com_"
. $this->componentCodeName
. "/uikit-v2/js/components/'.\$name.\$size.'.js'))";
$setter .= PHP_EOL . $tabV . $this->_t(5) . "{";
@ -7225,7 +7224,7 @@ class Interpretation extends Fields
$file
))
{
if (JFile::exists($file['path']))
if (File::exists($file['path']))
{
$string = ComponentbuilderHelper::getFileContents(
$file['path']
@ -7241,7 +7240,7 @@ class Interpretation extends Fields
{
if (ComponentbuilderHelper::checkArray($doc))
{
if (JFile::exists($doc['path']))
if (File::exists($doc['path']))
{
$string
= ComponentbuilderHelper::getFileContents(
@ -8675,7 +8674,7 @@ class Interpretation extends Fields
$script[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " get all the folders";
$script[] = $this->_t(2)
. "\$folders = JFolder::folders(\$installPath);";
. "\$folders = Folder::folders(\$installPath);";
$script[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " check if we have folders we may want to copy";
$script[] = $this->_t(2)
@ -8697,7 +8696,7 @@ class Interpretation extends Fields
$script[] = $this->_t(5) . "//" . $this->setLine(__LINE__)
. " now try to copy the folder";
$script[] = $this->_t(5)
. "if (!JFolder::copy(\$src, \$dest, '', true))";
. "if (!Folder::copy(\$src, \$dest, '', true))";
$script[] = $this->_t(5) . "{";
$script[] = $this->_t(6)
. "\$app->enqueueMessage('Could not copy '.\$folder.' folder into place, please make sure destination is writable!', 'error');";
@ -15723,10 +15722,13 @@ class Interpretation extends Fields
{
$categoryCodeName = $this->categoryBuilder[$nameListCode]['code'];
$addCategory = true;
$addCategoryFilter
= $this->categoryBuilder[$nameListCode]['filter'];
}
else
{
$addCategory = false;
$addCategoryFilter = 0;
}
// setup the query
$query = "//" . $this->setLine(__LINE__) . " Get the user object.";
@ -15842,7 +15844,7 @@ class Interpretation extends Fields
// set other filters
$query .= $this->setFilterQuery($nameListCode);
// add the category
if ($addCategory)
if ($addCategory && $addCategoryFilter >= 1)
{
$query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
__LINE__
@ -18653,7 +18655,9 @@ class Interpretation extends Fields
&& ComponentbuilderHelper::checkArray(
$this->categoryBuilder[$nameListCode]
)
&& isset($this->categoryBuilder[$nameListCode]['extension']))
&& isset($this->categoryBuilder[$nameListCode]['extension'])
&& isset($this->categoryBuilder[$nameListCode]['filter'])
&& $this->categoryBuilder[$nameListCode]['filter'] >= 1)
{
// set filter
$filter[] = PHP_EOL . $this->_t(2) . "//"
@ -22341,6 +22345,7 @@ class Interpretation extends Fields
break;
case 'admin.helper':
case 'site.helper':
$headers[] = 'use Joomla\CMS\Filesystem\File;';
$headers[] = 'use Joomla\CMS\Language\Language;';
$headers[] = 'use Joomla\Registry\Registry;';
$headers[] = 'use Joomla\String\StringHelper;';
@ -22382,6 +22387,26 @@ class Interpretation extends Fields
case 'site.views':
$headers = array();
break;
case 'admin.view.html':
case 'admin.views.html':
case 'site.admin.view.html':
case 'site.view.html':
case 'site.views.html':
case 'custom.admin.view.html':
case 'custom.admin.views.html':
// add a space
$headers = array('');
// load the file class if uikit is being loaded
if ((2 == $this->uikit || 1 == $this->uikit)
&& isset($this->uikitComp[$viewsCodeName])
&& ComponentbuilderHelper::checkArray(
$this->uikitComp[$viewsCodeName]
))
{
$headers[] = 'use Joomla\CMS\Filesystem\File;';
$headers[] = '';
}
break;
default:
$headers[] = 'use Joomla\Utilities\ArrayHelper;';
break;
@ -22442,7 +22467,9 @@ class Interpretation extends Fields
&& ComponentbuilderHelper::checkArray(
$this->categoryBuilder[$nameListCode]
)
&& isset($this->categoryBuilder[$nameListCode]['extension']))
&& isset($this->categoryBuilder[$nameListCode]['extension'])
&& isset($this->categoryBuilder[$nameListCode]['filter'])
&& $this->categoryBuilder[$nameListCode]['filter'] >= 1)
{
// is found so add it
$add_category = true;
@ -22466,18 +22493,28 @@ class Interpretation extends Fields
if (isset($filter['multi'])
&& $filter['multi'] == 2)
{
// if this is a category we should make sure it must be added
if (!$add_category && $filter['type'] === 'category')
{
continue;
}
elseif ($add_category && $filter['type'] === 'category')
{
// already added here so no need to add again
$add_category = false;
}
// check if this was an access field
elseif ($filter['type'] === 'accesslevel')
{
// already added here so no need to add again
$add_access_levels = false;
}
// add the header
$headers[]
= 'JHtml::_(\'formbehavior.chosen\', \'.multiple'
. $filter['class']
. '\', null, array(\'placeholder_text_multiple\' => \'- \' . JText::_(\''
. $filter['lang_select'] . '\') . \' -\'));';
// check if this was an access field
if ($filter['type'] === 'accesslevel')
{
// already added here so no need to add again
$add_access_levels = false;
}
}
elseif ($add_category && $filter['type'] === 'category')
{
@ -22717,7 +22754,7 @@ class Interpretation extends Fields
{
$imagePath = $this->componentPath . '/admin/assets/images';
// move the image to its place
JFile::copy(
File::copy(
JPATH_SITE . '/' . $path,
$imagePath . '/vdm-component.' . $type
);
@ -22966,7 +23003,7 @@ class Interpretation extends Fields
$imageName = $name . '.' . $type;
}
// move the image to its place
JFile::copy(
File::copy(
JPATH_SITE . '/' . $path, $imagePath . '/' . $imageName
);
}
@ -23390,27 +23427,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 +23457,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 +23473,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 +23518,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 +23532,7 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
)
&& in_array(
$nameSingle,
$nameSingleCode,
$this->permissionBuilder['global'][$core['core.access']]
))
{
@ -23508,13 +23550,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 +23569,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)
@ -28163,9 +28206,9 @@ function vdm_dkim() {
$path = $module->folder_path . '/language/' . $tag
. '/';
// create path if not exist
if (!JFolder::exists($path))
if (!Folder::exists($path))
{
JFolder::create($path);
Folder::create($path);
// count the folder created
$this->folderCount++;
}
@ -28192,8 +28235,8 @@ function vdm_dkim() {
}
}
// get all files and folders in module folder
$files = JFolder::files($module->folder_path);
$folders = JFolder::folders($module->folder_path);
$files = Folder::files($module->folder_path);
$folders = Folder::folders($module->folder_path);
// the files/folders to ignore
$ignore = array('sql', 'language', 'script.php',
$module->file_name . '.xml',
@ -28521,9 +28564,9 @@ function vdm_dkim() {
$path = $plugin->folder_path . '/language/' . $tag
. '/';
// create path if not exist
if (!JFolder::exists($path))
if (!Folder::exists($path))
{
JFolder::create($path);
Folder::create($path);
// count the folder created
$this->folderCount++;
}
@ -28553,8 +28596,8 @@ function vdm_dkim() {
}
}
// get all files and folders in plugin folder
$files = JFolder::files($plugin->folder_path);
$folders = JFolder::folders($plugin->folder_path);
$files = Folder::files($plugin->folder_path);
$folders = Folder::folders($plugin->folder_path);
// the files/folders to ignore
$ignore = array('sql', 'language', 'script.php',
$plugin->file_name . '.xml',

View File

@ -12,6 +12,9 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/**
* Infusion class
*/
@ -645,6 +648,13 @@ class Infusion extends Interpretation
'site.admin.view.model',
$nameSingleCode
);
// SITE_ADMIN_VIEW_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$nameSingleCode][$this->hhh
. 'SITE_ADMIN_VIEW_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'site.admin.view.html',
$nameSingleCode
);
// SITE_ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$nameSingleCode][$this->hhh
. 'SITE_ADMIN_VIEW_HEADER' . $this->hhh]
@ -674,6 +684,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'admin.view.model', $nameSingleCode
);
// ADMIN_VIEW_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$nameSingleCode][$this->hhh
. 'ADMIN_VIEW_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'admin.view.html', $nameSingleCode
);
// ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$nameSingleCode][$this->hhh
. 'ADMIN_VIEW_HEADER' . $this->hhh]
@ -1046,6 +1062,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'admin.views.model', $nameListCode
);
// ADMIN_VIEWS_HTML_HEADER <<<DYNAMIC>>> add the header details for the views
$this->fileContentDynamic[$nameListCode][$this->hhh
. 'ADMIN_VIEWS_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'admin.views.html', $nameListCode
);
// ADMIN_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the views
$this->fileContentDynamic[$nameListCode][$this->hhh
. 'ADMIN_VIEWS_HEADER' . $this->hhh]
@ -1507,6 +1529,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'custom.admin.view.model', $view['settings']->code
);
// CUSTOM_ADMIN_VIEW_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEW_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'custom.admin.view.html', $view['settings']->code
);
// CUSTOM_ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEW_HEADER' . $this->hhh]
@ -1529,6 +1557,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'custom.admin.views.model', $view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEWS_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'custom.admin.views.html', $view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEWS_HEADER' . $this->hhh]
@ -2023,6 +2057,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'site.view.model', $view['settings']->code
);
// SITE_VIEW_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'SITE_VIEW_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'site.view.html', $view['settings']->code
);
// SITE_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'SITE_VIEW_HEADER' . $this->hhh]
@ -2051,6 +2091,12 @@ class Infusion extends Interpretation
= $this->setFileHeader(
'site.views.model', $view['settings']->code
);
// SITE_VIEWS_HTML_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'SITE_VIEWS_HTML_HEADER' . $this->hhh]
= $this->setFileHeader(
'site.views.html', $view['settings']->code
);
// SITE_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the view
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'SITE_VIEWS_HEADER' . $this->hhh]
@ -2620,14 +2666,14 @@ class Infusion extends Interpretation
// build the path to place the lang file
$path = $this->componentPath . '/' . $p . '/language/'
. $tag . '/';
if (!JFolder::exists($path))
if (!Folder::exists($path))
{
JFolder::create($path);
Folder::create($path);
// count the folder created
$this->folderCount++;
}
// move the file to its place
JFile::copy($getPAth, $path . $file_name);
File::copy($getPAth, $path . $file_name);
// count the file created
$this->fileCount++;
// add content to it

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -183,6 +183,8 @@ COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access"
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler."
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access"
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS="Compiler Compiler Animations Button Access"
COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC="Allows the users in this group to access the compiler animations button."
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List"
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access"

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

@ -31,7 +31,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'note_libraries_selection',
'libraries',
'note_add_language_string'
'note_add_php_language_string'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -0,0 +1,22 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
?>
<div class="well well-small">
<h2 class="module-title nav-header"><?= JText::_('COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD') ?></h2>
<div class="proboard-md"><small><?= JText::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://vdm.bz/get-jcb-pro-membership" target="_blank" style="color:gray">JCB PRO</a></small></div>
</div>

View File

@ -15,23 +15,15 @@ defined('JPATH_BASE') or die('Restricted access');
?>
<div id="noticeboard">
<?php echo JHtml::_('bootstrap.startTabSet', 'compiler_tab', array('active' => 'vdm-noticeboard')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'compiler_tab', 'vdm-noticeboard', JText::_('COM_COMPONENTBUILDER_VDM_BOARD', true)); ?>
<div class="well well-small">
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD'); ?><span id="vdm-new-notice" style="display:none; color:red;"> (<?php echo JText::_('COM_COMPONENTBUILDER_NEW_NOTICE'); ?>)</span></h2>
<div id="noticeboard-md"><small><?php echo JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING'); ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray">&lt;&lt;ewe&gt;&gt;yn</a></small></div>
</div>
<div id="<?= $displayData['id'] ?>">
<?= JHtml::_('bootstrap.startTabSet', $displayData['id'] . '_tab', array('active' => $displayData['active'] . '-noticeboard')) ?>
<?= JHtml::_('bootstrap.addTab', $displayData['id'] . '_tab', 'vdm-noticeboard', JText::_('COM_COMPONENTBUILDER_VDM_BOARD', true)) ?>
<?= JLayoutHelper::render('jcbnoticeboardvdm', null) ?>
<div><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'compiler_tab', 'proboard', JText::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)); ?>
<div class="well well-small">
<h2 class="module-title nav-header"><?php echo JText::_('COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD'); ?></h2>
<div id="proboard-md"><small><?php echo JText::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING'); ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://vdm.bz/get-jcb-pro-membership" target="_blank" style="color:gray">JCB PRO</a></small></div>
</div>
<div><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?= JHtml::_('bootstrap.endTab'); ?>
<?= JHtml::_('bootstrap.addTab', $displayData['id'] . '_tab', 'pro-noticeboard', JText::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)) ?>
<?= JLayoutHelper::render('jcbnoticeboardpro', null) ?>
<div><?= ComponentbuilderHelper::getDynamicContent('banner', '728-90') ?></div>
<?= JHtml::_('bootstrap.endTab') ?>
<?= JHtml::_('bootstrap.endTabSet') ?>
</div>

View File

@ -0,0 +1,22 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
?>
<div class="well well-small">
<h2 class="module-title nav-header"><?= JText::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD') ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?= JText::_('COM_COMPONENTBUILDER_NEW_NOTICE') ?>)</span></h2>
<div class="noticeboard-md"><small><?= JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray">&lt;&lt;ewe&gt;&gt;yn</a></small></div>
</div>

View File

@ -30,7 +30,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'libraries',
'note_libraries_options',
'note_add_language_string'
'note_add_php_language_string'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -31,7 +31,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'note_libraries_selection',
'libraries',
'note_add_language_string'
'note_add_php_language_string'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -31,7 +31,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'note_libraries_selection',
'libraries',
'note_add_language_string'
'note_add_php_language_string'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();

View File

@ -31,7 +31,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description',
'note_libraries_selection',
'libraries',
'note_add_language_string'
'note_add_php_language_string'
);
$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

@ -44,6 +44,51 @@ class ComponentbuilderModelAdmin_views extends JModelList
parent::__construct($config);
}
/**
* Get the filter form - Override the parent method
*
* @param array $data data
* @param boolean $loadData load current data
*
* @return \JForm|boolean The \JForm object or false on error
*
* @since JCB 2.12.5
*/
public function getFilterForm($data = array(), $loadData = true)
{
// load form from the parent class
$form = parent::getFilterForm($data, $loadData);
// Create the "joomla_component" filter
$attributes = array(
'name' => 'joomla_component',
'type' => 'list',
'onchange' => 'this.form.submit();',
);
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_NO_COMPONENTS_FOUND') . ' -'
);
// check if we have joomla components
if (($joomla_components = ComponentbuilderHelper::getByTypeTheIdsSystemNames('joomla_component')) !== false)
{
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_SELECT_COMPONENT') . ' -'
);
// make sure we do not lose the key values in normal merge
$options = $options + $joomla_components;
}
$form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter');
$form->setValue(
'joomla_component',
'filter',
$this->state->get("filter.joomla_component")
);
array_push($this->filter_fields, 'joomla_component');
return $form;
}
/**
* Method to auto-populate the model state.
*
@ -301,6 +346,25 @@ class ComponentbuilderModelAdmin_views extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "joomla components"
$filter_joomla_component = $this->state->get("filter.joomla_component");
if ($filter_joomla_component !== null && !empty($filter_joomla_component))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_joomla_component, 'joomla_component_admin_views')) !== false)
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $ids) . ')');
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
}
}
}
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
@ -345,7 +409,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.')');
}
}
@ -516,6 +580,25 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "joomla components"
$filter_joomla_component = $this->state->get("filter.joomla_component");
if ($filter_joomla_component !== null && !empty($filter_joomla_component))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_joomla_component, 'joomla_component_admin_views')) !== false)
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $ids) . ')');
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
}
}
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
@ -546,48 +629,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 +695,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

@ -156,6 +156,51 @@ class ComponentbuilderModelCompiler extends JModelList
return $db->loadObjectList();
}
public function getCompilerAnimations(&$errorMessage)
{
// convert error message to array
$errorMessage = array();
$searchArray = array(
// add banners (width - height)
'banner' => array(
'728-90',
'160-600'
),
// The build-gif by size (width - height)
'builder-gif' => array(
'480-540'
)
);
// start search, and get
foreach ($searchArray as $type => $sizes)
{
// per size
foreach ($sizes as $size)
{
// get size
if (($set_size = ComponentbuilderHelper::getDynamicContentSize($type, $size)) !== 0)
{
// we loop over all type size artwork
for ($target = 1; $target <= $set_size; $target++)
{
if (!ComponentbuilderHelper::getDynamicContent($type, $size, false, 0, $target))
{
$errorMessage[] = JText::sprintf('COM_COMPONENTBUILDER_S_S_NUMBER_BSB_COULD_NOT_BE_DOWNLOADED_SUCCESSFULLY_TO_THIS_JOOMLA_INSTALL', $type, $size, $target);
}
}
}
}
}
// check if we had any errors
if (ComponentbuilderHelper::checkArray($errorMessage))
{
// flatten the error message array
$errorMessage = implode('<br />', $errorMessage);
return false;
}
return true;
}
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
{
$set['version'] = $version;

View File

@ -560,7 +560,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList
var getUrl = "index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true";
}
if(token.length > 0 && notice.length){
var request = "token="+token+"&notice="+notice;
var request = token+"=1&notice="+notice;
}
return jQuery.ajax({
type: "POST",

View File

@ -34,7 +34,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
'description',
'note_libraries_selection',
'libraries',
'note_add_language_string'
'note_add_php_language_string'
),
'right' => array(
'icon',

View File

@ -42,6 +42,51 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
parent::__construct($config);
}
/**
* Get the filter form - Override the parent method
*
* @param array $data data
* @param boolean $loadData load current data
*
* @return \JForm|boolean The \JForm object or false on error
*
* @since JCB 2.12.5
*/
public function getFilterForm($data = array(), $loadData = true)
{
// load form from the parent class
$form = parent::getFilterForm($data, $loadData);
// Create the "joomla_component" filter
$attributes = array(
'name' => 'joomla_component',
'type' => 'list',
'onchange' => 'this.form.submit();',
);
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_NO_COMPONENTS_FOUND') . ' -'
);
// check if we have joomla components
if (($joomla_components = ComponentbuilderHelper::getByTypeTheIdsSystemNames('joomla_component')) !== false)
{
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_SELECT_COMPONENT') . ' -'
);
// make sure we do not lose the key values in normal merge
$options = $options + $joomla_components;
}
$form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter');
$form->setValue(
'joomla_component',
'filter',
$this->state->get("filter.joomla_component")
);
array_push($this->filter_fields, 'joomla_component');
return $form;
}
/**
* Method to auto-populate the model state.
*
@ -240,6 +285,25 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a'));
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "joomla components"
$filter_joomla_component = $this->state->get("filter.joomla_component");
if ($filter_joomla_component !== null && !empty($filter_joomla_component))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_joomla_component, 'joomla_component_custom_admin_views')) !== false)
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $ids) . ')');
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
}
}
}
// From the componentbuilder_dynamic_get table.
$query->select($db->quoteName('g.name','main_get_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_dynamic_get', 'g') . ' ON (' . $db->quoteName('a.main_get') . ' = ' . $db->quoteName('g.id') . ')');
@ -309,6 +373,29 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
{
$query->where('a.main_get = ' . $db->quote($db->escape($_main_get)));
}
elseif (ComponentbuilderHelper::checkArray($_main_get))
{
// Secure the array for the query
$_main_get = array_map( function ($val) use(&$db) {
if (is_numeric($val))
{
if (is_float($val))
{
return (float) $val;
}
else
{
return (int) $val;
}
}
elseif (ComponentbuilderHelper::checkString($val))
{
return $db->quote($db->escape($val));
}
}, $_main_get);
// Filter by the Main_get Array.
$query->where('a.main_get IN (' . implode(',', $_main_get) . ')');
}
// Filter by Add_php_ajax.
$_add_php_ajax = $this->getState('filter.add_php_ajax');
if (is_numeric($_add_php_ajax))
@ -402,6 +489,25 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "joomla components"
$filter_joomla_component = $this->state->get("filter.joomla_component");
if ($filter_joomla_component !== null && !empty($filter_joomla_component))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_joomla_component, 'joomla_component_custom_admin_views')) !== false)
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $ids) . ')');
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
}
}
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
@ -528,7 +634,18 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.main_get');
// Check if the value is an array
$_main_get = $this->getState('filter.main_get');
if (ComponentbuilderHelper::checkArray($_main_get))
{
$id .= ':' . implode(':', $_main_get);
}
// Check if this is only an number or string
elseif (is_numeric($_main_get)
|| ComponentbuilderHelper::checkString($_main_get))
{
$id .= ':' . $_main_get;
}
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_custom_button');
$id .= ':' . $this->getState('filter.system_name');

View File

@ -45,6 +45,62 @@ class ComponentbuilderModelFields extends JModelList
parent::__construct($config);
}
/**
* Get the filter form - Override the parent method
*
* @param array $data data
* @param boolean $loadData load current data
*
* @return \JForm|boolean The \JForm object or false on error
*
* @since JCB 2.12.5
*/
public function getFilterForm($data = array(), $loadData = true)
{
// load form from the parent class
$form = parent::getFilterForm($data, $loadData);
// Create the "extension" filter
$form->setField(new SimpleXMLElement(
ComponentbuilderHelper::getExtensionGroupedListXml()
),'filter');
$form->setValue(
'extension',
'filter',
$this->state->get("filter.extension")
);
array_push($this->filter_fields, 'extension');
// Create the "admin_view" filter
$attributes = array(
'name' => 'admin_view',
'type' => 'list',
'onchange' => 'this.form.submit();',
);
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_NO_ADMIN_VIEWS_FOUND') . ' -'
);
// check if we have admin views (and limit to an extension if it is set)
if (($admin_views = ComponentbuilderHelper::getByTypeTheIdsSystemNames('admin_view', $this->state->get("filter.extension"))) !== false)
{
$options = array(
'' => '- ' . JText::_('COM_COMPONENTBUILDER_SELECT_ADMIN_VIEW') . ' -'
);
// make sure we do not lose the key values in normal merge
$options = $options + $admin_views;
}
$form->setField(ComponentbuilderHelper::getFieldXML($attributes, $options),'filter');
$form->setValue(
'admin_view',
'filter',
$this->state->get("filter.admin_view")
);
array_push($this->filter_fields, 'admin_view');
return $form;
}
/**
* Method to auto-populate the model state.
*
@ -311,6 +367,52 @@ class ComponentbuilderModelFields extends JModelList
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "extension"
$filter_extension = $this->state->get("filter.extension");
$field_ids = array();
$get_ids = true;
if ($get_ids && $filter_extension !== null && !empty($filter_extension))
{
// column name, and id
$type_extension = explode('__', $filter_extension);
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($type_extension[1], $type_extension[0])) !== false)
{
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// Filtering "admin_view"
$filter_admin_view = $this->state->get("filter.admin_view");
if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_admin_view, 'admin_view')) !== false)
{
// view will return less fields, so we ignore the component
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// now check if we have IDs
if ($get_ids && ComponentbuilderHelper::checkArray($field_ids))
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $field_ids) . ')');
}
}
// From the componentbuilder_fieldtype table.
$query->select($db->quoteName('g.name','fieldtype_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.id') . ')');
@ -529,6 +631,52 @@ class ComponentbuilderModelFields extends JModelList
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "extension"
$filter_extension = $this->state->get("filter.extension");
$field_ids = array();
$get_ids = true;
if ($get_ids && $filter_extension !== null && !empty($filter_extension))
{
// column name, and id
$type_extension = explode('__', $filter_extension);
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($type_extension[1], $type_extension[0])) !== false)
{
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// Filtering "admin_view"
$filter_admin_view = $this->state->get("filter.admin_view");
if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_admin_view, 'admin_view')) !== false)
{
// view will return less fields, so we ignore the component
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// now check if we have IDs
if ($get_ids && ComponentbuilderHelper::checkArray($field_ids))
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $field_ids) . ')');
}
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -41,6 +41,9 @@ class JFormFieldAdminlistvieworderfields extends JFormFieldList
$jinput = JFactory::getApplication()->input;
// get the id
$adminView = $jinput->getInt('id', 0);
// set the field trackers
$fieldIds = array();
$sortIds = array();
// check if we have an admin view
if (is_numeric($adminView) && $adminView >= 1)
{
@ -58,7 +61,37 @@ class JFormFieldAdminlistvieworderfields extends JFormFieldList
if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 3)
&& isset($addField['sort']) && $addField['sort'])
{
$fieldIds[] = (int) $addField['field'];
$fieldIds[(int) $addField['field']] = (int) $addField['field'];
}
// do track all fields set as sorted
if (isset($addField['field']) && isset($addField['sort']) && $addField['sort'])
{
$sortIds[(int) $addField['field']] = (int) $addField['field'];
}
}
}
}
}
// get all the fields that are also having a relationship on the list view as sorted
if ($addFields = ComponentbuilderHelper::getVar('admin_fields_relations', (int) $adminView, 'admin_view', 'addrelations'))
{
if (ComponentbuilderHelper::checkJson($addFields))
{
$addFields = json_decode($addFields, true);
if (ComponentbuilderHelper::checkArray($addFields))
{
foreach($addFields as $addField)
{
// admin list view and ordering
if (isset($addField['joinfields']) && ComponentbuilderHelper::checkArray($addField['joinfields']))
{
foreach($addField['joinfields'] as $joinfield)
{
if (isset($sortIds[$joinfield]))
{
$fieldIds[(int) $joinfield] = (int) $joinfield;
}
}
}
}
}

View File

@ -44,6 +44,10 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
// now check if there are files in the folder
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
{
if ($this->multiple === false)
{
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_ADMIN_VIEW'));
}
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));

View File

@ -51,7 +51,7 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_FADE_IN_AFFECT') . ' -');
if ($results)
{

View File

@ -1,57 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Components Form Field class for the Componentbuilder component
*/
class JFormFieldComponents extends JFormFieldList
{
/**
* The components field type.
*
* @var string
*/
public $type = 'components';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->components_system_name);
}
}
return $options;
}
}

View File

@ -51,7 +51,7 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE_USED_IN_PLACEHOLDER') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_TYPE') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATA_TYPE') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES_TYPE') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MODELING_METHOD') . ' -');
if ($results)
{

View File

@ -17,16 +17,16 @@ jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Component Form Field class for the Componentbuilder component
* Joomlacomponent Form Field class for the Componentbuilder component
*/
class JFormFieldComponent extends JFormFieldList
class JFormFieldJoomlacomponent extends JFormFieldList
{
/**
* The component field type.
* The joomlacomponent field type.
*
* @var string
*/
public $type = 'component';
public $type = 'joomlacomponent';
/**
* Override to add new button

View File

@ -36,22 +36,22 @@ class JFormFieldJoomlacomponents extends JFormFieldList
protected function getOptions()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select an option');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->joomla_component_system_name);
$options[] = JHtml::_('select.option', $item->id, $item->components_system_name);
}
}
}
return $options;
return $options;
}
}

View File

@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
if ($results)
{

View File

@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_AREA') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_FOLDER') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_BEHAVIOR') . ' -');
if ($results)
{

View File

@ -53,6 +53,7 @@ class JFormFieldListfields extends JFormFieldList
// get the admin view ID
$adminView = $jinput->getInt('refid', 0);
}
// make sure we have the admin view ID
if (is_numeric($adminView) && $adminView >= 1)
{
// get all the fields linked to the admin view

View File

@ -44,6 +44,10 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
// now check if there are files in the folder
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
{
if ($this->multiple === false)
{
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_A_SITE_VIEW'));
}
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));

View File

@ -51,7 +51,7 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
if ($results)
{

View File

@ -265,6 +265,52 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// do not use these filters in the export method
if (!isset($_export) || !$_export)
{
// Filtering "extension"
$filter_extension = $this->state->get("filter.extension");
$field_ids = array();
$get_ids = true;
if ($get_ids && $filter_extension !== null && !empty($filter_extension))
{
// column name, and id
$type_extension = explode('__', $filter_extension);
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($type_extension[1], $type_extension[0])) !== false)
{
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// Filtering "admin_view"
$filter_admin_view = $this->state->get("filter.admin_view");
if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view))
{
if (($ids = ComponentbuilderHelper::getAreaLinkedIDs($filter_admin_view, 'admin_view')) !== false)
{
// view will return less fields, so we ignore the component
$field_ids = $ids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// now check if we have IDs
if ($get_ids && ComponentbuilderHelper::checkArray($field_ids))
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $field_ids) . ')');
}
}
// From the componentbuilder_fieldtype table.
$query->select($db->quoteName('g.name','fieldtype_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.id') . ')');

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

@ -150,8 +150,8 @@
required="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_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Note_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -93,9 +93,9 @@
default="componentbuilder custom_code"
/>
<!-- Dynamic Fields. -->
<!-- Component Field. Type: Component. (custom) -->
<!-- Component Field. Type: Joomlacomponent. (custom) -->
<field
type="component"
type="joomlacomponent"
name="component"
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
class="list_class"

View File

@ -86,8 +86,8 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.system_name ASC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING</option>
<option value="a.system_name DESC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING</option>
<option value="a.name_single ASC">COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_ASCENDING</option>
<option value="a.name_single DESC">COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_DESCENDING</option>
<option value="a.name_single ASC">COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_RECORD_ASCENDING</option>
<option value="a.name_single DESC">COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_RECORD_DESCENDING</option>
<option value="a.short_description ASC">COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_ASCENDING</option>
<option value="a.short_description DESC">COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>

View File

@ -34,7 +34,8 @@
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
multiple="false"
class="multipleMaingets"
multiple="true"
onchange="this.form.submit();"
/>
<field

View File

@ -31,7 +31,7 @@
onchange="this.form.submit();"
/>
<field
type="component"
type="joomlacomponent"
name="component"
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
multiple="false"
@ -78,14 +78,14 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="g.system_name ASC">COM_COMPONENTBUILDER_FILTER_COMPONENT_ASCENDING</option>
<option value="g.system_name DESC">COM_COMPONENTBUILDER_FILTER_COMPONENT_DESCENDING</option>
<option value="a.path ASC">COM_COMPONENTBUILDER_FILTER_PATH_ASCENDING</option>
<option value="a.path DESC">COM_COMPONENTBUILDER_FILTER_PATH_DESCENDING</option>
<option value="a.path ASC">COM_COMPONENTBUILDER_FILTER_FILE_PATH_ASCENDING</option>
<option value="a.path DESC">COM_COMPONENTBUILDER_FILTER_FILE_PATH_DESCENDING</option>
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING</option>
<option value="a.target DESC">COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING</option>
<option value="a.type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.comment_type ASC">COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_ASCENDING</option>
<option value="a.comment_type DESC">COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_DESCENDING</option>
<option value="a.type ASC">COM_COMPONENTBUILDER_FILTER_ADD_TYPE_ASCENDING</option>
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_ADD_TYPE_DESCENDING</option>
<option value="a.comment_type ASC">COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_USED_IN_PLACEHOLDER_ASCENDING</option>
<option value="a.comment_type DESC">COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_USED_IN_PLACEHOLDER_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -96,16 +96,16 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_FIELDTYPE_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_FIELDTYPE_DESCENDING</option>
<option value="a.datatype ASC">COM_COMPONENTBUILDER_FILTER_DATATYPE_ASCENDING</option>
<option value="a.datatype DESC">COM_COMPONENTBUILDER_FILTER_DATATYPE_DESCENDING</option>
<option value="a.indexes ASC">COM_COMPONENTBUILDER_FILTER_INDEXES_ASCENDING</option>
<option value="a.indexes DESC">COM_COMPONENTBUILDER_FILTER_INDEXES_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.datatype ASC">COM_COMPONENTBUILDER_FILTER_DATA_TYPE_ASCENDING</option>
<option value="a.datatype DESC">COM_COMPONENTBUILDER_FILTER_DATA_TYPE_DESCENDING</option>
<option value="a.indexes ASC">COM_COMPONENTBUILDER_FILTER_INDEXES_TYPE_ASCENDING</option>
<option value="a.indexes DESC">COM_COMPONENTBUILDER_FILTER_INDEXES_TYPE_DESCENDING</option>
<option value="a.null_switch ASC">COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_ASCENDING</option>
<option value="a.null_switch DESC">COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_DESCENDING</option>
<option value="a.store ASC">COM_COMPONENTBUILDER_FILTER_STORE_ASCENDING</option>
<option value="a.store DESC">COM_COMPONENTBUILDER_FILTER_STORE_DESCENDING</option>
<option value="a.store ASC">COM_COMPONENTBUILDER_FILTER_MODELING_METHOD_ASCENDING</option>
<option value="a.store DESC">COM_COMPONENTBUILDER_FILTER_MODELING_METHOD_DESCENDING</option>
<option value="category_title ASC">COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_ASCENDING</option>
<option value="category_title DESC">COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>

View File

@ -73,10 +73,10 @@
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.location ASC">COM_COMPONENTBUILDER_FILTER_LOCATION_ASCENDING</option>
<option value="a.location DESC">COM_COMPONENTBUILDER_FILTER_LOCATION_DESCENDING</option>
<option value="g. ASC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_ASCENDING</option>
<option value="g. DESC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_DESCENDING</option>
<option value="h. ASC">COM_COMPONENTBUILDER_FILTER_SITE_VIEW_ASCENDING</option>
<option value="h. DESC">COM_COMPONENTBUILDER_FILTER_SITE_VIEW_DESCENDING</option>
<option value="g. ASC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_ASCENDING</option>
<option value="g. DESC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_DESCENDING</option>
<option value="h. ASC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_ASCENDING</option>
<option value="h. DESC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -34,14 +34,16 @@
type="joomlacomponentsfiltercompanyname"
name="companyname"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL"
multiple="false"
class="multipleJoomlacomponentsfiltercompanyname"
multiple="true"
onchange="this.form.submit();"
/>
<field
type="joomlacomponentsfilterauthor"
name="author"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL"
multiple="false"
class="multipleJoomlacomponentsfilterauthor"
multiple="true"
onchange="this.form.submit();"
/>
<input type="hidden" name="form_submited" value="1"/>
@ -64,12 +66,16 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.system_name ASC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING</option>
<option value="a.system_name DESC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING</option>
<option value="a.name_code ASC">COM_COMPONENTBUILDER_FILTER_NAME_CODE_ASCENDING</option>
<option value="a.name_code DESC">COM_COMPONENTBUILDER_FILTER_NAME_CODE_DESCENDING</option>
<option value="a.name_code ASC">COM_COMPONENTBUILDER_FILTER_NAME_IN_CODE_ASCENDING</option>
<option value="a.name_code DESC">COM_COMPONENTBUILDER_FILTER_NAME_IN_CODE_DESCENDING</option>
<option value="a.short_description ASC">COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_ASCENDING</option>
<option value="a.short_description DESC">COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_DESCENDING</option>
<option value="a.companyname ASC">COM_COMPONENTBUILDER_FILTER_COMPANYNAME_ASCENDING</option>
<option value="a.companyname DESC">COM_COMPONENTBUILDER_FILTER_COMPANYNAME_DESCENDING</option>
<option value="a.companyname ASC">COM_COMPONENTBUILDER_FILTER_COMPANY_NAME_ASCENDING</option>
<option value="a.companyname DESC">COM_COMPONENTBUILDER_FILTER_COMPANY_NAME_DESCENDING</option>
<option value="a.created ASC">COM_COMPONENTBUILDER_FILTER_CREATED_DATE_ASCENDING</option>
<option value="a.created DESC">COM_COMPONENTBUILDER_FILTER_CREATED_DATE_DESCENDING</option>
<option value="a.modified ASC">COM_COMPONENTBUILDER_FILTER_MODIFIED_DATE_ASCENDING</option>
<option value="a.modified DESC">COM_COMPONENTBUILDER_FILTER_MODIFIED_DATE_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -57,8 +57,8 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_EXTENDS_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_EXTENDS_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -64,8 +64,8 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.system_name ASC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING</option>
<option value="a.system_name DESC">COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_DESCENDING</option>
<option value="g.name ASC">COM_COMPONENTBUILDER_FILTER_EXTENDS_ASCENDING</option>
<option value="g.name DESC">COM_COMPONENTBUILDER_FILTER_EXTENDS_DESCENDING</option>
<option value="h.name ASC">COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_ASCENDING</option>
<option value="h.name DESC">COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>

View File

@ -48,8 +48,8 @@
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.published ASC">JSTATUS_ASC</option>
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.source ASC">COM_COMPONENTBUILDER_FILTER_SOURCE_ASCENDING</option>
<option value="a.source DESC">COM_COMPONENTBUILDER_FILTER_SOURCE_DESCENDING</option>
<option value="a.source ASC">COM_COMPONENTBUILDER_FILTER_SOURCE_STRING_ASCENDING</option>
<option value="a.source DESC">COM_COMPONENTBUILDER_FILTER_SOURCE_STRING_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -50,8 +50,8 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="a.langtag ASC">COM_COMPONENTBUILDER_FILTER_LANGTAG_ASCENDING</option>
<option value="a.langtag DESC">COM_COMPONENTBUILDER_FILTER_LANGTAG_DESCENDING</option>
<option value="a.langtag ASC">COM_COMPONENTBUILDER_FILTER_LANGUAGE_TAG_ASCENDING</option>
<option value="a.langtag DESC">COM_COMPONENTBUILDER_FILTER_LANGUAGE_TAG_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -71,10 +71,10 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING</option>
<option value="a.target DESC">COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING</option>
<option value="a.type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_FOLDER_ASCENDING</option>
<option value="a.target DESC">COM_COMPONENTBUILDER_FILTER_TARGET_FOLDER_DESCENDING</option>
<option value="a.type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_BEHAVIOR_ASCENDING</option>
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_BEHAVIOR_DESCENDING</option>
<option value="a.description ASC">COM_COMPONENTBUILDER_FILTER_DESCRIPTION_ASCENDING</option>
<option value="a.description DESC">COM_COMPONENTBUILDER_FILTER_DESCRIPTION_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>

View File

@ -48,10 +48,10 @@
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.published ASC">JSTATUS_ASC</option>
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING</option>
<option value="a.target DESC">COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING</option>
<option value="a.value ASC">COM_COMPONENTBUILDER_FILTER_VALUE_ASCENDING</option>
<option value="a.value DESC">COM_COMPONENTBUILDER_FILTER_VALUE_DESCENDING</option>
<option value="a.target ASC">COM_COMPONENTBUILDER_FILTER_TARGET_STRING_PLACEHOLDER_ASCENDING</option>
<option value="a.target DESC">COM_COMPONENTBUILDER_FILTER_TARGET_STRING_PLACEHOLDER_DESCENDING</option>
<option value="a.value ASC">COM_COMPONENTBUILDER_FILTER_SET_STRING_VALUE_ASCENDING</option>
<option value="a.value DESC">COM_COMPONENTBUILDER_FILTER_SET_STRING_VALUE_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -34,7 +34,8 @@
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
multiple="false"
class="multipleMaingets"
multiple="true"
onchange="this.form.submit();"
/>
<field

View File

@ -12,16 +12,6 @@
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
@ -42,10 +32,6 @@
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_BY_LABEL"
@ -170,6 +156,22 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT"
/>
<!-- Php_admin_event Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_admin_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Php_site_event Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -186,21 +188,15 @@
filter="raw"
validate="code"
/>
<!-- Css_admin Field. Type: Editor. (joomla) -->
<!-- Created Field. Type: Calendar. (joomla) -->
<field
type="editor"
name="css_admin"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
editor="codemirror|none"
filter="raw"
validate="code"
type="calendar"
name="created"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_DESCRIPTION"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
size="22"
/>
<!-- Php_helper_both Field. Type: Editor. (joomla) -->
<field
@ -218,12 +214,29 @@
filter="raw"
validate="code"
/>
<!-- Php_admin_event Field. Type: Editor. (joomla) -->
<!-- Note_readme Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_readme" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_DESCRIPTION" heading="h4" class="note_readme" />
<!-- Debug_linenr Field. Type: Radio. (joomla) -->
<field
type="radio"
name="debug_linenr"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Php_preflight_install Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_admin_event"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION"
name="php_preflight_install"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
@ -234,19 +247,65 @@
filter="raw"
validate="code"
/>
<!-- Sql_uninstall Field. Type: Textarea. (joomla) -->
<!-- Php_method_uninstall Field. Type: Editor. (joomla) -->
<field
type="textarea"
name="sql_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL"
rows="30"
type="editor"
name="php_method_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_DESCRIPTION"
class="text_area span12"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_HINT"
required="true"
validate="code"
/>
<!-- Note_version_options_three Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_three" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_THREE_DESCRIPTION" class="alert alert-info note_version_options_three" showon="mvc_versiondate:3" />
<!-- Css_admin Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css_admin"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="css"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Note_version_options_two Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_two" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_TWO_DESCRIPTION" class="alert alert-info note_version_options_two" showon="mvc_versiondate:2" />
<!-- Note_version_options_one Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_one" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_ONE_DESCRIPTION" class="alert alert-info note_version_options_one" showon="mvc_versiondate:1" />
<!-- Mvc_versiondate Field. Type: List. (joomla) -->
<field
type="list"
name="mvc_versiondate"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_DESCRIPTION"
class="list_class"
multiple="false"
filter="int"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL_VERSION</option>
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_VIEW_VERSION_DATE</option>
<option value="2">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_TWO_NUMBER_OF_GLOBAL_VERSION_ONEZEROX</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_NUMBER_OF_GLOBAL_VERSION_ONEXX</option>
</field>
<!-- Remove_line_breaks Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -262,6 +321,23 @@
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Add_placeholders Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_placeholders"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_dynamic_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_dynamic_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_dynamic_dashboard" />
<!-- Description Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -290,145 +366,6 @@
filter="raw"
validate="code"
/>
<!-- Note_version_options_three Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_three" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_THREE_DESCRIPTION" class="alert alert-info note_version_options_three" showon="mvc_versiondate:3" />
<!-- Debug_linenr Field. Type: Radio. (joomla) -->
<field
type="radio"
name="debug_linenr"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_version_options_two Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_two" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_TWO_DESCRIPTION" class="alert alert-info note_version_options_two" showon="mvc_versiondate:2" />
<!-- Note_version_options_one Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_version_options_one" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_ONE_DESCRIPTION" class="alert alert-info note_version_options_one" showon="mvc_versiondate:1" />
<!-- Mvc_versiondate Field. Type: List. (joomla) -->
<field
type="list"
name="mvc_versiondate"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_DESCRIPTION"
class="list_class"
multiple="false"
filter="int"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL_VERSION</option>
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_VIEW_VERSION_DATE</option>
<option value="2">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_TWO_NUMBER_OF_GLOBAL_VERSION_ONEZEROX</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_NUMBER_OF_GLOBAL_VERSION_ONEXX</option>
</field>
<!-- Note_dynamic_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_dynamic_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_dynamic_dashboard" />
<!-- Note_update_server_note_ftp Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_ftp" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_ftp" />
<!-- Php_preflight_install Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_install"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Crowdin_project_identifier Field. Type: Text. (joomla) -->
<field
type="text"
name="crowdin_project_identifier"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_MESSAGE"
autocomplete="off"
onchange="getTranslationToolDetails()"
/>
<!-- Php_method_uninstall Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_method_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Component_version Field. Type: Text. (joomla) -->
<field
type="text"
name="component_version"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL"
size="40"
maxlength="50"
default="1.0.0"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_HINT"
/>
<!-- Note_readme Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_readme" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_README_DESCRIPTION" heading="h4" class="note_readme" />
<!-- Add_placeholders Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_placeholders"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Add_sales_server Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sales_server"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Author Field. Type: Text. (joomla) -->
<field
type="text"
@ -445,8 +382,19 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT"
/>
<!-- Note_buildcomp_dynamic_mysql Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_buildcomp_dynamic_mysql" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION" heading="h4" class="alert alert-info note_buildcomp_dynamic_mysql" />
<!-- Sql_uninstall Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="sql_uninstall"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_HINT"
required="true"
/>
<!-- Email Field. Type: Text. (joomla) -->
<field
type="text"
@ -462,21 +410,8 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT"
/>
<!-- Add_email_helper Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_email_helper"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Note_update_server_note_ftp Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_ftp" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_FTP_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_ftp" />
<!-- Website Field. Type: Url. (joomla) -->
<field
type="url"
@ -493,22 +428,8 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT"
/>
<!-- Php_helper_admin Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_helper_admin"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION"
width="100%"
height="550px"
cols="15"
rows="80"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Note_buildcomp_dynamic_mysql Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_buildcomp_dynamic_mysql" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION" heading="h4" class="alert alert-info note_buildcomp_dynamic_mysql" />
<!-- Add_license Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -524,22 +445,21 @@
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Php_helper_site Field. Type: Editor. (joomla) -->
<!-- Add_email_helper Field. Type: Radio. (joomla) -->
<field
type="editor"
name="php_helper_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_DESCRIPTION"
width="100%"
height="550px"
cols="15"
rows="80"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
type="radio"
name="add_email_helper"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- License_type Field. Type: List. (joomla) -->
<field
type="list"
@ -561,36 +481,36 @@
<option value="4">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE</option>
</field>
<!-- Javascript Field. Type: Editor. (joomla) -->
<!-- Php_helper_admin Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION"
name="php_helper_admin"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION"
width="100%"
height="450px"
height="550px"
cols="15"
rows="30"
rows="80"
buttons="no"
syntax="javascript"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Note_whmcs_lisencing_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_lisencing_note" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_lisencing_note" />
<!-- Css_site Field. Type: Editor. (joomla) -->
<!-- Php_helper_site Field. Type: Editor. (joomla) -->
<field
type="editor"
name="css_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_DESCRIPTION"
name="php_helper_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_DESCRIPTION"
width="100%"
height="450px"
height="550px"
cols="15"
rows="30"
rows="80"
buttons="no"
syntax="css"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
@ -608,8 +528,22 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_HINT"
/>
<!-- Note_botton_component_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_botton_component_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_botton_component_dashboard" />
<!-- Javascript Field. Type: Editor. (joomla) -->
<field
type="editor"
name="javascript"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="javascript"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Whmcs_url Field. Type: Url. (joomla) -->
<field
type="url"
@ -625,18 +559,18 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_HINT"
/>
<!-- Php_preflight_update Field. Type: Editor. (joomla) -->
<!-- Css_site Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_DESCRIPTION"
name="css_site"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
syntax="css"
editor="codemirror|none"
filter="raw"
validate="code"
@ -656,6 +590,50 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_HINT"
/>
<!-- Note_botton_component_dashboard Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_botton_component_dashboard" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BOTTON_COMPONENT_DASHBOARD_DESCRIPTION" heading="h4" class="alert alert-info note_botton_component_dashboard" />
<!-- License Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="license"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL"
rows="7"
cols="10"
default="GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_DESCRIPTION"
class="text_area span12"
filter="HTML"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_HINT"
required="true"
/>
<!-- Php_preflight_update Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_preflight_update"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Bom Field. Type: Filelist. (joomla) -->
<field
type="filelist"
name="bom"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL"
directory="administrator/components/com_componentbuilder/compiler"
default="default.txt"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_DESCRIPTION"
filter="\.txt"
hide_none="true"
hide_default="true"
/>
<!-- Php_postflight_update Field. Type: Editor. (joomla) -->
<field
type="editor"
@ -672,19 +650,13 @@
filter="raw"
validate="code"
/>
<!-- License Field. Type: Textarea. (joomla) -->
<!-- Image Field. Type: Media. (joomla) -->
<field
type="textarea"
name="license"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL"
rows="7"
cols="10"
default="GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_DESCRIPTION"
class="text_area span12"
filter="HTML"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_HINT"
required="true"
type="media"
name="image"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION"
directory=""
/>
<!-- Sql Field. Type: Textarea. (joomla) -->
<field
@ -699,54 +671,6 @@
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_HINT"
required="true"
/>
<!-- Bom Field. Type: Filelist. (joomla) -->
<field
type="filelist"
name="bom"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL"
directory="administrator/components/com_componentbuilder/compiler"
default="default.txt"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_DESCRIPTION"
filter="\.txt"
hide_none="true"
hide_default="true"
/>
<!-- Addreadme Field. Type: Radio. (joomla) -->
<field
type="radio"
name="addreadme"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Image Field. Type: Media. (joomla) -->
<field
type="media"
name="image"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION"
directory=""
/>
<!-- Update_server_url Field. Type: Url. (joomla) -->
<field
type="url"
name="update_server_url"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL"
size="60"
maxlength="150"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_DESCRIPTION"
class="text_area span12"
filter="url"
validated="url"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_HINT"
/>
<!-- Copyright Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -761,13 +685,79 @@
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_HINT"
required="true"
/>
<!-- Addreadme Field. Type: Radio. (joomla) -->
<field
type="radio"
name="addreadme"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Add_sales_server Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_sales_server"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES</option>
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO</option>
</field>
<!-- Update_server_url Field. Type: Url. (joomla) -->
<field
type="url"
name="update_server_url"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL"
size="60"
maxlength="150"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_DESCRIPTION"
class="text_area span12"
filter="url"
validated="url"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_HINT"
/>
<!-- Crowdin_project_identifier Field. Type: Text. (joomla) -->
<field
type="text"
name="crowdin_project_identifier"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_MESSAGE"
autocomplete="off"
onchange="getTranslationToolDetails()"
/>
<!-- Note_update_server_note_other Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_update_server_note_other" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_OTHER_DESCRIPTION" heading="h4" class="alert alert-success note_update_server_note_other" />
<!-- Not_required Field. Type: Hidden. (joomla) -->
<!-- Component_version Field. Type: Text. (joomla) -->
<field
type="hidden"
name="not_required"
default="一_一"
type="text"
name="component_version"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL"
size="40"
maxlength="50"
default="1.0.0"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_HINT"
/>
<!-- Translation_tool Field. Type: List. (joomla) -->
<field
@ -783,8 +773,12 @@
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN</option>
</field>
<!-- Note_moved_views Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_moved_views" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_moved_views" />
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="一_一"
/>
<!-- Crowdin_username Field. Type: Text. (joomla) -->
<field
type="text"
@ -799,8 +793,8 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_MESSAGE"
autocomplete="off"
/>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Note_moved_views Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_moved_views" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_moved_views" />
<!-- Buildcompsql Field. Type: Textarea. (joomla) -->
<field
type="textarea"
@ -814,26 +808,10 @@
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_HINT"
required="true"
/>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Note_mysql_tweak_options Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_mysql_tweak_options" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_DESCRIPTION" heading="h4" class="alert alert-info note_mysql_tweak_options" />
<!-- Addfootable Field. Type: List. (joomla) -->
<field
type="list"
name="addfootable"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL"
class="list_class"
multiple="false"
filter="INT"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTHREE</option>
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTWO</option>
</field>
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
<!-- Add_php_helper_both Field. Type: Radio. (joomla) -->
@ -1510,6 +1488,35 @@
validate="guid"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GUID_HINT"
/>
<!-- Addfootable Field. Type: List. (joomla) -->
<field
type="list"
name="addfootable"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL"
class="list_class"
multiple="false"
filter="INT"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC</option>
<option value="3">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTHREE</option>
<option value="1">
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_VTWO</option>
</field>
<!-- Modified Field. Type: Calendar. (joomla) -->
<field
type="calendar"
name="modified"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MODIFIED_DESCRIPTION"
readonly="true"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
size="22"
/>
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"

View File

@ -245,8 +245,8 @@
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_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
<!-- Add_sql Field. Type: Radio. (joomla) -->
<field
type="radio"

View File

@ -127,9 +127,9 @@
default="0"
button="true"
/>
<!-- Components Field. Type: Components. (custom) -->
<!-- Components Field. Type: Joomlacomponents. (custom) -->
<field
type="components"
type="joomlacomponents"
name="components"
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_COMPONENTS_LABEL"
class="list_class span12"

View File

@ -205,8 +205,8 @@
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_LAYOUT_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_LAYOUT_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Note_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="libraries"

View File

@ -208,8 +208,8 @@
filter="raw"
validate="code"
/>
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Note_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
<!-- Codename Field. Type: Text. (joomla) -->
<field
type="text"

View File

@ -205,8 +205,8 @@
/>
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
<!-- Note_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
<!-- Libraries Field. Type: Libraries. (custom) -->
<field
type="libraries"

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -222,7 +224,7 @@ class ComponentbuilderModelImport extends JModelLegacy
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -400,12 +402,12 @@ class ComponentbuilderModelImport extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -390,8 +392,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -570,12 +571,12 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -219,8 +221,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -398,12 +399,12 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}

View File

@ -89,13 +89,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'css_site'
)
),
'mysql' => array(
'fullwidth' => array(
'add_sql',
'sql',
'add_sql_uninstall',
'sql_uninstall',
'assets_table_fix'
'readme' => array(
'left' => array(
'addreadme',
'readme'
),
'right' => array(
'note_readme'
)
),
'dash_install' => array(
@ -120,6 +120,15 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'php_method_uninstall'
)
),
'mysql' => array(
'fullwidth' => array(
'add_sql',
'sql',
'add_sql_uninstall',
'sql_uninstall',
'assets_table_fix'
)
),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
@ -141,15 +150,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'crowdin_account_api_key'
)
),
'readme' => array(
'left' => array(
'addreadme',
'readme'
),
'right' => array(
'note_readme'
)
),
'dynamic_build_beta' => array(
'fullwidth' => array(
'note_buildcomp_dynamic_mysql',
@ -340,40 +340,22 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_site_event))
{
// base64 Decode php_site_event.
$item->php_site_event = base64_decode($item->php_site_event);
}
if (!empty($item->css_admin))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->php_helper_both))
{
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_admin_event))
{
// base64 Decode php_admin_event.
$item->php_admin_event = base64_decode($item->php_admin_event);
}
if (!empty($item->sql_uninstall))
if (!empty($item->php_site_event))
{
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// base64 Decode php_site_event.
$item->php_site_event = base64_decode($item->php_site_event);
}
if (!empty($item->php_postflight_install))
if (!empty($item->php_helper_both))
{
// base64 Decode php_postflight_install.
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_preflight_install))
@ -388,6 +370,24 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
}
if (!empty($item->css_admin))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->php_postflight_install))
{
// base64 Decode php_postflight_install.
$item->php_postflight_install = base64_decode($item->php_postflight_install);
}
if (!empty($item->sql_uninstall))
{
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
}
if (!empty($item->php_helper_admin))
{
// base64 Decode php_helper_admin.
@ -1413,40 +1413,22 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['addcontributors'] = '';
}
// Set the php_site_event string to base64 string.
if (isset($data['php_site_event']))
{
$data['php_site_event'] = base64_encode($data['php_site_event']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
// Set the php_admin_event string to base64 string.
if (isset($data['php_admin_event']))
{
$data['php_admin_event'] = base64_encode($data['php_admin_event']);
}
// Set the sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
// Set the php_site_event string to base64 string.
if (isset($data['php_site_event']))
{
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
$data['php_site_event'] = base64_encode($data['php_site_event']);
}
// Set the php_postflight_install string to base64 string.
if (isset($data['php_postflight_install']))
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
// Set the php_preflight_install string to base64 string.
@ -1461,6 +1443,24 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the php_postflight_install string to base64 string.
if (isset($data['php_postflight_install']))
{
$data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
}
// Set the sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
{
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
}
// Set the php_helper_admin string to base64 string.
if (isset($data['php_helper_admin']))
{

View File

@ -34,7 +34,9 @@ class ComponentbuilderModelJoomla_components extends JModelList
'a.author','author',
'a.system_name','system_name',
'a.name_code','name_code',
'a.short_description','short_description'
'a.short_description','short_description',
'a.created','created',
'a.modified','modified'
);
}
@ -2114,9 +2116,6 @@ class ComponentbuilderModelJoomla_components extends JModelList
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -2158,6 +2157,20 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->setState('filter.short_description', $short_description);
}
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
if ($formSubmited)
{
$created = $app->input->post->get('created');
$this->setState('filter.created', $created);
}
$modified = $this->getUserStateFromRequest($this->context . '.filter.modified', 'filter_modified');
if ($formSubmited)
{
$modified = $app->input->post->get('modified');
$this->setState('filter.modified', $modified);
}
// List state information.
parent::populateState($ordering, $direction);
}
@ -2284,6 +2297,29 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
$query->where('a.companyname = ' . $db->quote($db->escape($_companyname)));
}
elseif (ComponentbuilderHelper::checkArray($_companyname))
{
// Secure the array for the query
$_companyname = array_map( function ($val) use(&$db) {
if (is_numeric($val))
{
if (is_float($val))
{
return (float) $val;
}
else
{
return (int) $val;
}
}
elseif (ComponentbuilderHelper::checkString($val))
{
return $db->quote($db->escape($val));
}
}, $_companyname);
// Filter by the Companyname Array.
$query->where('a.companyname IN (' . implode(',', $_companyname) . ')');
}
// Filter by Author.
$_author = $this->getState('filter.author');
if (is_numeric($_author))
@ -2301,6 +2337,29 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
$query->where('a.author = ' . $db->quote($db->escape($_author)));
}
elseif (ComponentbuilderHelper::checkArray($_author))
{
// Secure the array for the query
$_author = array_map( function ($val) use(&$db) {
if (is_numeric($val))
{
if (is_float($val))
{
return (float) $val;
}
else
{
return (int) $val;
}
}
elseif (ComponentbuilderHelper::checkString($val))
{
return $db->quote($db->escape($val));
}
}, $_author);
// Filter by the Author Array.
$query->where('a.author IN (' . implode(',', $_author) . ')');
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -2395,35 +2454,35 @@ class ComponentbuilderModelJoomla_components extends JModelList
continue;
}
// decode php_site_event
$item->php_site_event = base64_decode($item->php_site_event);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_admin_event
$item->php_admin_event = base64_decode($item->php_admin_event);
// decode sql_uninstall
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// decode php_postflight_install
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// decode php_site_event
$item->php_site_event = base64_decode($item->php_site_event);
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_preflight_install
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// decode php_method_uninstall
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode php_postflight_install
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// decode sql_uninstall
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// decode php_helper_admin
$item->php_helper_admin = base64_decode($item->php_helper_admin);
// decode php_helper_site
$item->php_helper_site = base64_decode($item->php_helper_site);
// decode javascript
$item->javascript = base64_decode($item->javascript);
// decode css_site
$item->css_site = base64_decode($item->css_site);
if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
{
// decrypt whmcs_key
$item->whmcs_key = $basic->decryptString($item->whmcs_key);
}
// decode javascript
$item->javascript = base64_decode($item->javascript);
// decode css_site
$item->css_site = base64_decode($item->css_site);
// decode php_preflight_update
$item->php_preflight_update = base64_decode($item->php_preflight_update);
// decode php_postflight_update
@ -2526,11 +2585,35 @@ class ComponentbuilderModelJoomla_components extends JModelList
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.companyname');
$id .= ':' . $this->getState('filter.author');
// Check if the value is an array
$_companyname = $this->getState('filter.companyname');
if (ComponentbuilderHelper::checkArray($_companyname))
{
$id .= ':' . implode(':', $_companyname);
}
// Check if this is only an number or string
elseif (is_numeric($_companyname)
|| ComponentbuilderHelper::checkString($_companyname))
{
$id .= ':' . $_companyname;
}
// Check if the value is an array
$_author = $this->getState('filter.author');
if (ComponentbuilderHelper::checkArray($_author))
{
$id .= ':' . implode(':', $_author);
}
// Check if this is only an number or string
elseif (is_numeric($_author)
|| ComponentbuilderHelper::checkString($_author))
{
$id .= ':' . $_author;
}
$id .= ':' . $this->getState('filter.system_name');
$id .= ':' . $this->getState('filter.name_code');
$id .= ':' . $this->getState('filter.short_description');
$id .= ':' . $this->getState('filter.created');
$id .= ':' . $this->getState('filter.modified');
return parent::getStoreId($id);
}

View File

@ -33,7 +33,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin
'description',
'libraries',
'note_libraries_options',
'note_add_language_string'
'note_add_php_language_string'
),
'right' => array(
'snippet',

Some files were not shown because too many files have changed in this diff Show More