add query string for avatars forcely
This commit is contained in:
parent
7004ab627c
commit
58a2e10c0a
|
|
@ -70,7 +70,6 @@ class AdminController extends Controller
|
|||
|
||||
$cache = Option::form('cache', '缓存相关配置', function($form)
|
||||
{
|
||||
$form->checkbox('avatar_query_string', '头像缓存', '为头像添加 Query String');
|
||||
$form->checkbox('auto_detect_asset_url', '资源地址', '自动判断资源文件地址')->hint('根据当前 URL 自动加载资源文件。如果出现 CDN 回源问题请关闭');
|
||||
$form->checkbox('return_200_when_notfound', 'HTTP 响应码', '请求不存在的角色时返回 200 而不是 404');
|
||||
|
||||
|
|
|
|||
|
|
@ -42,11 +42,7 @@ if (! function_exists('avatar')) {
|
|||
|
||||
function avatar(App\Models\User $user, $size)
|
||||
{
|
||||
$fname = base64_encode($user->email).".png";
|
||||
|
||||
if (Option::get('avatar_query_string') == "1") {
|
||||
$fname .= '?v='.$user->getAvatarId();
|
||||
}
|
||||
$fname = base64_encode($user->email).".png?tid=".$user->getAvatarId();
|
||||
|
||||
return url("avatar/$size/$fname");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-07-29 11:53:11
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-11-06 11:53:30
|
||||
* @Last Modified time: 2016-11-18 17:00:05
|
||||
*/
|
||||
|
||||
return [
|
||||
|
|
@ -27,7 +27,6 @@ return [
|
|||
'private_score_per_storage' => '10',
|
||||
'score_per_player' => '100',
|
||||
'sign_after_zero' => '0',
|
||||
'avatar_query_string' => '0',
|
||||
'version' => '',
|
||||
'check_update' => '1',
|
||||
'update_source' => 'nyavm',
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
</div>
|
||||
</ul>
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active box-body" id="skin-category">
|
||||
<div class="tab-pane active box-body" id="skin-category">
|
||||
@include('vendor.closet-items', ['items' => $items['skin']])
|
||||
</div>
|
||||
|
||||
<div class="chart tab-pane box-body" id="cape-category">
|
||||
<div class="tab-pane box-body" id="cape-category">
|
||||
@include('vendor.closet-items', ['items' => $items['cape']])
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
4
resources/views/vendor/closet-items.tpl
vendored
4
resources/views/vendor/closet-items.tpl
vendored
|
|
@ -9,9 +9,9 @@
|
|||
</p>
|
||||
|
||||
<a href="{{ url('skinlib/show?tid='.$item->tid) }}" title="{{ trans('user.closet.view') }}" class="more" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-share"></i></a>
|
||||
<span title="{{ trans('user.closet.more') }}" class="more" data-toggle="dropdown" aria-haspopup="true" id="share-button"><i class="fa fa-cog"></i></span>
|
||||
<span title="{{ trans('user.closet.more') }}" class="more" data-toggle="dropdown" aria-haspopup="true" id="more-button"><i class="fa fa-cog"></i></span>
|
||||
|
||||
<ul class="dropdown-menu" aria-labelledby="share-button">
|
||||
<ul class="dropup dropdown-menu" aria-labelledby="more-button">
|
||||
<li><a href="javascript:renameClosetItem({{ $item->tid }});">{{ trans('user.closet.rename.title') }}</a></li>
|
||||
<li><a href="javascript:removeFromCloset({{ $item->tid }});">{{ trans('user.closet.remove.title') }}</a></li>
|
||||
<li><a href="javascript:setAsAvatar({{ $item->tid }});">{{ trans('user.closet.set-avatar') }}</a></li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user