Пример #1
0
$modversion['config'][27]['formtype'] = 'textbox';
$modversion['config'][27]['valuetype'] = 'text';
$modversion['config'][27]['default'] = '/usr/sbin/sendmail -bs';
$modversion['config'][28]['name'] = 'rss_enable';
$modversion['config'][28]['title'] = '_MI_RMC_RSSENABLE';
$modversion['config'][28]['description'] = '';
$modversion['config'][28]['formtype'] = 'yesno';
$modversion['config'][28]['valuetype'] = 'int';
$modversion['config'][28]['default'] = 1;
$modversion['config'][29]['name'] = 'blocks_enable';
$modversion['config'][29]['title'] = '_MI_RMC_BLOCKSENABLE';
$modversion['config'][29]['description'] = '';
$modversion['config'][29]['formtype'] = 'yesno';
$modversion['config'][29]['valuetype'] = 'int';
$modversion['config'][29]['default'] = 0;
$modversion['blocks'][] = array('file' => "comments.php", 'name' => __('Comments', 'rmcommon'), 'description' => __('Show comments from internal comments system', 'rmcommon'), 'show_func' => "rmc_bkcomments_show", 'edit_func' => "rmc_bkcomments_edit", 'template' => 'rmc_bk_comments.html', 'options' => "5|1|1|1|1");
$modversion['blocks'][] = array('file' => "custom.php", 'name' => __('Custom Block', 'rmcommon'), 'description' => __('Allows to create a block with custom content.', 'rmcommon'), 'show_func' => "", 'type' => 'custom');
$amod = xoops_getActiveModules();
if (in_array("rmcommon", $amod)) {
    $plugins = RMFunctions::installed_plugins();
    foreach ($plugins as $plugin) {
        $p = RMFunctions::load_plugin($plugin);
        if (!method_exists($p, 'blocks')) {
            continue;
        }
        foreach ($p->blocks() as $block) {
            $block['plugin'] = 1;
            $modversion['blocks'][] = $block;
        }
    }
}