Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

config_single_user_select()

Description

Generate an html single-select block for selecting one of the RS users.

The user key (i.e., the value from the "ref" column of the user table) of the selected user is the
value posted.

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 integer array the current value of the config variable being set.
$width integer 300 the width of the input field in pixels. Default: 300.

Location

include/plugin_functions.php lines 824 to 843

Definition

 
function config_single_user_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">

    $users
=get_users();
    foreach (
$users as $user)
        {
        echo 
'    <option value="' $user['ref'] . '"' . (($user['ref']==$current)?' selected':'') . '>' $user['fullname'] . ' (' $user['email'] . ')</option>';
        }
?>
    </select>
    <div class="clearerleft"></div>
  </div>
  

    
}

This article was last updated 28th November 2020 22:05 Europe/London time based on the source file dated 9th October 2020 10:20 Europe/London time.