Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

config_single_group_select()

Description

Generate an html single-select block for selecting from among RS user groups.

Parameters

ColumnTypeDefaultDescription
$name string the name of the select block. Usually the name of the config variable being set.
$label string the user text displayed to label the select block. Usually a $lang string.
$current array
$width integer 300 the width of the input field in pixels. Default: 300.
array integer $current the current value of the config variable being set.

Location

include/plugin_functions.php lines 891 to 910

Definition

 
function config_single_group_select($name$label$current=array(), $width=300)
    {
    global 
$lang;
?>
  <div class="Question">
    <label for=" echo $name?>" title=" echo str_replace('%cvn'$name$lang['plugins-configvar'])?>"> echo $label?></label>
    <select name=" echo $name?>" id=" echo $name?>" style="width: echo $width ?>px">

    $usergroups
=get_usergroups();
    foreach (
$usergroups as $usergroup)
        {
        echo 
'    <option value="' $usergroup['ref'] . '"' . (($usergroup['ref']==$current)?' selected':'') . '>' $usergroup['name'] . '</option>';
        }
?>
    </select>
    <div class="clearerleft"></div>
  </div>
  

    
}

This article was last updated 14th July 2020 01:05 Europe/London time based on the source file dated 2nd July 2020 09:08 Europe/London time.