Added media library placeholder to module builder. Remove uikit-3 from JCB, was added by accident due to test module.
This commit is contained in:
@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.8) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.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)
|
||||
|
||||
@ -144,14 +144,14 @@ 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*: 10th December, 2019
|
||||
+ *Version*: 2.10.8
|
||||
+ *Last Build*: 13th December, 2019
|
||||
+ *Version*: 2.10.9
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **277467**
|
||||
+ *Field count*: **1491**
|
||||
+ *File count*: **1766**
|
||||
+ *Folder count*: **287**
|
||||
+ *Line count*: **277353**
|
||||
+ *Field count*: **1490**
|
||||
+ *File count*: **1752**
|
||||
+ *Folder count*: **278**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
@ -266,6 +266,12 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
$fileNames = ComponentbuilderHelper::mergeArrays(array($fileNames, $app->getUserState('com_componentbuilder.modules_folder_name', array()) ));
|
||||
// check if we have plugins
|
||||
$fileNames = ComponentbuilderHelper::mergeArrays(array($fileNames, $app->getUserState('com_componentbuilder.plugins_folder_name', array()) ));
|
||||
|
||||
// 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', '');
|
||||
|
||||
// loop and install all extensions found
|
||||
foreach ($fileNames as $fileName)
|
||||
{
|
||||
@ -311,7 +317,14 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
if($user->authorise('core.admin'))
|
||||
{
|
||||
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_COMPONENT');
|
||||
$fileName = JFactory::getApplication()->getUserState('com_componentbuilder.component_folder_name');
|
||||
$app = JFactory::getApplication();
|
||||
$fileName = $app->getUserState('com_componentbuilder.component_folder_name');
|
||||
|
||||
// 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', '');
|
||||
|
||||
if ($this->installExtension($fileName))
|
||||
{
|
||||
$message = JText::sprintf('COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION', $fileName);
|
||||
@ -342,6 +355,12 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_MODULE');
|
||||
$app = JFactory::getApplication();
|
||||
$fileNames = $app->getUserState('com_componentbuilder.modules_folder_name');
|
||||
|
||||
// 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', '');
|
||||
|
||||
if (ComponentbuilderHelper::checkArray($fileNames))
|
||||
{
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
@ -377,6 +396,12 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
|
||||
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_PLUGIN');
|
||||
$app = JFactory::getApplication();
|
||||
$fileNames = $app->getUserState('com_componentbuilder.plugins_folder_name');
|
||||
|
||||
// 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', '');
|
||||
|
||||
if (ComponentbuilderHelper::checkArray($fileNames))
|
||||
{
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
@ -16674,7 +16674,20 @@ function vdm_dkim() {
|
||||
|
||||
public function getModCode(&$module)
|
||||
{
|
||||
return PHP_EOL . $module->mod_code . PHP_EOL;
|
||||
// get component helper string
|
||||
$Helper = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper';
|
||||
$component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
|
||||
$_helper = '';
|
||||
// get libraries code
|
||||
$libraries = array($this->bbb . 'MOD_LIBRARIES' . $this->ddd => $this->getModLibCode($module));
|
||||
$code = $this->setPlaceholders($module->mod_code, $libraries);
|
||||
// check if component helper class should be added
|
||||
if (strpos($code, $Helper . '::') !== false && strpos($code, "/components/com_" . $component . "/helpers/" . $component . ".php") === false)
|
||||
{
|
||||
$_helper = '//' . $this->setLine(__LINE__) . ' Include the component helper functions only once';
|
||||
$_helper .= PHP_EOL . "JLoader::register('". $Helper . "', JPATH_ADMINISTRATOR . '/components/com_" . $component . "/helpers/" . $component . ".php');";
|
||||
}
|
||||
return $_helper . PHP_EOL . $code . PHP_EOL;
|
||||
}
|
||||
|
||||
public function getModDefault(&$module)
|
||||
@ -16691,6 +16704,41 @@ function vdm_dkim() {
|
||||
"}" . PHP_EOL;
|
||||
}
|
||||
|
||||
public function getModLibCode(&$module)
|
||||
{
|
||||
$setter = '';
|
||||
if (isset($this->libManager[$module->key][$module->code_name]) && ComponentbuilderHelper::checkArray($this->libManager[$module->key][$module->code_name]))
|
||||
{
|
||||
$setter .= '//' . $this->setLine(__LINE__) . 'get the document object';
|
||||
$setter .= PHP_EOL . '$document = JFactory::getDocument();';
|
||||
foreach ($this->libManager[$module->key][$module->code_name] as $id => $true)
|
||||
{
|
||||
if (isset($this->libraries[$id]) && ComponentbuilderHelper::checkObject($this->libraries[$id]) && isset($this->libraries[$id]->document) && ComponentbuilderHelper::checkString($this->libraries[$id]->document))
|
||||
{
|
||||
$setter .= PHP_EOL . $this->libraries[$id]->document;
|
||||
}
|
||||
elseif (isset($this->libraries[$id]) && ComponentbuilderHelper::checkObject($this->libraries[$id]) && isset($this->libraries[$id]->how))
|
||||
{
|
||||
$setter .= $this->setLibraryDocument($id);
|
||||
}
|
||||
}
|
||||
}
|
||||
// check if we have string
|
||||
if (ComponentbuilderHelper::checkString($setter))
|
||||
{
|
||||
return $this->setPlaceholders(
|
||||
str_replace('$this->document->', '$document->',
|
||||
implode(PHP_EOL,
|
||||
array_map(trim,
|
||||
(array) explode(PHP_EOL, $setter)
|
||||
)
|
||||
)
|
||||
),
|
||||
$this->placeholders);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getModuleMainXML(&$module)
|
||||
{
|
||||
// set the custom table key
|
||||
|
Reference in New Issue
Block a user