| Current Path : /home/digilove/www/41423/ |
| Current File : /home/digilove/www/41423/advancedmodules.php.tar |
home/digilove/public_html/plugins/system/advancedmodules/advancedmodules.php 0000644 00000007111 15234455646 0023630 0 ustar 00 <?php
/**
* @package Advanced Module Manager
* @version 9.8.0PRO
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2023 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Extension as RL_Extension;
use RegularLabs\Library\Protect as RL_Protect;
use RegularLabs\Library\RegEx as RL_RegEx;
use RegularLabs\Library\SystemPlugin as RL_SystemPlugin;
use RegularLabs\Plugin\System\AdvancedModules\Document;
use RegularLabs\Plugin\System\AdvancedModules\ModuleHelper;
use RegularLabs\Plugin\System\AdvancedModules\Params;
// Do not instantiate plugin on install pages
// to prevent installation/update breaking because of potential breaking changes
$input = JFactory::getApplication()->input;
if (in_array($input->get('option'), ['com_installer', 'com_regularlabsmanager']) && $input->get('action') != '')
{
return;
}
require_once __DIR__ . '/vendor/autoload.php';
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')
|| ! is_file(JPATH_LIBRARIES . '/regularlabs/src/SystemPlugin.php')
)
{
JFactory::getLanguage()->load('plg_system_advancedmodules', __DIR__);
JFactory::getApplication()->enqueueMessage(
JText::sprintf('AMM_EXTENSION_CAN_NOT_FUNCTION', JText::_('ADVANCEDMODULEMANAGER'))
. ' ' . JText::_('AMM_REGULAR_LABS_LIBRARY_NOT_INSTALLED'),
'error'
);
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
if ( ! RL_Document::isJoomlaVersion(3, 'ADVANCEDMODULEMANAGER'))
{
RL_Extension::disable('advancedmodules', 'plugin');
RL_Document::adminError(
JText::sprintf('RL_PLUGIN_HAS_BEEN_DISABLED', JText::_('ADVANCEDMODULEMANAGER'))
);
return;
}
if (true)
{
class PlgSystemAdvancedModules extends RL_SystemPlugin
{
public $_title = 'ADVANCEDMODULEMANAGER';
public $_lang_prefix = 'AMM';
public $_page_types = ['html'];
public $_enable_in_admin = true;
public $_jversion = 3;
protected function extraChecks()
{
if ( ! RL_Protect::isComponentInstalled('advancedmodules'))
{
return false;
}
return true;
//return parent::extraChecks();
}
protected function handleOnAfterInitialise()
{
if (Params::get()->initialise_event != 'onAfterRoute')
{
$this->initialise();
}
}
protected function handleOnAfterRoute()
{
if ( ! $this->_is_admin)
{
Document::loadFrontEditScript();
}
if (Params::get()->initialise_event == 'onAfterRoute')
{
$this->initialise();
}
}
private function initialise()
{
if ($this->_is_admin)
{
return;
}
ModuleHelper::registerEvents();
}
protected function changeFinalHtmlOutput(&$html)
{
Document::replaceLinks($html);
return true;
}
protected function cleanFinalHtmlOutput(&$html)
{
if ($this->_is_admin)
{
return;
}
$html = RL_RegEx::replace(Params::getRegex(true), '', $html);
}
}
}
home/digilove/public_html/plugins/actionlog/advancedmodules/advancedmodules.php 0000644 00000002521 15234470167 0024256 0 ustar 00 <?php
/**
* @package Advanced Module Manager
* @version 9.8.0PRO
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2023 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
use RegularLabs\Library\ActionLogPlugin as RL_ActionLogPlugin;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Extension as RL_Extension;
defined('_JEXEC') or die;
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')
|| ! is_file(JPATH_LIBRARIES . '/regularlabs/src/ActionLogPlugin.php')
)
{
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
if ( ! RL_Document::isJoomlaVersion(3))
{
RL_Extension::disable('advancedmodules', 'plugin', 'actionlog');
return;
}
if (true)
{
class PlgActionlogAdvancedModules extends RL_ActionLogPlugin
{
public $name = 'ADVANCEDMODULEMANAGER';
public $alias = 'advancedmodules';
public function __construct(&$subject, array $config = [])
{
parent::__construct($subject, $config);
$this->items = [
'module' => (object) [
'title' => 'PLG_ACTIONLOG_JOOMLA_TYPE_MODULE',
],
];
}
}
}
home/digilove/public_html/components/com_advancedmodules/advancedmodules.php 0000644 00000005436 15234606047 0023647 0 ustar 00 <?php
/**
* @package Advanced Module Manager
* @version 9.8.0PRO
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2023 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\NotAllowed as JAccessExceptionNotallowed;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\MVC\Controller\BaseController as JController;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Language as RL_Language;
$app = JFactory::getApplication();
$user = JFactory::getApplication()->getIdentity() ?: JFactory::getUser();
$allow_edit = $user->authorise('module.edit.frontend', 'com_modules');
$allow_edit_module = $app->input->get('id') ? $user->authorise('module.edit.frontend', 'com_modules.module.' . $app->input->get('id')) : true;
if ( ! $allow_edit && ! $allow_edit_module)
{
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}
JFactory::getLanguage()->load('com_modules', JPATH_ADMINISTRATOR);
JFactory::getLanguage()->load('com_advancedmodules', JPATH_ADMINISTRATOR . '/components/com_advancedmodules');
jimport('joomla.filesystem.file');
// return if Regular Labs Library plugin is not installed
if (
! is_file(JPATH_PLUGINS . '/system/regularlabs/regularlabs.xml')
|| ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')
)
{
$msg = JText::_('AMM_REGULAR_LABS_LIBRARY_NOT_INSTALLED')
. ' ' . JText::sprintf('AMM_EXTENSION_CAN_NOT_FUNCTION', JText::_('COM_ADVANCEDMODULES'));
JFactory::getApplication()->enqueueMessage($msg, 'error');
return;
}
// give notice if Regular Labs Library plugin is not enabled
if ( ! JPluginHelper::isEnabled('system', 'regularlabs'))
{
$msg = JText::_('AMM_REGULAR_LABS_LIBRARY_NOT_ENABLED')
. ' ' . JText::sprintf('AMM_EXTENSION_CAN_NOT_FUNCTION', JText::_('COM_ADVANCEDMODULES'));
JFactory::getApplication()->enqueueMessage($msg, 'notice');
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
if ( ! RL_Document::isJoomlaVersion(3, 'COM_ADVANCEDMODULES'))
{
return;
}
RL_Language::load('plg_system_regularlabs');
// Load admin main core language strings
RL_Language::load('', JPATH_ADMINISTRATOR);
// Tell the browser not to cache this page.
$app->setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true);
$config = [];
if ($app->input->get('task') === 'module.orderPosition')
{
$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
}
$controller = JController::getInstance('AdvancedModules', $config);
$controller->execute($app->input->get('task'));
$controller->redirect();