<?php
function b_legacyRender_themes_show($options)
{
    global $xoopsConfig;
    $theme_options = array();
    foreach ($xoopsConfig['theme_set_allowed'] as $theme) {
        $theme_option['name'] = $theme;
        if ($theme == $xoopsConfig['theme_set']) {
            $theme_option['selected'] = 'selected="selected"';
        } else {
            $theme_option['selected'] = '';
        }
        $theme_options[] = $theme_option;
    }
    $block = array();
    $block['count'] = count($xoopsConfig['theme_set_allowed']);
    $block['mode'] = $options[0];
    $block['width'] = $options[1];
    $block['theme_options'] = $theme_options;
    return $block;
}

function b_legacyRender_themes_edit($options)
{

    $chk = "";
    $form = _MB_LEGACYRENDER_THSHOW."&nbsp;";
    if ( $options[0] == 1 ) {
        $chk = ' checked="checked"';
    }
    $form .= '<input type="radio" name="options[0]" value="1"'.$chk.' />&nbsp;'._YES;
    $chk = "";
    if ( $options[0] == 0 ) {
        $chk = ' checked="checked"';
    }
    $form .= '&nbsp;<input type="radio" name="options[0]" value="0"'.$chk.' />'._NO;
    $form .= '<br />'._MB_LEGACYRENDER_THWIDTH.'&nbsp;';
    $form .= '<input type="text" name="options[1]" value="'.$options[1].'" />';
    return $form;
}
?>
