<?php

/**
 * Installs comments into modules
 *
 * @package Comments
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
require cot_incfile('comments', 'plug', 'enablement');
// Add options into module configs
foreach ($com_modules_list as $mod_name) {
    if (cot_extension_installed($mod_name) && !cot_config_implanted($mod_name, 'comments')) {
        cot_config_implant($mod_name, $com_options, false, 'comments');
    }
}
// Add options into module structure configs
foreach ($com_modules_struct_list as $mod_name) {
    if (cot_extension_installed($mod_name) && !cot_config_implanted($mod_name, 'comments')) {
        cot_config_implant($mod_name, $com_options, true, 'comments');
    }
}
<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=admin.extensions.install.tags
[END_COT_EXT]
==================== */
/**
 * Implants missing enablement configs when a new module is installed
 *
 * @package Comments
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
require cot_incfile('comments', 'plug', 'enablement');
if ($is_module && in_array($code, $com_modules_list) && !cot_config_implanted($code, 'comments')) {
    cot_config_implant($code, $com_options, false, 'comments');
} elseif ($is_module && in_array($code, $com_modules_struct_list) && !cot_config_implanted($code, 'comments')) {
    cot_config_implant($code, $com_options, true, 'comments');
}
<?php

/* ====================
[BEGIN_COT_EXT]
Hooks=admin.extensions.install.tags
[END_COT_EXT]
==================== */
/**
 * Implants missing enablement configs when a new module is installed
 *
 * @package Ratings
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
require cot_incfile('ratings', 'plug', 'enablement');
if ($is_module && in_array($code, $rat_modules_list) && !cot_config_implanted($code, 'ratings')) {
    cot_config_implant($code, $rat_options, false, 'ratings');
} elseif ($is_module && in_array($code, $rat_modules_struct_list) && !cot_config_implanted($code, 'ratings')) {
    cot_config_implant($code, $rat_options, true, 'ratings');
}
Beispiel #4
0
<?php

/**
 * Installs ratings into modules
 *
 * @package Ratings
 * @copyright (c) Cotonti Team
 * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
 */
defined('COT_CODE') or die('Wrong URL');
require cot_incfile('ratings', 'plug', 'enablement');
// Add options into module configs
foreach ($rat_modules_list as $mod_name) {
    if (cot_extension_installed($mod_name) && !cot_config_implanted($mod_name, 'ratings')) {
        cot_config_implant($mod_name, $rat_options, false, 'ratings');
    }
}
// Add options into module structure configs
foreach ($rat_modules_struct_list as $mod_name) {
    if (cot_extension_installed($mod_name) && !cot_config_implanted($mod_name, 'ratings')) {
        cot_config_implant($mod_name, $rat_options, true, 'ratings');
    }
}