add class to medal after username

This commit is contained in:
xiaomlove
2022-08-25 01:39:47 +08:00
parent 4572d0e689
commit 6f8e68ad22
4 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -3666,6 +3666,7 @@ function get_username($id, $big = false, $link = true, $bold = true, $target = f
$disabledpic = "disabledbig";
$marginLeft = '4pt';
$medalSize = '16px';
$medalClass = 'nexus-username-medal-big';
$style = "style='margin-left: $marginLeft'";
}
else
@@ -3676,6 +3677,7 @@ function get_username($id, $big = false, $link = true, $bold = true, $target = f
$disabledpic = "disabled";
$marginLeft = '2pt';
$medalSize = '11px';
$medalClass = 'nexus-username-medal';
$style = "style='margin-left: $marginLeft'";
}
$pics = $arr["donor"] == "yes" && ($arr['donoruntil'] === null || $arr['donoruntil'] < '1970' || $arr['donoruntil'] >= date('Y-m-d H:i:s')) ? "<img class=\"".$donorpic."\" src=\"/pic/trans.gif\" alt=\"Donor\" ".$style." />" : "";
@@ -3711,8 +3713,8 @@ function get_username($id, $big = false, $link = true, $bold = true, $target = f
$medalHtml = '';
foreach ($arr['wearing_medals'] as $medal) {
$medalHtml .= sprintf(
'<img src="%s" title="%s" class="preview" style="max-height: %s;max-width: %s;margin-left: %s"/>',
$medal['image_large'], $medal['name'], $medalSize, $medalSize, $marginLeft
'<img src="%s" title="%s" class="%s preview" style="max-height: %s;max-width: %s;margin-left: %s"/>',
$medal['image_large'], $medal['name'], $medalClass, $medalSize, $medalSize, $marginLeft
);
}
+1 -1
View File
@@ -696,7 +696,7 @@ $lang_settings = array
'row_login_type' => '登录方式',
'text_login_type_normal' => '正常',
'text_login_type_secret' => '秘密',
'text_login_type_warning' => '当游客访问方式不为正常时,必须使用秘密登录才能登录',
'text_login_type_warning' => '三者只生效其中之一',
'row_login_secret' => '登录密钥',
'text_login_secret_current' => '当前密钥',
'text_login_url_with_secret' => '秘密登录链接',
+1 -1
View File
@@ -696,7 +696,7 @@ $lang_settings = array
'row_login_type' => '登錄方式',
'text_login_type_normal' => '正常',
'text_login_type_secret' => '秘密',
'text_login_type_warning' => '當遊客訪問方式不為正常時,必須使用秘密登錄才能登錄',
'text_login_type_warning' => '三者只生效其中之一',
'row_login_secret' => '登錄密鑰',
'text_login_secret_current' => '當前密鑰',
'text_login_url_with_secret' => '秘密登錄鏈接',
+1 -1
View File
@@ -696,7 +696,7 @@ $lang_settings = array
'row_login_type' => 'Login type',
'text_login_type_normal' => 'Normal',
'text_login_type_secret' => 'Secret',
'text_login_type_warning' => "When 'Guest visit' != Normal, user can only login through the 'Secret' way",
'text_login_type_warning' => "Only one of the three is in effect",
'row_login_secret' => 'Login secret',
'text_login_secret_current' => 'Current secret',
'text_login_url_with_secret' => 'Secret login URL',