- Improved the way the "Who's online" block is visualized when the list of
online users is truncated by to maximum user list length setting.4.4.x
parent
8e476307e8
commit
02f436b6cb
|
@ -409,12 +409,12 @@ function user_block($op = "list", $delta = 0) {
|
|||
$items[] = format_name(user_load(array("uid" => $uid->uid)));
|
||||
}
|
||||
|
||||
if (db_fetch_object($users)) {
|
||||
$items[] = "...";
|
||||
}
|
||||
|
||||
if ($items) {
|
||||
$output .= "<br /><br />";
|
||||
$output .= theme("item_list", $items, t("Online users:"));
|
||||
if(db_fetch_object($users)) {
|
||||
$output .= "<br />...";
|
||||
}
|
||||
}
|
||||
}
|
||||
$block["subject"] = t("Who's online");
|
||||
|
@ -561,7 +561,7 @@ function user_login($edit = array(), $msg = "") {
|
|||
}
|
||||
|
||||
/*
|
||||
** When possible, determine corresponding external auth source. Invoke
|
||||
** When possible, determine corresponding external auth source. Invoke
|
||||
** source, and login user if successful:
|
||||
*/
|
||||
|
||||
|
@ -576,7 +576,7 @@ function user_login($edit = array(), $msg = "") {
|
|||
}
|
||||
|
||||
/*
|
||||
** Try each external authentication source in series. Register user if
|
||||
** Try each external authentication source in series. Register user if
|
||||
** successful.
|
||||
*/
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ function user_settings() {
|
|||
// "Who's online" block settings
|
||||
$period = array(30 => format_interval(30), 60 => format_interval(60), 120 => format_interval(120), 180 => format_interval(180), 300 => format_interval(300), 600 => format_interval(600), 900 => format_interval(900), 1800 => format_interval(1800), 2700 => format_interval(2700), 3600 => format_interval(3600), 5400 => format_interval(5400), 7200 => format_interval(7200), 10800 => format_interval(10800), 21600 => format_interval(21600), 43200 => format_interval(43200), 86400 => format_interval(86400));
|
||||
$group = form_select(t("User activity"), "user_block_seconds_online", variable_get("user_block_seconds_online", 900), $period, t("Affects \"Who's online\" block. A user is considered online for this long after they have last viewed a page."));
|
||||
$group .= form_select(t("User list length"), "user_block_max_list_count", variable_get("user_block_max_list_count", 10), array("0" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "15" => "15", "20" => "20", "50" => "50", "100" => "100"), t("Affects \"Who's online\" block. Maximum number of currently online user's to display."));
|
||||
$group .= form_select(t("User list length"), "user_block_max_list_count", variable_get("user_block_max_list_count", 10), array("0" => "0", "5" => "5", "10" => "10", "15" => "15", "20" => "20", "25" => "25", "30" => "30", "40" => "40", "50" => "50", "75" => "75", "100" => "100"), t("Affects \"Who's online\" block. Maximum number of currently online user's to display."));
|
||||
$output .= form_group(t("\"Who's online\" block settings"), $group);
|
||||
|
||||
return $output;
|
||||
|
|
|
@ -409,12 +409,12 @@ function user_block($op = "list", $delta = 0) {
|
|||
$items[] = format_name(user_load(array("uid" => $uid->uid)));
|
||||
}
|
||||
|
||||
if (db_fetch_object($users)) {
|
||||
$items[] = "...";
|
||||
}
|
||||
|
||||
if ($items) {
|
||||
$output .= "<br /><br />";
|
||||
$output .= theme("item_list", $items, t("Online users:"));
|
||||
if(db_fetch_object($users)) {
|
||||
$output .= "<br />...";
|
||||
}
|
||||
}
|
||||
}
|
||||
$block["subject"] = t("Who's online");
|
||||
|
@ -561,7 +561,7 @@ function user_login($edit = array(), $msg = "") {
|
|||
}
|
||||
|
||||
/*
|
||||
** When possible, determine corresponding external auth source. Invoke
|
||||
** When possible, determine corresponding external auth source. Invoke
|
||||
** source, and login user if successful:
|
||||
*/
|
||||
|
||||
|
@ -576,7 +576,7 @@ function user_login($edit = array(), $msg = "") {
|
|||
}
|
||||
|
||||
/*
|
||||
** Try each external authentication source in series. Register user if
|
||||
** Try each external authentication source in series. Register user if
|
||||
** successful.
|
||||
*/
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ function user_settings() {
|
|||
// "Who's online" block settings
|
||||
$period = array(30 => format_interval(30), 60 => format_interval(60), 120 => format_interval(120), 180 => format_interval(180), 300 => format_interval(300), 600 => format_interval(600), 900 => format_interval(900), 1800 => format_interval(1800), 2700 => format_interval(2700), 3600 => format_interval(3600), 5400 => format_interval(5400), 7200 => format_interval(7200), 10800 => format_interval(10800), 21600 => format_interval(21600), 43200 => format_interval(43200), 86400 => format_interval(86400));
|
||||
$group = form_select(t("User activity"), "user_block_seconds_online", variable_get("user_block_seconds_online", 900), $period, t("Affects \"Who's online\" block. A user is considered online for this long after they have last viewed a page."));
|
||||
$group .= form_select(t("User list length"), "user_block_max_list_count", variable_get("user_block_max_list_count", 10), array("0" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "15" => "15", "20" => "20", "50" => "50", "100" => "100"), t("Affects \"Who's online\" block. Maximum number of currently online user's to display."));
|
||||
$group .= form_select(t("User list length"), "user_block_max_list_count", variable_get("user_block_max_list_count", 10), array("0" => "0", "5" => "5", "10" => "10", "15" => "15", "20" => "20", "25" => "25", "30" => "30", "40" => "40", "50" => "50", "75" => "75", "100" => "100"), t("Affects \"Who's online\" block. Maximum number of currently online user's to display."));
|
||||
$output .= form_group(t("\"Who's online\" block settings"), $group);
|
||||
|
||||
return $output;
|
||||
|
|
Loading…
Reference in New Issue