Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
2562473f8c
|
|||
5ae7bb76ef
|
|||
08d529aba9
|
|||
1279a5d2f9
|
|||
552a2664ba
|
|||
3c3951ae83
|
|||
192d44b477
|
|||
1dfc674318
|
|||
934cf839c5
|
|||
8abe3bced8
|
|||
e579cd421a
|
12
README.md
12
README.md
@ -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.6) 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*: 2nd February, 2021
|
||||
+ *Version*: 2.12.6
|
||||
+ *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*: **293026**
|
||||
+ *Field count*: **1611**
|
||||
+ *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).
|
||||
|
@ -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.6) 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*: 2nd February, 2021
|
||||
+ *Version*: 2.12.6
|
||||
+ *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*: **293026**
|
||||
+ *Field count*: **1611**
|
||||
+ *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).
|
||||
|
@ -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" />
|
||||
|
@ -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 |
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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###
|
||||
|
||||
|
@ -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###
|
||||
|
@ -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###
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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###
|
||||
*/
|
||||
|
@ -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###
|
||||
*/
|
||||
|
@ -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###
|
||||
*/
|
||||
|
@ -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###
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
@ -4981,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,
|
||||
@ -5800,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"';
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
@ -28169,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++;
|
||||
}
|
||||
@ -28198,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',
|
||||
@ -28527,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++;
|
||||
}
|
||||
@ -28559,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',
|
||||
|
@ -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
|
||||
|
@ -19,6 +19,10 @@ use Joomla\Utilities\ArrayHelper;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
use Joomla\Archive\Archive;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Filesystem\Path;
|
||||
|
||||
/**
|
||||
* Componentbuilder component helper.
|
||||
@ -796,7 +800,7 @@ abstract class ComponentbuilderHelper
|
||||
// set the path to the form validation rules
|
||||
$path = JPATH_LIBRARIES . '/src/Form/Rule';
|
||||
// check if the path exist
|
||||
if (!JFolder::exists($path))
|
||||
if (!Folder::exists($path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -805,7 +809,7 @@ abstract class ComponentbuilderHelper
|
||||
// go to that folder
|
||||
chdir($path);
|
||||
// load all the files in this path
|
||||
$items = JFolder::files('.', '\.php', true, true);
|
||||
$items = Folder::files('.', '\.php', true, true);
|
||||
// change back to Joomla working directory
|
||||
chdir($joomla);
|
||||
// make sure we have an array
|
||||
@ -1108,7 +1112,7 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less'), $recurse = true, $full = true)
|
||||
{
|
||||
if (JFolder::exists($folder))
|
||||
if (Folder::exists($folder))
|
||||
{
|
||||
// we must first store the current woking directory
|
||||
$joomla = getcwd();
|
||||
@ -1121,18 +1125,18 @@ abstract class ComponentbuilderHelper
|
||||
foreach ($fileTypes as $type)
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', $type, $recurse, $full);
|
||||
$files[] = Folder::files('.', $type, $recurse, $full);
|
||||
}
|
||||
}
|
||||
elseif (self::checkString($fileTypes))
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', $fileTypes, $recurse, $full);
|
||||
$files[] = Folder::files('.', $fileTypes, $recurse, $full);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', '.', $recurse, $full);
|
||||
$files[] = Folder::files('.', '.', $recurse, $full);
|
||||
}
|
||||
// change back to Joomla working directory
|
||||
chdir($joomla);
|
||||
@ -1180,9 +1184,6 @@ abstract class ComponentbuilderHelper
|
||||
if ('compiler' === $type)
|
||||
{
|
||||
// import the Joomla librarys
|
||||
jimport('joomla.filesystem.file');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.archive');
|
||||
jimport('joomla.application.component.modellist');
|
||||
// include class to minify js
|
||||
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php';
|
||||
@ -1191,9 +1192,6 @@ abstract class ComponentbuilderHelper
|
||||
if ('smart' === $type)
|
||||
{
|
||||
// import the Joomla libraries
|
||||
jimport('joomla.filesystem.file');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.archive');
|
||||
jimport('joomla.application.component.modellist');
|
||||
}
|
||||
// load this for all
|
||||
@ -1970,51 +1968,244 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of dynamic content
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $dynamicContent = array(
|
||||
// The banners by size
|
||||
// The banners by size (width - height)
|
||||
'banner' => array(
|
||||
'728-90' => array(
|
||||
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
|
||||
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img alt="tlwebdesign a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img alt="VDM a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-agerix" target="_blank" title="Agerix a JCB sponsor | Because community matters..."><img alt="Agerix a JCB sponsor | Because community matters..." src="https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif" width="728" height="90" border="0" /></a>'
|
||||
array(
|
||||
'url' => 'https://cdn.joomla.org/volunteers/joomla-heart-wide.gif',
|
||||
'hash' => 'f857e3a38facaeac9eba3cffa912b620',
|
||||
'html' => '<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img class="jcb-sponsor-banner" src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>'),
|
||||
array(
|
||||
'url' => 'https://magazine.joomla.org/images/banners/JCM_2010_728x90.png',
|
||||
'hash' => '4083c66f996279fd5a76adffc3a7d194',
|
||||
'html' => '<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img class="jcb-sponsor-banner" alt="Joomla! Community Magazine | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png',
|
||||
'hash' => 'd19be1f9f5b2049ff901096aafc246be',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="tlwebdesign a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif',
|
||||
'hash' => '84478dfa0cd880395815e0ee026812a4',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="VDM a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif',
|
||||
'hash' => 'b24c0726aa809cdcc04bcffe7e1e1529',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-agerix" target="_blank" title="Agerix a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="Agerix a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/agerix-loves-jcb-728-90.gif" width="728" height="90" border="0" /></a>')
|
||||
),
|
||||
'160-600' => array(
|
||||
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
|
||||
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
|
||||
array(
|
||||
'url' => 'https://cdn.joomla.org/volunteers/joomla-heart-tall.gif',
|
||||
'hash' => '9a75e4929b86c318128b53cf78251678',
|
||||
'html' => '<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>'),
|
||||
array(
|
||||
'url' => 'https://magazine.joomla.org/images/banners/JCM_2010_120x600.png',
|
||||
'hash' => '5389cf3be8569cb3f6793e8bd4013d19',
|
||||
'html' => '<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>')
|
||||
)
|
||||
),
|
||||
// The build-gif by size
|
||||
// The build-gif by size (width - height)
|
||||
'builder-gif' => array(
|
||||
'707-400' => array(
|
||||
'<img src="components/com_componentbuilder/assets/images/ajax-loader.gif" />'
|
||||
// original gif ;)
|
||||
'480-272' => array(
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/original.gif',
|
||||
'hash' => '676e37a949add8f4573381195cd1061c',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/original.gif" />'
|
||||
)
|
||||
),
|
||||
// new gif artwork since 2021
|
||||
'480-540' => array(
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/1.gif',
|
||||
'hash' => 'ce6e36456fa794ba95d981547b2f54f8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/1.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/2.gif',
|
||||
'hash' => '0a54dbc393359747e33db90cabb1e2d7',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/2.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/3.gif',
|
||||
'hash' => '4e5498713ff69a64a0a79dbf620372a3',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/3.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/4.gif',
|
||||
'hash' => '3554ffab2a6df95a116fd9f0db63925c',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/4.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/5.gif',
|
||||
'hash' => '08f0cdf188593eca65c6dafd7af27ef9',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/5.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/6.gif',
|
||||
'hash' => '103b46a7ac3fcb974e25d06f417a4e87',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/6.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/7.gif',
|
||||
'hash' => 'ffa8547099b7286f89ab7ff5a140dd90',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/7.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/8.gif',
|
||||
'hash' => '316df780f9e4ce81200a65d3c4303c41',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/8.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/9.gif',
|
||||
'hash' => '9ab6ba78b6e63a285fdef2ff5e447c93',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/9.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/10.gif',
|
||||
'hash' => 'cd9abaa1cb95f51a70916da6b70614f2',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/10.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/11.gif',
|
||||
'hash' => 'cfe53095b5249618e2348223b89262b9',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/11.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/12.gif',
|
||||
'hash' => '15a6690647d5160d67c80ce4dd1f5602',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/12.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/13.gif',
|
||||
'hash' => '2f77562e92c8a3b7c47664c98f551fe8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/13.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/14.gif',
|
||||
'hash' => '46db15517ef5bd063be85134e1cc575d',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/14.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/15.gif',
|
||||
'hash' => 'e6c96eff157ea648ceb1583f2cc22544',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/15.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/16.gif',
|
||||
'hash' => '76010b7d1f99952eb9645df660467ae8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/16.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/17.gif',
|
||||
'hash' => '021219ddd72d8fcfc7f80bd4a874d651',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/17.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/18.gif',
|
||||
'hash' => '383af3179d4ae27301c1292e630d7155',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/18.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/19.gif',
|
||||
'hash' => '8537e6d7be93447241b521f851e8a61d',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/19.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/20.gif',
|
||||
'hash' => '10d96f70e3d43086a925b00a7dc0022e',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/20.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/21.gif',
|
||||
'hash' => '161de9865b171b44039353b8d50491d3',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/21.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/22.gif',
|
||||
'hash' => '6a2354e43eb97d278d74bb2c12890988',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/22.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/23.gif',
|
||||
'hash' => '2cb6e2f9562a8dc8eef6d5d8d1a84f5e',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/23.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/24.gif',
|
||||
'hash' => '745b3fb5e16515689132432bf02ab1b4',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/24.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* get the dynamic content array size
|
||||
*
|
||||
* @param string $type The type of content
|
||||
* @param string $size The size of the content
|
||||
*
|
||||
* @return int on success number of items in array type,size
|
||||
*
|
||||
*/
|
||||
public static function getDynamicContentSize($type, $size)
|
||||
{
|
||||
if (isset(self::$dynamicContent[$type]) && isset(self::$dynamicContent[$type][$size])
|
||||
&& ($nr = self::checkArray(self::$dynamicContent[$type][$size])))
|
||||
{
|
||||
return $nr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the dynamic content
|
||||
*
|
||||
* @param string $type The type of content
|
||||
* @param string $size The size of the content
|
||||
* @param mix $default The default to return
|
||||
* @param int $try Retry tracker (when bigger then array size it stops)
|
||||
* @param mix $getter The specific getter number (not zero based)
|
||||
*
|
||||
* @return string on success
|
||||
* @return string on success html string
|
||||
*
|
||||
*/
|
||||
public static function getDynamicContent($type, $size, $default = '')
|
||||
public static function getDynamicContent($type, $size, $default = '', $try = 1, $getter = null)
|
||||
{
|
||||
if (isset(self::$dynamicContent[$type]) && isset(self::$dynamicContent[$type][$size]) && ($nr = self::checkArray(self::$dynamicContent[$type][$size])))
|
||||
if (($nr = self::getDynamicContentSize($type, $size)) !== 0)
|
||||
{
|
||||
// use specific getter
|
||||
if ($getter)
|
||||
{
|
||||
$get = --$getter;
|
||||
}
|
||||
// get the random getter number
|
||||
elseif ($nr > 1)
|
||||
{
|
||||
// get the random item number
|
||||
$get = (int) rand(0, --$nr);
|
||||
}
|
||||
else
|
||||
{
|
||||
$get = 0;
|
||||
}
|
||||
// get the current target if found
|
||||
if (isset(self::$dynamicContent[$type][$size][$get]))
|
||||
{
|
||||
$target = self::$dynamicContent[$type][$size][$get];
|
||||
// set file name
|
||||
$file_name = basename($target['url']);
|
||||
// set the local path (in admin area so when the component uninstall these images get removed as well)
|
||||
$path = JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type/$file_name";
|
||||
// check if file exist or if it changed
|
||||
if (($image_data = self::getFileContents($path, false)) === false ||
|
||||
md5($image_data) !== $target['hash'])
|
||||
{
|
||||
// since the file does not exist or has changed (so we have a new hash)
|
||||
// therefore we download it to validate
|
||||
if (($image_data = self::getFileContents($target['url'], false)) !== false &&
|
||||
md5($image_data) === $target['hash'])
|
||||
{
|
||||
// create the JCB type path if it does not exist
|
||||
if (!Folder::exists(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type"))
|
||||
{
|
||||
Folder::create(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type");
|
||||
}
|
||||
// only set the image if the data match the hash
|
||||
self::writeFile($path, $image_data);
|
||||
}
|
||||
// we retry array size times (unless specific getter is used)
|
||||
elseif ($try <= $nr && !$getter)
|
||||
{
|
||||
// the first time around failed so we try again (the size of the array times)
|
||||
return self::getDynamicContent($type, $size, $default, ++$try);
|
||||
}
|
||||
}
|
||||
// return found content
|
||||
return self::$dynamicContent[$type][$size][$get];
|
||||
return str_replace('[[[ROOT-URL]]]', JURI::root(), $target['html']);
|
||||
}
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
@ -2504,20 +2695,20 @@ abstract class ComponentbuilderHelper
|
||||
chdir($workingDIR);
|
||||
|
||||
// the full file path of the zip file
|
||||
$filepath = JPath::clean($filepath);
|
||||
$filepath = Path::clean($filepath);
|
||||
|
||||
// delete an existing zip file (or use an exclusion parameter in JFolder::files()
|
||||
JFile::delete($filepath);
|
||||
// delete an existing zip file (or use an exclusion parameter in Folder::files()
|
||||
File::delete($filepath);
|
||||
|
||||
// get a list of files in the current directory tree
|
||||
$files = JFolder::files('.', '', true, true);
|
||||
$files = Folder::files('.', '', true, true);
|
||||
$zipArray = array();
|
||||
// setup the zip array
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$tmp = array();
|
||||
$tmp['name'] = str_replace('./', '', $file);
|
||||
$tmp['data'] = JFile::read($file);
|
||||
$tmp['data'] = self::getFileContents($file);
|
||||
$tmp['time'] = filemtime($file);
|
||||
$zipArray[] = $tmp;
|
||||
}
|
||||
@ -2526,7 +2717,8 @@ abstract class ComponentbuilderHelper
|
||||
chdir($joomla);
|
||||
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
$adapter = new Archive();
|
||||
$zip = $adapter->getAdapter('zip');
|
||||
|
||||
//create the zip file
|
||||
if ($zip->create($filepath, $zipArray))
|
||||
@ -2581,7 +2773,7 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function removeFolder($dir, $ignore = false)
|
||||
{
|
||||
if (JFolder::exists($dir))
|
||||
if (Folder::exists($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
@ -2611,7 +2803,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2630,13 +2822,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JFile::delete($file_dir);
|
||||
File::delete($file_dir);
|
||||
}
|
||||
}
|
||||
// delete the root folder if not ignore found
|
||||
if (!self::checkArray($ignore))
|
||||
{
|
||||
return JFolder::delete($dir);
|
||||
return Folder::delete($dir);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -3925,11 +4117,10 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$filePath = $default;
|
||||
}
|
||||
jimport('joomla.filesystem.folder');
|
||||
// create the folder if it does not exist
|
||||
if ($createIfNotSet && !JFolder::exists($filePath))
|
||||
if ($createIfNotSet && !Folder::exists($filePath))
|
||||
{
|
||||
JFolder::create($filePath);
|
||||
Folder::create($filePath);
|
||||
}
|
||||
// setup the file name
|
||||
$fileName = '';
|
||||
@ -3994,11 +4185,10 @@ abstract class ComponentbuilderHelper
|
||||
self::$params = JComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
$folderPath = self::$params->get($target, $default);
|
||||
jimport('joomla.filesystem.folder');
|
||||
// create the folder if it does not exist
|
||||
if ($createIfNotSet && !JFolder::exists($folderPath))
|
||||
if ($createIfNotSet && !Folder::exists($folderPath))
|
||||
{
|
||||
JFolder::create($folderPath);
|
||||
Folder::create($folderPath);
|
||||
}
|
||||
// return the url
|
||||
if ('url' === $type)
|
||||
@ -7487,12 +7677,12 @@ abstract class ComponentbuilderHelper
|
||||
$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;
|
||||
|
@ -1324,6 +1324,7 @@ COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First"
|
||||
COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully"
|
||||
COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries"
|
||||
COM_COMPONENTBUILDER_BADMIN_FIELDS_RELATIONSB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_NOT_UPDATED_IN_THE_CUSTOM_CODE="<b>Admin fields relations</b> id:%s mismatch in <b>field:%s</b>, and was not updated in the custom code."
|
||||
COM_COMPONENTBUILDER_BALL_THE_COMPILER_ANIMATIONS_WERE_SUCCESSFULLY_DOWNLOADED_TO_THIS_JOOMLA_INSTALLB="<b>All the compiler animations were successfully downloaded to this Joomla Install!</b>"
|
||||
COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR_THIS_PACKAGE_AND_SO_NO_VALIDATION_WAS_POSSIBLE_THIS_MAY_BE_DUE_TO_YOUR_NETWORK_OR_A_CHANGE_TO_THAT_PACKAGE_NAME="<b>Best to not continue!</b><br />We could not load the checksum for this package, and so no validation was possible. This may be due to your network, or a change to that package name."
|
||||
COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_YOU_CAN_REFRESH_AND_TRY_AGAINBR_BUT_NOTE_THAT_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="<b>Best to not continue!</b><br />You can Refresh and try again.<br />But note that this package <b>FAILED</b> checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!"
|
||||
@ -1650,8 +1651,11 @@ COM_COMPONENTBUILDER_COMPANY_S="Company: %s"
|
||||
COM_COMPONENTBUILDER_COMPILER="Compiler"
|
||||
COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access"
|
||||
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler."
|
||||
COM_COMPONENTBUILDER_COMPILER_ANIMATIONS="Compiler Animations"
|
||||
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_DESC="The compiler"
|
||||
@ -3234,6 +3238,8 @@ COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_DESC="Set the basic local key here."
|
||||
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_LABEL="Basic Key"
|
||||
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_NOTE_DESC="When using the basic encryption please use set a 32 character passphrase.<br />Never change this passphrase once it is set! <b>DATA WILL GET CORRUPTED IF YOU DO!</b>"
|
||||
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_NOTE_LABEL="Basic Encryption"
|
||||
COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION="Select the artwork you would like to show during compilation of your projects in the compiler area."
|
||||
COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL="Compiler Artwork Options"
|
||||
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_DESC="Set the intervals for the auto checkin fuction of tables that checks out the items to an user."
|
||||
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_LABEL="Check in timer"
|
||||
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_FIVE="Once a week"
|
||||
@ -3487,6 +3493,7 @@ COM_COMPONENTBUILDER_CONFIG_OFF="Off"
|
||||
COM_COMPONENTBUILDER_CONFIG_ON="On"
|
||||
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN="Only Boolean"
|
||||
COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra"
|
||||
COM_COMPONENTBUILDER_CONFIG_ORIGINAL_VDM="Original (VDM)"
|
||||
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_DESCRIPTION="<code>[YEAR]</code> <code>[MONTH]</code> <code>[DAY]</code> <code>[HOUR]</code> <code>[MINUTE]</code>"
|
||||
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeholders"
|
||||
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation."
|
||||
@ -3536,6 +3543,7 @@ COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle"
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION="Select the sub-form layouts you would like to use."
|
||||
COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_LABEL="Sub-form Layouts"
|
||||
COM_COMPONENTBUILDER_CONFIG_THREED_PARTICLE_EXPLORATIONS="3D Particle Explorations"
|
||||
COM_COMPONENTBUILDER_CONFIG_TLS="TLS"
|
||||
COM_COMPONENTBUILDER_CONFIG_TRUE="True"
|
||||
COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like <em>1</em> becomes <b>one</b>.<br />Alphanumeric+dot keeps the numbers unconverted unless it is at the beginning of the field name, and allows for a dot (.) to be used in the type name for namespacing."
|
||||
@ -3846,8 +3854,11 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB="New Tab"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB_TWO="New Tab 2"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code><br />
|
||||
<code><?= JText::sprintf('Hello %s', $this->user->name) ?></code><br />
|
||||
<b>Just get UPPERCASE language string:</b><br />
|
||||
<code><?= JustTEXT::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>"
|
||||
@ -5532,6 +5543,7 @@ COM_COMPONENTBUILDER_INACTIVE="Inactive"
|
||||
COM_COMPONENTBUILDER_IN_SYNC="In Sync"
|
||||
COM_COMPONENTBUILDER_ISOLATE="Isolate"
|
||||
COM_COMPONENTBUILDER_ISSUE="issue"
|
||||
COM_COMPONENTBUILDER_IS_BEING_COMPILED="is being compiled"
|
||||
COM_COMPONENTBUILDER_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)"
|
||||
COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)"
|
||||
COM_COMPONENTBUILDER_IWEBSITEI_BSB="<i>Website:</i> <b>%s</b>"
|
||||
@ -6327,8 +6339,11 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW="A New Joomla Module"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO="No"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NONE="None"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code><br />
|
||||
<code><?= JText::sprintf('Hello %s', $this->user->name) ?></code><br />
|
||||
<b>Just get UPPERCASE language string:</b><br />
|
||||
<code><?= JustTEXT::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION="<p>All libraries added to modules are added to the component media folder for now</p>
|
||||
<p>So over here you are able to manually add HTML code to your model default tmpl.</p>"
|
||||
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_LABEL="Libraries Options"
|
||||
@ -7170,8 +7185,11 @@ COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL="Name"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NO="No"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code><br />
|
||||
<code><?= JText::sprintf('Hello %s', $this->user->name) ?></code><br />
|
||||
<b>Just get UPPERCASE language string:</b><br />
|
||||
<code><?= JustTEXT::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
|
||||
COM_COMPONENTBUILDER_LAYOUT_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage"
|
||||
@ -7779,7 +7797,7 @@ COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
|
||||
COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package <b>has no</b> checksum validation!"
|
||||
COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile."
|
||||
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later"
|
||||
COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER="Please wait! Clearing the tmp folder"
|
||||
COM_COMPONENTBUILDER_PLEASE_WAIT="Please wait!"
|
||||
COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading"
|
||||
COM_COMPONENTBUILDER_PLUGIN="Plugin"
|
||||
COM_COMPONENTBUILDER_PLUGINS="Plugins"
|
||||
@ -7796,6 +7814,7 @@ COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
||||
COM_COMPONENTBUILDER_REFRESH="Refresh"
|
||||
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
|
||||
COM_COMPONENTBUILDER_REMOVE="Remove"
|
||||
COM_COMPONENTBUILDER_REMOVING_ALL_ZIP_PACKAGES_FROM_THE_TEMPORARY_FOLDER_OF_THE_JOOMLA_INSTALL="Removing all zip packages from the temporary folder of the Joomla install"
|
||||
COM_COMPONENTBUILDER_RENAME="Rename"
|
||||
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list."
|
||||
@ -8260,8 +8279,11 @@ COM_COMPONENTBUILDER_SITE_VIEW_NEW_TAB_TWO="New Tab 2"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NEXT="Next"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO="No"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NONE="None"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code><br />
|
||||
<code><?= JText::sprintf('Hello %s', $this->user->name) ?></code><br />
|
||||
<b>Just get UPPERCASE language string:</b><br />
|
||||
<code><?= JustTEXT::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body <code>[[[SITE_TOOLBAR]]]</code> to add the custom position of the toolbar."
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
|
||||
@ -8634,7 +8656,8 @@ COM_COMPONENTBUILDER_SZIP_COULD_NOT_BE_INSTALLED="%s.zip could not be installed!
|
||||
COM_COMPONENTBUILDER_SZIP_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="%s.zip was removed the from tmp folder during installation!"
|
||||
COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
|
||||
COM_COMPONENTBUILDER_S_NOT_LINKED="%s Not Linked"
|
||||
COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED="%s, please wait! The component is being compiled"
|
||||
COM_COMPONENTBUILDER_S_PLEASE_WAIT="%s, please wait!"
|
||||
COM_COMPONENTBUILDER_S_S_NUMBER_BSB_COULD_NOT_BE_DOWNLOADED_SUCCESSFULLY_TO_THIS_JOOMLA_INSTALL="%s (%s) number <b>%s</b> could not be downloaded successfully to this Joomla Install!"
|
||||
COM_COMPONENTBUILDER_TAB="Tab"
|
||||
COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN="Table <b>%s</b> not found in the local database so its values could not be imported, please update your JCB install and try again."
|
||||
COM_COMPONENTBUILDER_TARGET_BEHAVIOUR="Target Behaviour"
|
||||
@ -8729,8 +8752,11 @@ COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL="Name"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NO="No"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_LABEL="Add Language String"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code><?= JText::_('Text') ?></code><br />
|
||||
<code><?= JText::sprintf('Hello %s', $this->user->name) ?></code><br />
|
||||
<b>Just get UPPERCASE language string:</b><br />
|
||||
<code><?= JustTEXT::_('Text') ?></code>"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NOTE_SNIPPET_USAGE_LABEL="Snippet Usage"
|
||||
@ -8780,6 +8806,7 @@ COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHO
|
||||
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The <b>%s</b> library can not be deleted, or things will break."
|
||||
COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The <b>Show in All List Views</b> option will Add this field to all list views, admin & linked."
|
||||
COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD="The <b>single filter</b> selection option allows the user to select just one value in this filter/field."
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT="The Component"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"
|
||||
@ -8821,6 +8848,7 @@ COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The
|
||||
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_RETURN_ANY_DATA="The url (%s) set to retrieve the packages does not return any data!"
|
||||
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
|
||||
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
|
||||
COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT="This may take a while depending on the size of your project."
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> the checksum validation!<br /><br /><small>Manually also validate that the correct checksum was used.</small><br />This checksum: <b>%s</b> must be the same as the one found @ <a %s %s</a>"
|
||||
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
|
||||
COM_COMPONENTBUILDER_TITLE="Title"
|
||||
@ -9011,6 +9039,7 @@ COM_COMPONENTBUILDER_WEBSITE_S="Website: %s"
|
||||
COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates."
|
||||
COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move <b>%s</b>!"
|
||||
COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved <b>%s</b>!"
|
||||
COM_COMPONENTBUILDER_WHILE_WE_DOWNLOAD_ALL_TWENTY_SIX_COMPILER_GIF_ANIMATIONS_RANDOMLY_USED_IN_THE_COMPILER_GUI_DURING_COMPILATION="While we download all 26 compiler GIF animations randomly used in the compiler GUI during compilation"
|
||||
COM_COMPONENTBUILDER_YES="Yes"
|
||||
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key.<br />Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically."
|
||||
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then <a href="http://random-ize.com/how-long-to-hack-pass/" target="_blank" title="How long to hack pass">700 000 000 000 000 000 000 000 000 000 000</a> years to crack theoretically. Unless they have this key above, so do keep it safe."
|
||||
@ -9019,6 +9048,7 @@ COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_
|
||||
COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component <b>zip</b> package you would like to import.<br /><small>Please note that smart component import only works with the following format: <b>(.zip)</b></small>"
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS="You do not have permission to download the compiler animations!"
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THESE_EXTENSIONS="You do not have permission to install these extensions!"
|
||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
|
||||
|
@ -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"
|
||||
|
@ -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();
|
||||
|
22
admin/layouts/jcbnoticeboardpro.php
Normal file
22
admin/layouts/jcbnoticeboardpro.php
Normal 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>
|
@ -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"><<ewe>>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>
|
||||
|
22
admin/layouts/jcbnoticeboardvdm.php
Normal file
22
admin/layouts/jcbnoticeboardvdm.php
Normal 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"><<ewe>>yn</a></small></div>
|
||||
</div>
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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+"¬ice="+notice;
|
||||
var request = token+"=1¬ice="+notice;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: "POST",
|
||||
|
@ -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',
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
@ -34,7 +34,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
'description',
|
||||
'note_libraries_selection',
|
||||
'libraries',
|
||||
'note_add_language_string'
|
||||
'note_add_php_language_string'
|
||||
),
|
||||
'right' => array(
|
||||
'snippet',
|
||||
|
@ -34,7 +34,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
'description',
|
||||
'note_libraries_selection',
|
||||
'libraries',
|
||||
'note_add_language_string'
|
||||
'note_add_php_language_string'
|
||||
),
|
||||
'right' => array(
|
||||
'snippet',
|
||||
|
@ -34,7 +34,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
'description',
|
||||
'note_libraries_selection',
|
||||
'libraries',
|
||||
'note_add_language_string'
|
||||
'note_add_php_language_string'
|
||||
),
|
||||
'right' => array(
|
||||
'snippet',
|
||||
|
@ -2299,7 +2299,7 @@ INSERT INTO `#__componentbuilder_admin_fields_conditions` (`id`, `addconditions`
|
||||
--
|
||||
|
||||
INSERT INTO `#__componentbuilder_component_admin_views` (`id`, `addadmin_views`, `joomla_component`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
|
||||
(27, '{\"addadmin_views0\":{\"adminview\":\"109\",\"icomoon\":\"eye-open\",\"mainmenu\":\"1\",\"dashboard_add\":\"1\",\"dashboard_list\":\"1\",\"submenu\":\"1\",\"checkin\":\"1\",\"history\":\"1\",\"joomla_fields\":\"1\",\"metadata\":\"1\",\"access\":\"1\",\"port\":\"1\",\"edit_create_site_view\":\"1\",\"order\":\"1\"}}', 25, 1, '2017-10-28 03:56:26', '2018-08-22 19:18:19', 6, '', '');
|
||||
(27, '{\"addadmin_views0\":{\"adminview\":\"109\",\"icomoon\":\"eye-open\",\"mainmenu\":\"1\",\"dashboard_add\":\"1\",\"dashboard_list\":\"1\",\"submenu\":\"1\",\"checkin\":\"1\",\"history\":\"1\",\"joomla_fields\":\"1\",\"metadata\":\"1\",\"access\":\"1\",\"port\":\"1\",\"filter\":\"2\",\"edit_create_site_view\":\"1\",\"order\":\"1\"}}', 25, 1, '2017-10-28 03:56:26', '2021-02-08 10:32:04', 7, '', '');
|
||||
|
||||
--
|
||||
-- Dumping data for table `#__componentbuilder_component_site_views`
|
||||
|
@ -21,6 +21,9 @@ JHtml::_('behavior.keepalive');
|
||||
$this->app->input->set('hidemainmenu', false);
|
||||
$selectNotice = '<h3>' . JText::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '</h3>';
|
||||
$selectNotice .= '<p>' . JText::_('COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE') . '</p>';
|
||||
|
||||
// set the noticeboard options
|
||||
$noticeboardOptions = array('vdm', 'pro');
|
||||
?>
|
||||
<?php if ($this->canDo->get('compiler.access')): ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=compiler'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
@ -47,13 +50,32 @@ Joomla.submitbutton = function(task, key)
|
||||
}
|
||||
// set the task value
|
||||
form.task.value = task;
|
||||
// seems we need a little delay here
|
||||
setTimeout(function() {
|
||||
form.submit();
|
||||
}, 100);
|
||||
// some ui movements
|
||||
if (task == 'compiler.compiler'){
|
||||
// get the component name
|
||||
let component_name = jQuery("#component option:selected").text();
|
||||
// set the component name
|
||||
jQuery(".component-name").text(component_name);
|
||||
// wait a little since to much is happening...
|
||||
setTimeout(function() {
|
||||
jQuery('#compiler').show();
|
||||
jQuery('#compiling').css('display', 'block');
|
||||
// wait a little since to much is happening...
|
||||
setTimeout(function() {
|
||||
jQuery('#compiler-spinner').show();
|
||||
jQuery('#compiler-notice').show();
|
||||
}, 100);
|
||||
}, 100);
|
||||
} else if (task == 'compiler.clearTmp'){
|
||||
jQuery('#loading').css('display', 'block');
|
||||
jQuery('#clear').show();
|
||||
jQuery('#loading').css('display', 'block');
|
||||
} else if (task == 'compiler.getCompilerAnimations'){
|
||||
jQuery('#get-compiler-animations').show();
|
||||
jQuery('#loading').css('display', 'block');
|
||||
} else {
|
||||
jQuery('#loading').css('display', 'block');
|
||||
}
|
||||
@ -81,6 +103,20 @@ jQuery('<div id="loading"></div>')
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
// for the compiler
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<div id="compiling"></div>')
|
||||
.css("background", "rgba(16, 164, 230, .4)")
|
||||
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.40")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 40)")
|
||||
.css("filter", "alpha(opacity = 40)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
});
|
||||
</script>
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
@ -90,18 +126,24 @@ jQuery('<div id="loading"></div>')
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php if (ComponentbuilderHelper::checkString($this->SuccessMessage)): ?>
|
||||
<div class="alert alert-success">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<?= $this->SuccessMessage; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div id="form">
|
||||
<div class="span4">
|
||||
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT'); ?></h3>
|
||||
<h3><?= JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT') ?></h3>
|
||||
<div id="compilerForm">
|
||||
<div>
|
||||
<span class="notice" style="display:none; color:red;"><?php echo JText::_('COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT'); ?></span><br />
|
||||
<span class="notice" style="display:none; color:red;"><?= JText::_('COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT') ?></span><br />
|
||||
<?php if ($this->form): ?>
|
||||
<?php foreach ($this->form as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
<div class="control-label"><?= $field->label ?></div>
|
||||
<div class="controls"><?= $field->input ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
@ -109,36 +151,50 @@ jQuery('<div id="loading"></div>')
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
<button class="btn btn-small btn-success" onclick="Joomla.submitbutton('compiler.compiler')"><span class="icon-cog icon-white"></span>
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_COMPILE_COMPONENT'); ?>
|
||||
<?= JText::_('COM_COMPONENTBUILDER_COMPILE_COMPONENT') ?>
|
||||
</button>
|
||||
<input type="hidden" name="install_item_id" value="0">
|
||||
<input type="hidden" name="version" value="3" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="span7">
|
||||
<div id="component-details"><?php echo $selectNotice; ?></div>
|
||||
<?php echo JLayoutHelper::render('jcbnoticeboardtabs', null); ?>
|
||||
<div id="component-details"><?= $selectNotice ?></div>
|
||||
<?= JLayoutHelper::render('jcbnoticeboardtabs', array('id' => 'noticeboard' , 'active' => $noticeboardOptions[array_rand($noticeboardOptions)])) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="get-compiler-animations" style="display:none;">
|
||||
<h1><?= JText::_('COM_COMPONENTBUILDER_PLEASE_WAIT') ?></h1>
|
||||
<h4><?= JText::_('COM_COMPONENTBUILDER_WHILE_WE_DOWNLOAD_ALL_TWENTY_SIX_COMPILER_GIF_ANIMATIONS_RANDOMLY_USED_IN_THE_COMPILER_GUI_DURING_COMPILATION') ?> <span class="loading-dots">.</span></h4>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div id="clear" style="display:none;">
|
||||
<h1><?php echo JText::_('COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER'); ?> <span class="loading-dots">.</span></h1>
|
||||
<h1><?= JText::_('COM_COMPONENTBUILDER_PLEASE_WAIT') ?></h1>
|
||||
<h4><?= JText::_('COM_COMPONENTBUILDER_REMOVING_ALL_ZIP_PACKAGES_FROM_THE_TEMPORARY_FOLDER_OF_THE_JOOMLA_INSTALL') ?> <span class="loading-dots">.</span></h4>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div id="compiler" style="display:none;">
|
||||
<h1><?php echo JText::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED', $this->user->name); ?><span class="loading-dots">.</span></h1>
|
||||
<?php echo ComponentbuilderHelper::getDynamicContent('builder-gif', '707-400'); ?>
|
||||
<div id="compiler-spinner" class="span4" style="display:none;">
|
||||
<h3><?= JText::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT', $this->user->name) ?></h3>
|
||||
<p style="font-size: smaller;"><?= JText::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT') ?></p>
|
||||
<p><b><span class="component-name"><?= JText::_('COM_COMPONENTBUILDER_THE_COMPONENT') ?></span></b> <?= JText::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED') ?> <span class="loading-dots">.</span></p>
|
||||
<div style="text-align: center;"><?= ComponentbuilderHelper::getDynamicContent('builder-gif', $this->builder_gif_size) ?></div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div id="compiler-notice" class="span7" style="display:none;">
|
||||
<?= JLayoutHelper::render('jcbnoticeboard' . $noticeboardOptions[array_rand($noticeboardOptions)], null) ?>
|
||||
<div><?= ComponentbuilderHelper::getDynamicContent('banner', '728-90') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// token
|
||||
var token = '<?php echo JSession::getFormToken(); ?>';
|
||||
var all_is_good = '<?php echo JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME'); ?>';
|
||||
var token = '<?= JSession::getFormToken() ?>';
|
||||
var all_is_good = '<?= JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME') ?>';
|
||||
jQuery('#compilerForm').on('change', '#component',function (e)
|
||||
{
|
||||
var component = jQuery('#component').val();
|
||||
if(component == "") {
|
||||
jQuery('#component-details').html("<?php echo $selectNotice; ?>");
|
||||
jQuery('#component-details').html("<?= $selectNotice ?>");
|
||||
jQuery("#noticeboard").show();
|
||||
jQuery('.notice').show();
|
||||
} else {
|
||||
|
@ -12,6 +12,8 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
|
||||
/**
|
||||
* Componentbuilder View class for the Compiler
|
||||
*/
|
||||
@ -37,8 +39,38 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=compiler');
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
}
|
||||
$this->SuccessMessage = $this->app->getUserState('com_componentbuilder.success_message', false);
|
||||
$this->Components = $this->get('Components');
|
||||
$this->form = $this->setForm();
|
||||
// set the compiler artwork from global settings
|
||||
$this->builder_gif_size = $this->params->get('builder_gif_size', '480-272');
|
||||
// only run these checks if he has access
|
||||
if ($this->canDo->get('compiler.compiler_animations'))
|
||||
{
|
||||
// if the new artwork is not being targeted hide download option of artwork
|
||||
if ('480-540' !== $this->builder_gif_size)
|
||||
{
|
||||
$this->canDo->set('compiler.compiler_animations', false);
|
||||
}
|
||||
// we count of all the files are already there
|
||||
else
|
||||
{
|
||||
// get all the gif files in the gif folder
|
||||
$all_gifs = scandir(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/builder-gif");
|
||||
// check if we have any values
|
||||
if (ComponentbuilderHelper::checkArray($all_gifs))
|
||||
{
|
||||
// count number of files but remove the 2 dot values
|
||||
$num_gifs = count($all_gifs) - 2;
|
||||
// if we have more or the same number of files that are in the array, the we hide the download option
|
||||
if ($num_gifs >= ComponentbuilderHelper::getDynamicContentSize('builder-gif', '480-540'))
|
||||
{
|
||||
$this->canDo->set('compiler.compiler_animations', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
@ -60,8 +92,8 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
}
|
||||
|
||||
// These are subform layouts used in JCB
|
||||
// JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout is loaded
|
||||
// JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout is loaded
|
||||
// JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout are loaded
|
||||
// JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout are loaded
|
||||
|
||||
public function setForm()
|
||||
{
|
||||
@ -230,13 +262,13 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
foreach (ComponentbuilderHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
|
||||
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
}
|
||||
// check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
|
||||
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||
@ -277,30 +309,30 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
jQuery.get(noticeboard)
|
||||
.success(function(board) {
|
||||
if (board.length > 5) {
|
||||
jQuery(\"#noticeboard-md\").html(marked(board));
|
||||
jQuery(\".noticeboard-md\").html(marked(board));
|
||||
getIS(1,board).done(function(result) {
|
||||
if (result){
|
||||
jQuery(\"#vdm-new-notice\").show();
|
||||
jQuery(\".vdm-new-notice\").show();
|
||||
getIS(2,board);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery(\"#noticeboard-md\").html(all_is_good);
|
||||
jQuery(\".noticeboard-md\").html(all_is_good);
|
||||
}
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery(\"#noticeboard-md\").html(all_is_good);
|
||||
jQuery(\".noticeboard-md\").html(all_is_good);
|
||||
});
|
||||
jQuery.get(proboard)
|
||||
.success(function(board) {
|
||||
if (board.length > 5) {
|
||||
jQuery(\"#proboard-md\").html(marked(board));
|
||||
jQuery(\".proboard-md\").html(marked(board));
|
||||
} else {
|
||||
jQuery(\"#proboard-md\").html(all_is_good);
|
||||
jQuery(\".proboard-md\").html(all_is_good);
|
||||
}
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery(\"#proboard-md\").html(all_is_good);
|
||||
jQuery(\".proboard-md\").html(all_is_good);
|
||||
});
|
||||
});
|
||||
// to check is READ/NEW
|
||||
@ -346,6 +378,11 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
// add Translate button.
|
||||
JToolBarHelper::custom('compiler.runTranslator', 'comments-2 custom-button-runtranslator', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
|
||||
}
|
||||
if ($this->canDo->get('compiler.compiler_animations'))
|
||||
{
|
||||
// add Compiler Animations button.
|
||||
JToolBarHelper::custom('compiler.getCompilerAnimations', 'download custom-button-getcompileranimations', '', 'COM_COMPONENTBUILDER_COMPILER_ANIMATIONS', false);
|
||||
}
|
||||
if ($this->canDo->get('compiler.clear_tmp'))
|
||||
{
|
||||
// add Clear tmp button.
|
||||
|
@ -12,6 +12,8 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
|
||||
/**
|
||||
* Componentbuilder View class for the Get_snippets
|
||||
*/
|
||||
@ -104,13 +106,13 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
foreach (ComponentbuilderHelper::$uk_components[$class] as $name)
|
||||
{
|
||||
// check if the CSS file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
|
||||
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
|
||||
{
|
||||
// load the css.
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
}
|
||||
// check if the JavaScript file exists.
|
||||
if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
|
||||
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
|
||||
{
|
||||
// load the js.
|
||||
$this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||
|
@ -133,12 +133,13 @@ JHtml::_('behavior.keepalive');
|
||||
|
||||
// Add spindle-wheel for importations:
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $('body');
|
||||
|
||||
$('<div id="loading"></div>')
|
||||
// waiting spinner
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - $(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - $(window).scrollLeft())
|
||||
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
@ -467,6 +468,7 @@ function getJCBpackageInfo_server(url){
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
var noticeboard = "https://www.vdm.io/componentbuilder-noticeboard-md";
|
||||
jQuery(document).ready(function () {
|
||||
jQuery.get(noticeboard)
|
||||
@ -490,19 +492,19 @@ jQuery(document).ready(function () {
|
||||
// to check is READ/NEW
|
||||
function getIS(type,notice){
|
||||
if(type == 1){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json");
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json&raw=true");
|
||||
} else if (type == 2) {
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json");
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true");
|
||||
}
|
||||
if(token.length > 0 && notice.length){
|
||||
var request = "token="+token+"¬ice="+notice;
|
||||
var request = token+"=1¬ice="+notice;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: "POST",
|
||||
url: getUrl,
|
||||
dataType: "jsonp",
|
||||
dataType: "json",
|
||||
data: request,
|
||||
jsonp: "callback"
|
||||
jsonp: false
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>2nd February, 2021</creationDate>
|
||||
<creationDate>10th March, 2021</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>2.12.6</version>
|
||||
<version>2.12.9</version>
|
||||
<description>< is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -1024,10 +1024,10 @@
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>com_componentbuilder</element>
|
||||
<type>component</type>
|
||||
<version>2.12.6</version>
|
||||
<version>2.12.9</version>
|
||||
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.12.6/JCB_v2.12.6.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.12.9/JCB_v2.12.9.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>stable</tag>
|
||||
|
24
script.php
24
script.php
@ -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;
|
||||
JHTML::_('behavior.modal');
|
||||
|
||||
/**
|
||||
@ -5988,12 +5990,12 @@ class com_componentbuilderInstallerScript
|
||||
{
|
||||
}
|
||||
// check if the PHPExcel stuff is still around
|
||||
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/PHPExcel.php'))
|
||||
if (File::exists(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/PHPExcel.php'))
|
||||
{
|
||||
// We need to remove this old PHPExcel folder
|
||||
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/PHPExcel');
|
||||
// We need to remove this old PHPExcel file
|
||||
JFile::delete(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/PHPExcel.php');
|
||||
File::delete(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/PHPExcel.php');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -6612,7 +6614,7 @@ class com_componentbuilderInstallerScript
|
||||
$query = $db->getQuery(true);
|
||||
// Field to update.
|
||||
$fields = array(
|
||||
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"50","export_language_strings":"1","assets_table_fix":"1","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","builder_gif_size":"480-272","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"50","export_language_strings":"1","assets_table_fix":"1","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
);
|
||||
// Condition.
|
||||
$conditions = array(
|
||||
@ -6629,7 +6631,7 @@ class com_componentbuilderInstallerScript
|
||||
{
|
||||
$rule_length = $db->loadResult();
|
||||
// Check the size of the rules column
|
||||
if ($rule_length <= 94240)
|
||||
if ($rule_length <= 94400)
|
||||
{
|
||||
// Fix the assets table rules column size
|
||||
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';";
|
||||
@ -9250,7 +9252,7 @@ class com_componentbuilderInstallerScript
|
||||
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 2.12.6 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
<h3>Upgrade to Version 2.12.9 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
|
||||
// Set db if not set already.
|
||||
if (!isset($db))
|
||||
@ -10887,7 +10889,7 @@ class com_componentbuilderInstallerScript
|
||||
*/
|
||||
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);
|
||||
@ -10917,7 +10919,7 @@ class com_componentbuilderInstallerScript
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -10936,13 +10938,13 @@ class com_componentbuilderInstallerScript
|
||||
{
|
||||
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;
|
||||
}
|
||||
@ -10988,7 +10990,7 @@ class com_componentbuilderInstallerScript
|
||||
$installer = $parent->getParent();
|
||||
$installPath = $installer->getPath('source');
|
||||
// get all the folders
|
||||
$folders = JFolder::folders($installPath);
|
||||
$folders = Folder::folders($installPath);
|
||||
// check if we have folders we may want to copy
|
||||
$doNotCopy = array('media','admin','site'); // Joomla already deals with these
|
||||
if (count((array) $folders) > 1)
|
||||
@ -11003,7 +11005,7 @@ class com_componentbuilderInstallerScript
|
||||
// set the destination path
|
||||
$dest = JPATH_ROOT.'/'.$folder;
|
||||
// now try to copy the folder
|
||||
if (!JFolder::copy($src, $dest, '', true))
|
||||
if (!Folder::copy($src, $dest, '', true))
|
||||
{
|
||||
$app->enqueueMessage('Could not copy '.$folder.' folder into place, please make sure destination is writable!', 'error');
|
||||
}
|
||||
|
@ -16,6 +16,10 @@ use Joomla\CMS\Language\Language;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\Archive\Archive;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Filesystem\Path;
|
||||
|
||||
/**
|
||||
* Componentbuilder component helper
|
||||
@ -793,7 +797,7 @@ abstract class ComponentbuilderHelper
|
||||
// set the path to the form validation rules
|
||||
$path = JPATH_LIBRARIES . '/src/Form/Rule';
|
||||
// check if the path exist
|
||||
if (!JFolder::exists($path))
|
||||
if (!Folder::exists($path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -802,7 +806,7 @@ abstract class ComponentbuilderHelper
|
||||
// go to that folder
|
||||
chdir($path);
|
||||
// load all the files in this path
|
||||
$items = JFolder::files('.', '\.php', true, true);
|
||||
$items = Folder::files('.', '\.php', true, true);
|
||||
// change back to Joomla working directory
|
||||
chdir($joomla);
|
||||
// make sure we have an array
|
||||
@ -1105,7 +1109,7 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less'), $recurse = true, $full = true)
|
||||
{
|
||||
if (JFolder::exists($folder))
|
||||
if (Folder::exists($folder))
|
||||
{
|
||||
// we must first store the current woking directory
|
||||
$joomla = getcwd();
|
||||
@ -1118,18 +1122,18 @@ abstract class ComponentbuilderHelper
|
||||
foreach ($fileTypes as $type)
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', $type, $recurse, $full);
|
||||
$files[] = Folder::files('.', $type, $recurse, $full);
|
||||
}
|
||||
}
|
||||
elseif (self::checkString($fileTypes))
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', $fileTypes, $recurse, $full);
|
||||
$files[] = Folder::files('.', $fileTypes, $recurse, $full);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get a list of files in the current directory tree
|
||||
$files[] = JFolder::files('.', '.', $recurse, $full);
|
||||
$files[] = Folder::files('.', '.', $recurse, $full);
|
||||
}
|
||||
// change back to Joomla working directory
|
||||
chdir($joomla);
|
||||
@ -1177,9 +1181,6 @@ abstract class ComponentbuilderHelper
|
||||
if ('compiler' === $type)
|
||||
{
|
||||
// import the Joomla librarys
|
||||
jimport('joomla.filesystem.file');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.archive');
|
||||
jimport('joomla.application.component.modellist');
|
||||
// include class to minify js
|
||||
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php';
|
||||
@ -1188,9 +1189,6 @@ abstract class ComponentbuilderHelper
|
||||
if ('smart' === $type)
|
||||
{
|
||||
// import the Joomla libraries
|
||||
jimport('joomla.filesystem.file');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.archive');
|
||||
jimport('joomla.application.component.modellist');
|
||||
}
|
||||
// load this for all
|
||||
@ -1967,51 +1965,244 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of dynamic content
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $dynamicContent = array(
|
||||
// The banners by size
|
||||
// The banners by size (width - height)
|
||||
'banner' => array(
|
||||
'728-90' => array(
|
||||
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
|
||||
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img alt="tlwebdesign a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img alt="VDM a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>',
|
||||
'<a href="https://vdm.bz/jcb-sponsor-agerix" target="_blank" title="Agerix a JCB sponsor | Because community matters..."><img alt="Agerix a JCB sponsor | Because community matters..." src="https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif" width="728" height="90" border="0" /></a>'
|
||||
array(
|
||||
'url' => 'https://cdn.joomla.org/volunteers/joomla-heart-wide.gif',
|
||||
'hash' => 'f857e3a38facaeac9eba3cffa912b620',
|
||||
'html' => '<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img class="jcb-sponsor-banner" src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>'),
|
||||
array(
|
||||
'url' => 'https://magazine.joomla.org/images/banners/JCM_2010_728x90.png',
|
||||
'hash' => '4083c66f996279fd5a76adffc3a7d194',
|
||||
'html' => '<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img class="jcb-sponsor-banner" alt="Joomla! Community Magazine | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png',
|
||||
'hash' => 'd19be1f9f5b2049ff901096aafc246be',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="tlwebdesign a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif',
|
||||
'hash' => '84478dfa0cd880395815e0ee026812a4',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="VDM a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>'),
|
||||
array(
|
||||
'url' => 'https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif',
|
||||
'hash' => 'b24c0726aa809cdcc04bcffe7e1e1529',
|
||||
'html' => '<a href="https://vdm.bz/jcb-sponsor-agerix" target="_blank" title="Agerix a JCB sponsor | Because community matters..."><img class="jcb-sponsor-banner" alt="Agerix a JCB sponsor | Because community matters..." src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/agerix-loves-jcb-728-90.gif" width="728" height="90" border="0" /></a>')
|
||||
),
|
||||
'160-600' => array(
|
||||
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
|
||||
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
|
||||
array(
|
||||
'url' => 'https://cdn.joomla.org/volunteers/joomla-heart-tall.gif',
|
||||
'hash' => '9a75e4929b86c318128b53cf78251678',
|
||||
'html' => '<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>'),
|
||||
array(
|
||||
'url' => 'https://magazine.joomla.org/images/banners/JCM_2010_120x600.png',
|
||||
'hash' => '5389cf3be8569cb3f6793e8bd4013d19',
|
||||
'html' => '<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/banner/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>')
|
||||
)
|
||||
),
|
||||
// The build-gif by size
|
||||
// The build-gif by size (width - height)
|
||||
'builder-gif' => array(
|
||||
'707-400' => array(
|
||||
'<img src="components/com_componentbuilder/assets/images/ajax-loader.gif" />'
|
||||
// original gif ;)
|
||||
'480-272' => array(
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/original.gif',
|
||||
'hash' => '676e37a949add8f4573381195cd1061c',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/original.gif" />'
|
||||
)
|
||||
),
|
||||
// new gif artwork since 2021
|
||||
'480-540' => array(
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/1.gif',
|
||||
'hash' => 'ce6e36456fa794ba95d981547b2f54f8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/1.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/2.gif',
|
||||
'hash' => '0a54dbc393359747e33db90cabb1e2d7',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/2.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/3.gif',
|
||||
'hash' => '4e5498713ff69a64a0a79dbf620372a3',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/3.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/4.gif',
|
||||
'hash' => '3554ffab2a6df95a116fd9f0db63925c',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/4.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/5.gif',
|
||||
'hash' => '08f0cdf188593eca65c6dafd7af27ef9',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/5.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/6.gif',
|
||||
'hash' => '103b46a7ac3fcb974e25d06f417a4e87',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/6.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/7.gif',
|
||||
'hash' => 'ffa8547099b7286f89ab7ff5a140dd90',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/7.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/8.gif',
|
||||
'hash' => '316df780f9e4ce81200a65d3c4303c41',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/8.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/9.gif',
|
||||
'hash' => '9ab6ba78b6e63a285fdef2ff5e447c93',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/9.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/10.gif',
|
||||
'hash' => 'cd9abaa1cb95f51a70916da6b70614f2',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/10.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/11.gif',
|
||||
'hash' => 'cfe53095b5249618e2348223b89262b9',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/11.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/12.gif',
|
||||
'hash' => '15a6690647d5160d67c80ce4dd1f5602',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/12.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/13.gif',
|
||||
'hash' => '2f77562e92c8a3b7c47664c98f551fe8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/13.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/14.gif',
|
||||
'hash' => '46db15517ef5bd063be85134e1cc575d',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/14.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/15.gif',
|
||||
'hash' => 'e6c96eff157ea648ceb1583f2cc22544',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/15.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/16.gif',
|
||||
'hash' => '76010b7d1f99952eb9645df660467ae8',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/16.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/17.gif',
|
||||
'hash' => '021219ddd72d8fcfc7f80bd4a874d651',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/17.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/18.gif',
|
||||
'hash' => '383af3179d4ae27301c1292e630d7155',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/18.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/19.gif',
|
||||
'hash' => '8537e6d7be93447241b521f851e8a61d',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/19.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/20.gif',
|
||||
'hash' => '10d96f70e3d43086a925b00a7dc0022e',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/20.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/21.gif',
|
||||
'hash' => '161de9865b171b44039353b8d50491d3',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/21.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/22.gif',
|
||||
'hash' => '6a2354e43eb97d278d74bb2c12890988',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/22.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/23.gif',
|
||||
'hash' => '2cb6e2f9562a8dc8eef6d5d8d1a84f5e',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/23.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>'),
|
||||
array(
|
||||
'url' => 'https://www.joomlacomponentbuilder.com/images/builder/24.gif',
|
||||
'hash' => '745b3fb5e16515689132432bf02ab1b4',
|
||||
'html' => '<img src="[[[ROOT-URL]]]administrator/components/com_componentbuilder/assets/images/builder-gif/24.gif" /><br /><div style="text-align: right; font-size: smaller;">Animation produced with 3D Particle Explorations by Jack Rugile.</div>')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* get the dynamic content array size
|
||||
*
|
||||
* @param string $type The type of content
|
||||
* @param string $size The size of the content
|
||||
*
|
||||
* @return int on success number of items in array type,size
|
||||
*
|
||||
*/
|
||||
public static function getDynamicContentSize($type, $size)
|
||||
{
|
||||
if (isset(self::$dynamicContent[$type]) && isset(self::$dynamicContent[$type][$size])
|
||||
&& ($nr = self::checkArray(self::$dynamicContent[$type][$size])))
|
||||
{
|
||||
return $nr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the dynamic content
|
||||
*
|
||||
* @param string $type The type of content
|
||||
* @param string $size The size of the content
|
||||
* @param mix $default The default to return
|
||||
* @param int $try Retry tracker (when bigger then array size it stops)
|
||||
* @param mix $getter The specific getter number (not zero based)
|
||||
*
|
||||
* @return string on success
|
||||
* @return string on success html string
|
||||
*
|
||||
*/
|
||||
public static function getDynamicContent($type, $size, $default = '')
|
||||
public static function getDynamicContent($type, $size, $default = '', $try = 1, $getter = null)
|
||||
{
|
||||
if (isset(self::$dynamicContent[$type]) && isset(self::$dynamicContent[$type][$size]) && ($nr = self::checkArray(self::$dynamicContent[$type][$size])))
|
||||
if (($nr = self::getDynamicContentSize($type, $size)) !== 0)
|
||||
{
|
||||
// use specific getter
|
||||
if ($getter)
|
||||
{
|
||||
$get = --$getter;
|
||||
}
|
||||
// get the random getter number
|
||||
elseif ($nr > 1)
|
||||
{
|
||||
// get the random item number
|
||||
$get = (int) rand(0, --$nr);
|
||||
}
|
||||
else
|
||||
{
|
||||
$get = 0;
|
||||
}
|
||||
// get the current target if found
|
||||
if (isset(self::$dynamicContent[$type][$size][$get]))
|
||||
{
|
||||
$target = self::$dynamicContent[$type][$size][$get];
|
||||
// set file name
|
||||
$file_name = basename($target['url']);
|
||||
// set the local path (in admin area so when the component uninstall these images get removed as well)
|
||||
$path = JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type/$file_name";
|
||||
// check if file exist or if it changed
|
||||
if (($image_data = self::getFileContents($path, false)) === false ||
|
||||
md5($image_data) !== $target['hash'])
|
||||
{
|
||||
// since the file does not exist or has changed (so we have a new hash)
|
||||
// therefore we download it to validate
|
||||
if (($image_data = self::getFileContents($target['url'], false)) !== false &&
|
||||
md5($image_data) === $target['hash'])
|
||||
{
|
||||
// create the JCB type path if it does not exist
|
||||
if (!Folder::exists(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type"))
|
||||
{
|
||||
Folder::create(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type");
|
||||
}
|
||||
// only set the image if the data match the hash
|
||||
self::writeFile($path, $image_data);
|
||||
}
|
||||
// we retry array size times (unless specific getter is used)
|
||||
elseif ($try <= $nr && !$getter)
|
||||
{
|
||||
// the first time around failed so we try again (the size of the array times)
|
||||
return self::getDynamicContent($type, $size, $default, ++$try);
|
||||
}
|
||||
}
|
||||
// return found content
|
||||
return self::$dynamicContent[$type][$size][$get];
|
||||
return str_replace('[[[ROOT-URL]]]', JURI::root(), $target['html']);
|
||||
}
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
@ -2501,20 +2692,20 @@ abstract class ComponentbuilderHelper
|
||||
chdir($workingDIR);
|
||||
|
||||
// the full file path of the zip file
|
||||
$filepath = JPath::clean($filepath);
|
||||
$filepath = Path::clean($filepath);
|
||||
|
||||
// delete an existing zip file (or use an exclusion parameter in JFolder::files()
|
||||
JFile::delete($filepath);
|
||||
// delete an existing zip file (or use an exclusion parameter in Folder::files()
|
||||
File::delete($filepath);
|
||||
|
||||
// get a list of files in the current directory tree
|
||||
$files = JFolder::files('.', '', true, true);
|
||||
$files = Folder::files('.', '', true, true);
|
||||
$zipArray = array();
|
||||
// setup the zip array
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$tmp = array();
|
||||
$tmp['name'] = str_replace('./', '', $file);
|
||||
$tmp['data'] = JFile::read($file);
|
||||
$tmp['data'] = self::getFileContents($file);
|
||||
$tmp['time'] = filemtime($file);
|
||||
$zipArray[] = $tmp;
|
||||
}
|
||||
@ -2523,7 +2714,8 @@ abstract class ComponentbuilderHelper
|
||||
chdir($joomla);
|
||||
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
$adapter = new Archive();
|
||||
$zip = $adapter->getAdapter('zip');
|
||||
|
||||
//create the zip file
|
||||
if ($zip->create($filepath, $zipArray))
|
||||
@ -2578,7 +2770,7 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function removeFolder($dir, $ignore = false)
|
||||
{
|
||||
if (JFolder::exists($dir))
|
||||
if (Folder::exists($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
@ -2608,7 +2800,7 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JFolder::delete($file_dir);
|
||||
Folder::delete($file_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2627,13 +2819,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JFile::delete($file_dir);
|
||||
File::delete($file_dir);
|
||||
}
|
||||
}
|
||||
// delete the root folder if not ignore found
|
||||
if (!self::checkArray($ignore))
|
||||
{
|
||||
return JFolder::delete($dir);
|
||||
return Folder::delete($dir);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -3922,11 +4114,10 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$filePath = $default;
|
||||
}
|
||||
jimport('joomla.filesystem.folder');
|
||||
// create the folder if it does not exist
|
||||
if ($createIfNotSet && !JFolder::exists($filePath))
|
||||
if ($createIfNotSet && !Folder::exists($filePath))
|
||||
{
|
||||
JFolder::create($filePath);
|
||||
Folder::create($filePath);
|
||||
}
|
||||
// setup the file name
|
||||
$fileName = '';
|
||||
@ -3991,11 +4182,10 @@ abstract class ComponentbuilderHelper
|
||||
self::$params = JComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
$folderPath = self::$params->get($target, $default);
|
||||
jimport('joomla.filesystem.folder');
|
||||
// create the folder if it does not exist
|
||||
if ($createIfNotSet && !JFolder::exists($folderPath))
|
||||
if ($createIfNotSet && !Folder::exists($folderPath))
|
||||
{
|
||||
JFolder::create($folderPath);
|
||||
Folder::create($folderPath);
|
||||
}
|
||||
// return the url
|
||||
if ('url' === $type)
|
||||
@ -6703,12 +6893,12 @@ abstract class ComponentbuilderHelper
|
||||
$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;
|
||||
|
Reference in New Issue
Block a user