Skip to content

Commit

Permalink
Added media library placeholder to module builder. Remove uikit-3 fro…
Browse files Browse the repository at this point in the history
…m JCB, was added by accident due to test module.
  • Loading branch information
Llewellynvdm committed Dec 13, 2019
1 parent b9729c4 commit 9f6e0c4
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 35 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions admin/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
27 changes: 26 additions & 1 deletion admin/controllers/compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ public function installCompiledExtensions()
$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)
{
Expand Down Expand Up @@ -311,7 +317,14 @@ public function installCompiledComponent()
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);
Expand Down Expand Up @@ -342,6 +355,12 @@ public function installCompiledModule()
$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;
Expand Down Expand Up @@ -377,6 +396,12 @@ public function installCompiledPlugin()
$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;
Expand Down
50 changes: 49 additions & 1 deletion admin/helpers/compiler/e_Interpretation.php
Original file line number Diff line number Diff line change
Expand Up @@ -16674,7 +16674,20 @@ public function getInbetweenStrings($str, $start = '#' . '#' . '#', $end = '#' .

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)
Expand All @@ -16691,6 +16704,41 @@ public function getModHelperCode(&$module)
"}" . 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
Expand Down
7 changes: 3 additions & 4 deletions componentbuilder.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>10th December, 2019</creationDate>
<creationDate>13th December, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.10.8</version>
<version>2.10.9</version>
<description><![CDATA[
<h1>Component Builder (v.2.10.8)</h1>
<h1>Component Builder (v.2.10.9)</h1>
<div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
Expand Down Expand Up @@ -39,7 +39,6 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo
<folder>js</folder>
<folder>css</folder>
<folder>images</folder>
<folder>uikit-v3</folder>
<folder>uikit-v2</folder>
<folder>footable-v3</folder>
</media>
Expand Down
8 changes: 4 additions & 4 deletions componentbuilder_update_server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@
<version>2.10.6</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.10.8/JCB_v2.10.8.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.9/JCB_v2.10.9.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
Expand All @@ -874,7 +874,7 @@
<version>2.10.7</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.10.8/JCB_v2.10.8.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.9/JCB_v2.10.9.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
Expand All @@ -888,10 +888,10 @@
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.10.8</version>
<version>2.10.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.10.8/JCB_v2.10.8.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.9/JCB_v2.10.9.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
Expand Down
1 change: 0 additions & 1 deletion media/uikit-v3/css/index.html

This file was deleted.

1 change: 0 additions & 1 deletion media/uikit-v3/css/uikit.min.css

This file was deleted.

1 change: 0 additions & 1 deletion media/uikit-v3/index.html

This file was deleted.

1 change: 0 additions & 1 deletion media/uikit-v3/js/index.html

This file was deleted.

3 changes: 0 additions & 3 deletions media/uikit-v3/js/uikit-icons.min.js

This file was deleted.

3 changes: 0 additions & 3 deletions media/uikit-v3/js/uikit.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion script.php
Original file line number Diff line number Diff line change
Expand Up @@ -8985,7 +8985,7 @@ public function postflight($type, JAdapterInstance $parent)
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.10.8 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.10.9 Was Successful! Let us know if anything is not working as expected.</h3>';

// Set db if not set already.
if (!isset($db))
Expand Down

0 comments on commit 9f6e0c4

Please sign in to comment.