34
0
Fork 0

Compare commits

...

21 Commits
5.x ... 3.x

Author SHA1 Message Date
Robot c84d21ecae
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-13 12:23:57 +02:00
Robot d328726ed2
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-10 18:07:21 +02:00
Robot b8fe8ea035
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-06 07:40:18 +02:00
Robot 9bb595d2c5
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-03 07:54:09 +02:00
Robot 889a2f2d06
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-02 16:10:47 +02:00
Robot 96998c467e
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-30 10:29:24 +02:00
Robot 0192cd94c3
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-27 15:45:07 +02:00
Robot 0eb70b4efa
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-24 21:10:42 +02:00
Robot daec4e0919
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 15:32:19 +02:00
Robot d54d2e1c6c
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 00:59:42 +02:00
Robot bb8fd25e3f
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-16 19:05:17 +02:00
Robot f27c519e5b
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-09 13:07:08 +02:00
Robot 2a43a19e86
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-06 19:48:58 +02:00
Robot 24c27ac91a
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-27 15:04:19 +02:00
Robot ad056bb419
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-26 22:30:10 +02:00
Robot 652032d118
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-20 14:19:16 +02:00
Robot d744739e33
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-15 12:00:50 +02:00
Robot 45d2635350
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 16:01:04 +02:00
Robot 2716eca7bf
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 12:40:25 +02:00
Robot 1892d6f244
Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-11 16:56:07 +02:00
Robot a4f9c414e0
Update on v1.2.0 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-10 13:40:49 +02:00
4 changed files with 11 additions and 441 deletions

View File

@ -17,7 +17,8 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Registry\Registry;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as CompilerFactory;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
@ -106,7 +107,7 @@ class PlgExtensionComponentbuilderPowersAutoloaderCompiler extends CMSPlugin
// only check if there are active
if (ArrayHelper::check($this->componentsActive))
{
return in_array((int) CFactory::_('Config')->component_id, $this->componentsActive);
return in_array((int) CompilerFactory::_('Config')->component_id, $this->componentsActive);
}
return false;
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.10" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER</name>
<creationDate>9th March, 2024</creationDate>
<creationDate>13th May, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>

View File

@ -94,7 +94,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build edit button
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_EDIT_S', $button_label).'" style="display: none; padding: 3px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
@ -144,9 +144,9 @@ class JFormFieldJoomlaplugins extends JFormFieldList
protected function getOptions()
{
// Get the user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Get the databse object.
$db = JFactory::getDBO();
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name','a.name','b.name','c.name'),array('id','plugin_system_name','name','class_extends_name','joomla_plugin_group_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_plugin', 'a'));
@ -169,11 +169,13 @@ class JFormFieldJoomlaplugins extends JFormFieldList
$options = array();
if ($items)
{
$options[] = JHtml::_('select.option', '', 'Select a plugin');
$options[] = Html::_('select.option', '', 'Select a plugin');
foreach($items as $item)
{
// set a full class name
$options[] = JHtml::_('select.option', $item->id, '( ' . $item->plugin_system_name . ' ) class Plg' . ucfirst($item->joomla_plugin_group_name) . $item->name . ' extends ' . $item->class_extends_name);
$group_name = $item->joomla_plugin_group_name ?? '';
$name = $item->name ?? '';
$options[] = Html::_('select.option', $item->id, '( ' . $item->plugin_system_name . ' ) class Plg' . $group_name . $name . ' extends ' . $item->class_extends_name);
}
}
return $options;

View File

@ -48,439 +48,6 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
if ('install' === $route)
{
// needs fix
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.0 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 2.10.13 or higher installed
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) || $jcbVersion[0] >= 3))
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB 2.10.13 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.0 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.0 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.1.18 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 1 && $jcbVersion[2] >= 18) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 1) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.1.18 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.14 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.1.18 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 1 && $jcbVersion[2] >= 18) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 1) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.1.18 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.14 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.14 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.14 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';