imagex插件Undefined array key "editorUploadBtn" 修复方法
resources/views/upload.blade.php
查找
<button class="btn btn-outline-secondary ajax-progress-submit"
type="button" id="do-upload-btn">{{ $fsLang['editorUploadBtn'] }}</button>
改成
<button class="btn btn-outline-secondary ajax-progress-submit"
type="button" id="do-upload-btn">{{ $fsLang['editorUploadButton'] }}</button>
src/Controllers/WebController.php 查找 删除
$uploadInfo = json_decode(base64_decode(urldecode($request->config)), true);
$uid = $fresnsResp->getData('uid');
查找
if (empty($uid)) {
return view('ImageX::error', [
'code' => 31601,
'message' => ConfigUtility::getCodeMessage(31601, 'Fresns', $langTag),
]);
}
改成
if ($fresnsResp->isErrorResponse()) {
return view('ImageX::error', [
'code' => $fresnsResp->getCode(),
'message' => $fresnsResp->getMessage(),
]);
}
$uploadInfo = json_decode(base64_decode(urldecode($request->config)), true);
查找
$authUserId = PrimaryHelper::fresnsUserIdByUidOrUsername($uid);
改成
$authUserId = PrimaryHelper::fresnsUserIdByUidOrUsername($fresnsResp->getData('uid'));
文件 editor/edit.blade.php 查找
{{-- Anonymous --}}
@if ($config['editor']['features']['anonymous'])
@component('components.editor.section.anonymous', [
'type' => $type,
'isAnonymous' => $draft['detail']['isAnonymous'],
])@endcomponent
@endif
下面添加
{{-- comment disable and private --}}
@if ($type == 'post')
<div class="form-check">
<input class="form-check-input" type="checkbox" name="postIsCommentDisabled" value="1" id="postIsCommentDisabled" {{ $draft['detail']['isCommentDisabled'] ? 'checked' : '' }}>
<label class="form-check-label" for="postIsCommentDisabled">
{{ fs_lang('editorCommentDisable') }}
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="postIsCommentPrivate" value="1" id="postIsCommentPrivate" {{ $draft['detail']['isCommentPrivate'] ? 'checked' : '' }}>
<label class="form-check-label" for="postIsCommentPrivate">
{{ fs_lang('editorCommentPrivate') }}
</label>
</div>
@endif
{{-- Markdown --}}
<div class="form-check">
<input class="form-check-input" type="checkbox" name="isMarkdown" value="1" id="isMarkdown" {{ $draft['detail']['isMarkdown'] ? 'checked' : '' }}>
<label class="form-check-label" for="isMarkdown">Markdown</label>
</div>
https://www.fireself.cn/post/0fDtSmwd