52
0

Release of v2.0.0

This commit is contained in:
Robot 2024-03-02 22:06:24 +02:00
parent 109716e9f6
commit 9a82c269a8
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
5 changed files with 172 additions and 41 deletions

View File

@ -28,7 +28,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
* Extension - Componentbuilder ActionLog Compiler plugin.
*
* @package ComponentbuilderActionLogCompiler
* @since 1.1.1
* @since 2.0.0
*/
class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
{
@ -45,14 +45,14 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
*
* @var array
*/
protected $languageArray = array();
protected $languageArray = [];
/**
* The Scripts
*
* @var array
*/
protected $scriptsArray = array('POSTINSTALLSCRIPT' => array(), 'POSTUPDATESCRIPT' => array(), 'UNINSTALLSCRIPT' => array());
protected $scriptsArray = ['POSTINSTALLSCRIPT' => [], 'POSTUPDATESCRIPT' => [], 'UNINSTALLSCRIPT' => []];
/**
* Event Triggered in the compiler [on After Get Component Data]
@ -61,9 +61,9 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
*
* @since 1.0
*/
public function jcb_ce_onAfterGetComponentData(&$context, $compiler)
public function jcb_ce_onAfterGetComponentData()
{
if ($this->componentActive($context) && ArrayHelper::check($this->languageArray))
if ($this->componentActive() && ArrayHelper::check($this->languageArray))
{
foreach($this->languageArray as $key => $string)
{
@ -79,15 +79,20 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
*
* @since 1.0
*/
public function jcb_ce_onAfterBuildFilesContent(&$context, &$componentData, &$fileContentStatic, &$fileContentDynamic, &$placeholders, &$hhh)
public function jcb_ce_onAfterBuildFilesContent()
{
if ($this->componentActive($context))
if ($this->componentActive())
{
$function_name = 'getMainJ3';
if (CFactory::_('Config')->get('joomla_version', 3) != 3)
{
$function_name = 'getMainJ4';
}
// now load the script strings to the component
foreach ($this->scriptsArray as $target => &$bucket)
{
// add the component main target script
CFactory::_('Compiler.Builder.Content.One')->add($target, $this->{'getMain' . $target}());
CFactory::_('Compiler.Builder.Content.One')->add($target, $this->{$function_name . $target}());
// add the component views target scripts
if (ArrayHelper::check($bucket))
{
@ -104,10 +109,10 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
*
* @since 1.0
*/
public function jcb_ce_onAfterModelViewData(&$context, &$view, &$placeholders)
public function jcb_ce_onAfterModelViewData(&$view)
{
// add the better integration with action log
if ($this->componentActive($context) &&ArrayHelper::check($view->fields))
if ($this->componentActive() &&ArrayHelper::check($view->fields))
{
foreach ($view->fields as $field)
{
@ -144,10 +149,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
CFactory::_('Placeholder')->set('<<<MAIN_TITLE>>>', 'id', false);
}
$function_name = 'getViewJ3';
if (CFactory::_('Config')->get('joomla_version', 3) != 3)
{
$function_name = 'getViewJ4';
}
// now load the script strings
foreach ($this->scriptsArray as $target => &$bucket)
{
$bucket[] = $this->{'getView' . $target}();
$bucket[] = $this->{$function_name . $target}();
}
// just remove it again
@ -164,16 +175,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getMainPOSTINSTALLSCRIPT()
protected function getMainJ3POSTINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(3) . "{";
$script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "}";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("component") . " action logs extensions object.";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new \stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions->extension = 'com_" . Placefix::_("component") . "';";
$script .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set the object into the action logs extensions table.";
@ -188,16 +199,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getViewPOSTINSTALLSCRIPT()
protected function getViewJ3POSTINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(3) . "{";
$script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "}";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("view") . " action log config object.";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new \stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_title = '" . Placefix::_("VIEW") . "';";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_alias = 'com_" . Placefix::_("component") . "." . Placefix::_("view") . "';";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->id_holder = 'id';";
@ -217,16 +228,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getMainPOSTUPDATESCRIPT()
protected function getMainJ3POSTUPDATESCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(3) . "{";
$script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "}";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("component") . " action logs extensions object.";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new \stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions->extension = 'com_" . Placefix::_("component") . "';";
$script .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Check if " . Placefix::_("component") . " action log extension is already in action logs extensions DB.";
@ -252,16 +263,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getViewPOSTUPDATESCRIPT()
protected function getViewJ3POSTUPDATESCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(3) . "{";
$script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "}";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("view") . " action log config object.";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new \stdClass();";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->id = null;";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_title = '" . Placefix::_("VIEW") . "';";
$script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_alias = 'com_" . Placefix::_("component") . "." . Placefix::_("view") . "';";
@ -298,17 +309,17 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getMainUNINSTALLSCRIPT()
protected function getMainJ3UNINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(2) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(2) . "}";
$script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set app if not set already.";
$script .= PHP_EOL . Indent::_(2) . "if (!isset(\$app))";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "\$app = JFactory::getApplication();";
$script .= PHP_EOL . Indent::_(3) . "\$app = Factory::getApplication();";
$script .= PHP_EOL . Indent::_(2) . "}";
$script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Remove " . Placefix::_("Component") . " from the action_logs_extensions table";
@ -324,7 +335,7 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
$script .= PHP_EOL . Indent::_(2) . "if (\$" . Placefix::_("component") . "_removed_done)";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " If successfully remove " . Placefix::_("Component") . " add queued success message.";
$script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(JTe" . "xt::_('The com_" . Placefix::_("component") . " extension was removed from the <b>#__action_logs_extensions</b> table'));";
$script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(Te" . "xt::_('The com_" . Placefix::_("component") . " extension was removed from the <b>#__action_logs_extensions</b> table'));";
$script .= PHP_EOL . Indent::_(2) . "}";
return CFactory::_('Placeholder')->update_($script);
@ -336,17 +347,17 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
* @return string
*
*/
protected function getViewUNINSTALLSCRIPT()
protected function getViewJ3UNINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already.";
$script .= PHP_EOL . Indent::_(2) . "if (!isset(\$db))";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDbo();";
$script .= PHP_EOL . Indent::_(3) . "\$db = Factory::getDbo();";
$script .= PHP_EOL . Indent::_(2) . "}";
$script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set app if not set already.";
$script .= PHP_EOL . Indent::_(2) . "if (!isset(\$app))";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "\$app = JFactory::getApplication();";
$script .= PHP_EOL . Indent::_(3) . "\$app = Factory::getApplication();";
$script .= PHP_EOL . Indent::_(2) . "}";
$script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Remove " . Placefix::_("Component") . " " . Placefix::_("View") . " from the action_log_config table";
@ -361,12 +372,129 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
$script .= PHP_EOL . Indent::_(2) . "if (\$" . Placefix::_("view") . "_action_log_config_done)";
$script .= PHP_EOL . Indent::_(2) . "{";
$script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " If successfully removed " . Placefix::_("Component") . " " . Placefix::_("View") . " add queued success message.";
$script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(JTe" . "xt::_('The com_" . Placefix::_("component") . "." . Placefix::_("view") . " type alias was removed from the <b>#__action_log_config</b> table'));";
$script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(Te" . "xt::_('The com_" . Placefix::_("component") . "." . Placefix::_("view") . " type alias was removed from the <b>#__action_log_config</b> table'));";
$script .= PHP_EOL . Indent::_(2) . "}";
return CFactory::_('Placeholder')->update_($script);
}
/**
* get the Main Post Install Script
*
* @return string
*
*/
protected function getMainJ4POSTINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Add component to the action logs extensions table.";
$script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogsExtensions();";
return $script;
}
/**
* get the View Post Install Script
*
* @return string
*
*/
protected function getViewJ4POSTINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Add " . Placefix::_("View") . " to the action logs config table.";
$script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogConfig(";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeTitle";
$script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("VIEW") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeAlias";
$script .= PHP_EOL . Indent::_(4) . "'com_" . Placefix::_("component") . "." . Placefix::_("view") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " idHolder";
$script .= PHP_EOL . Indent::_(4) . "'id',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " titleHolder";
$script .= PHP_EOL . Indent::_(4) . "'<<<MAIN_TITLE>>>',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " tableName";
$script .= PHP_EOL . Indent::_(4) . "'#__" . Placefix::_("component") . "_" . Placefix::_("view") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " textPrefix";
$script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("LANG_PREFIX") . "'";
$script .= PHP_EOL . Indent::_(3) . ");";
return CFactory::_('Placeholder')->update_($script);
}
/**
* get the Main Post Update Script
*
* @return string
*
*/
protected function getMainJ4POSTUPDATESCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Add/Update component in the action logs extensions table.";
$script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogsExtensions();";
return $script;
}
/**
* get the View Post Update Script
*
* @return string
*
*/
protected function getViewJ4POSTUPDATESCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Add/Update " . Placefix::_("View") . " in the action logs config table.";
$script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogConfig(";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeTitle";
$script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("VIEW") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeAlias";
$script .= PHP_EOL . Indent::_(4) . "'com_" . Placefix::_("component") . "." . Placefix::_("view") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " idHolder";
$script .= PHP_EOL . Indent::_(4) . "'id',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " titleHolder";
$script .= PHP_EOL . Indent::_(4) . "'<<<MAIN_TITLE>>>',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " tableName";
$script .= PHP_EOL . Indent::_(4) . "'#__" . Placefix::_("component") . "_" . Placefix::_("view") . "',";
$script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " textPrefix";
$script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("LANG_PREFIX") . "'";
$script .= PHP_EOL . Indent::_(3) . ");";
return CFactory::_('Placeholder')->update_($script);
}
/**
* get the Main Uninstall Script
*
* @return string
*
*/
protected function getMainJ4UNINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Remove component from action logs extensions table.";
$script .= PHP_EOL . Indent::_(2) . "\$this->removeActionLogsExtensions();";
return $script;
}
/**
* get the View Uninstall Script
*
* @return string
*
*/
protected function getViewJ4UNINSTALLSCRIPT()
{
$script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Remove " . Placefix::_("View") . " from action logs config table.";
$script .= PHP_EOL . Indent::_(2) . "\$this->removeActionLogConfig('com_"
. Placefix::_("component") . "." . Placefix::_("view") . "');";
return CFactory::_('Placeholder')->update_($script);
}
/**
* The array of active components
@ -385,12 +513,10 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
/**
* Set the line number in comments
*
* @param string $context The context of the current executing component
*
* @return bool
*
*/
protected function componentActive(&$context)
protected function componentActive()
{
// check the active option
if (!$this->activateOption)
@ -410,7 +536,7 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
// only check if there are active
if (ArrayHelper::check($this->componentsActive))
{
return in_array((int) filter_var($context, FILTER_SANITIZE_NUMBER_INT), $this->componentsActive);
return in_array((int) CFactory::_('Config')->component_id, $this->componentsActive);
}
return false;
}

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="extension" method="upgrade">
<extension type="plugin" version="3.10" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER</name>
<creationDate>24th October, 2023</creationDate>
<creationDate>2nd March, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</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>1.1.1</version>
<version>2.0.0</version>
<description>PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION</description>
<!-- Scripts to run on installation -->

View File

@ -1,6 +1,6 @@
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER="Extension - Componentbuilder ActionLog Compiler"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_DESCRIPTION="This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field."
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder ActionLog Compiler (v.1.1.1)</h1> <div style='clear: both;'></div><p>This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder ActionLog Compiler (v.2.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_COMPONENT_ACTIVATION="Component Activation"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. <b>All</b> will target all components, and <b>Selected</b> will let you select only those you want to be active."

View File

@ -1,6 +1,6 @@
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER="Extension - Componentbuilder ActionLog Compiler"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_DESCRIPTION="This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field."
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder ActionLog Compiler (v.1.1.1)</h1> <div style='clear: both;'></div><p>This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder ActionLog Compiler (v.2.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to improve your action log integration with Joomla for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 27th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_COMPONENT_ACTIVATION="Component Activation"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options"
PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. <b>All</b> will target all components, and <b>Selected</b> will let you select only those you want to be active."

View File

@ -12,6 +12,11 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
/**
* Extension - Componentbuilder ActionLog Compiler script file.
*
@ -31,7 +36,7 @@ class plgExtensionComponentbuilderActionLogCompilerInstallerScript
public function preflight($route, $adapter)
{
// get application
$app = JFactory::getApplication();
$app = Factory::getApplication();
// the default for both install and update
$jversion = new JVersion();