Minor improvements (#973)

This commit is contained in:
Roman Kelesidis 2023-10-14 11:27:36 +07:00 committed by GitHub
commit 9b513714ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -787,7 +787,7 @@ function wbr($text, $max_word_length = HTML_WBR_LENGTH)
return preg_replace("/([\w\->;:.,~!?(){}@#$%^*\/\\\\]{" . $max_word_length . "})/ui", '$1<wbr>', $text); return preg_replace("/([\w\->;:.,~!?(){}@#$%^*\/\\\\]{" . $max_word_length . "})/ui", '$1<wbr>', $text);
} }
function generate_user_info($row, bool $group_mod = false): array function generate_user_info($row, bool $have_auth = IS_ADMIN): array
{ {
global $userdata, $lang, $images, $bb_cfg; global $userdata, $lang, $images, $bb_cfg;
@ -798,7 +798,7 @@ function generate_user_info($row, bool $group_mod = false): array
$pm = $bb_cfg['text_buttons'] ? '<a class="txtb" href="' . (PM_URL . "?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $lang['SEND_PM_TXTB'] . '</a>' : '<a href="' . (PM_URL . "?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>'; $pm = $bb_cfg['text_buttons'] ? '<a class="txtb" href="' . (PM_URL . "?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $lang['SEND_PM_TXTB'] . '</a>' : '<a href="' . (PM_URL . "?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['SEND_PRIVATE_MESSAGE'] . '" title="' . $lang['SEND_PRIVATE_MESSAGE'] . '" border="0" /></a>';
$avatar = get_avatar($row['user_id'], $row['avatar_ext_id'], !bf($row['user_opt'], 'user_opt', 'dis_avatar'), 50, 50); $avatar = get_avatar($row['user_id'], $row['avatar_ext_id'], !bf($row['user_opt'], 'user_opt', 'dis_avatar'), 50, 50);
if (bf($row['user_opt'], 'user_opt', 'user_viewemail') || $group_mod || ($row['user_id'] == $userdata['user_id'])) { if (bf($row['user_opt'], 'user_opt', 'user_viewemail') || $have_auth || ($row['user_id'] == $userdata['user_id'])) {
$email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&amp;" . POST_USERS_URL . "=" . $row['user_id']) : 'mailto:' . $row['user_email']; $email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&amp;" . POST_USERS_URL . "=" . $row['user_id']) : 'mailto:' . $row['user_email'];
$email = '<a class="editable" href="' . $email_uri . '">' . $row['user_email'] . '</a>'; $email = '<a class="editable" href="' . $email_uri . '">' . $row['user_email'] . '</a>';
} else { } else {

View file

@ -24,7 +24,7 @@
<th class="{sorter: 'digit'}" ><b class="tbs-text">#</b></th> <th class="{sorter: 'digit'}" ><b class="tbs-text">#</b></th>
<th class="{sorter: 'text'}" ><b class="tbs-text">{L_USERNAME}</b></th> <th class="{sorter: 'text'}" ><b class="tbs-text">{L_USERNAME}</b></th>
<th class="{sorter: false}" ><b class="tbs-text">{L_PM}</b></th> <th class="{sorter: false}" ><b class="tbs-text">{L_PM}</b></th>
<!-- IF IS_ADMIN --><th class="{sorter: 'text'}" ><b class="tbs-text">{L_EMAIL}</b></th><!-- ENDIF --> <th class="{sorter: 'text'}" ><b class="tbs-text">{L_EMAIL}</b></th>
<th class="{sorter: 'text'}" ><b class="tbs-text">{L_LOCATION}</b></th> <th class="{sorter: 'text'}" ><b class="tbs-text">{L_LOCATION}</b></th>
<th class="{sorter: 'digit'}" ><b class="tbs-text">{L_JOINED}</b></th> <th class="{sorter: 'digit'}" ><b class="tbs-text">{L_JOINED}</b></th>
<th class="{sorter: 'digit'}" ><b class="tbs-text">{L_POSTS_SHORT}</b></th> <th class="{sorter: 'digit'}" ><b class="tbs-text">{L_POSTS_SHORT}</b></th>
@ -41,7 +41,7 @@
<td>{memberrow.ROW_NUMBER}</td> <td>{memberrow.ROW_NUMBER}</td>
<td><div>{memberrow.AVATAR}</div><b>{memberrow.USER}</b></td> <td><div>{memberrow.AVATAR}</div><b>{memberrow.USER}</b></td>
<td>{memberrow.PM}</td> <td>{memberrow.PM}</td>
<!-- IF IS_ADMIN --><td>{memberrow.EMAIL}</td><!-- ENDIF --> <td>{memberrow.EMAIL}</td>
<td>{memberrow.FROM}</td> <td>{memberrow.FROM}</td>
<td class="small"> <td class="small">
<u>{memberrow.JOINED_RAW}</u> <u>{memberrow.JOINED_RAW}</u>