Zeile 3614 | Zeile 3614 |
---|
$user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
$user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
if($user['avatar'] && !my_validate_url($user['avatar'])) { $user['avatar'] = "../{$user['avatar']}"; } if($view['view_type'] == "card") { $scaled_avatar = fetch_scaled_avatar($user, 80, 80); } else { $scaled_avatar = fetch_scaled_avatar($user, 34, 34); } if(!$user['avatar'] || (my_strpos($user['avatar'], '://') !== false && !$mybb->settings['allowremoteavatars'])) { if(my_validate_url($mybb->settings['useravatar'])) { $user['avatar'] = str_replace('{theme}', 'images', $mybb->settings['useravatar']); } else { $user['avatar'] = "../".str_replace('{theme}', 'images', $mybb->settings['useravatar']); }
| if($view['view_type'] == "card") { $max_dimensions = '80x80'; } else { $max_dimensions = '34x34';
|
}
|
}
|
$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
| $avatar = format_avatar($user['avatar'], $user['avatardimensions'], $max_dimensions);
$user['view']['avatar'] = "<img src=\"".$avatar['image']."\" alt=\"\" {$avatar['width_height']} />";
|
// Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
if($view['view_type'] == "card")
|
// Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
if($view['view_type'] == "card")
|
{
| {
|
$users .= build_user_view_card($user, $view, $i); } else
| $users .= build_user_view_card($user, $view, $i); } else
|
Zeile 3659 | Zeile 3647 |
---|
$table->construct_cell($users); $table->construct_row(); }
|
$table->construct_cell($users); $table->construct_row(); }
|
}
| }
|
if(!isset($view['table_id'])) {
| if(!isset($view['table_id'])) {
|
Zeile 3669 | Zeile 3657 |
---|
$switch_view = "<div class=\"float_right\">"; $switch_url = $view['url']; if($mybb->input['page'] > 0)
|
$switch_view = "<div class=\"float_right\">"; $switch_url = $view['url']; if($mybb->input['page'] > 0)
|
{
| {
|
$switch_url .= "&page=".$mybb->get_input('page', MyBB::INPUT_INT); } if($view['view_type'] != "card")
|
$switch_url .= "&page=".$mybb->get_input('page', MyBB::INPUT_INT); } if($view['view_type'] != "card")
|
{
| {
|
$switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>"; } else
| $switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>"; } else
|
Zeile 3708 | Zeile 3696 |
---|
$built_view .= "<div class=\"{$search_class}\" style=\"padding-bottom: 3px; margin-top: -9px; {$search_style}\">"; $built_view .= $search->generate_hidden_field('action', 'search')."\n"; if(isset($view['conditions']['username']))
|
$built_view .= "<div class=\"{$search_class}\" style=\"padding-bottom: 3px; margin-top: -9px; {$search_style}\">"; $built_view .= $search->generate_hidden_field('action', 'search')."\n"; if(isset($view['conditions']['username']))
|
{
| {
|
$default_class = ''; $value = $view['conditions']['username']; }
| $default_class = ''; $value = $view['conditions']['username']; }
|
Zeile 3824 | Zeile 3812 |
---|
* @return string */ function build_user_view_card($user, $view, &$i)
|
* @return string */ function build_user_view_card($user, $view, &$i)
|
{ global $user_view_fields;
| { global $user_view_fields;
|
++$i; if($i == 3)
| ++$i; if($i == 3)
|
Zeile 3900 | Zeile 3888 |
---|
} $card .= "</fieldset>"; return $card;
|
} $card .= "</fieldset>"; return $card;
|
}
/**
| }
/**
|
* @param array $user * @param array $view * @param DefaultTable $table
| * @param array $user * @param array $view * @param DefaultTable $table
|
Zeile 3913 | Zeile 3901 |
---|
global $user_view_fields;
foreach($view['fields'] as $field)
|
global $user_view_fields;
foreach($view['fields'] as $field)
|
{
| {
|
if(!$user_view_fields[$field]) { continue;
| if(!$user_view_fields[$field]) { continue;
|
Zeile 3923 | Zeile 3911 |
---|
if($view_field['align']) { $field_options['class'] = "align_".$view_field['align'];
|
if($view_field['align']) { $field_options['class'] = "align_".$view_field['align'];
|
}
| }
|
if($user['view'][$field]) { $value = $user['view'][$field];
| if($user['view'][$field]) { $value = $user['view'][$field];
|
Zeile 3940 | Zeile 3928 |
---|
$table->construct_cell($value, $field_options); }
|
$table->construct_cell($value, $field_options); }
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
$table->construct_row(); }
/** * @param array $user * @param int $max_width * @param int $max_height * * @return array */ function fetch_scaled_avatar($user, $max_width=80, $max_height=80) { $scaled_dimensions = array( "width" => $max_width, "height" => $max_height, );
global $mybb;
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, $max_width, $max_height); } }
return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']);
| $table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
$table->construct_row();
|
}
/**
| }
/**
|