Reputation:
Notable changes:
- Fixed reveal anonymous poster in some specific cases
Reputation:
Reputation:
Reputation:
Reputation:
Reputation:
Reputation:
Reputation:
use php 7.4 to see if the problem is solved
Reputation:
<xf:macro name="post_note" arg-post="!" arg-thread="!">
<xf:if is="$post.tap_has_anonymous AND $xf.visitor.hasNodePermission($thread.node_id, 'tap_canView')">
<div class="blockMessage blockMessage--important blockMessage--isAnonymous"><strong>{{ phrase('note:') }}</strong> {{ phrase('tap_this_is_anonymous_post') }}</div>
</xf:if>
</xf:macro>
<xf:macro name="checkbox" arg-selected="{{ false }}" arg-context="{{ null }}">
<xf:if is="$context == 'quick_reply'">
<div style="padding:6px">
<xf:checkbox>
<xf:option name="tap_is_anonymous_posting" value="1"
hint="{{ phrase('tap_posting_as_anonymous_field_explain') }}"
selected="{$selected}"
label="{{ phrase('tap_posting_as_anonymous') }}" />
</xf:checkbox>
</div>
<xf:else />
<xf:checkboxrow label="">
<xf:option name="tap_is_anonymous_posting" value="1"
hint="{{ phrase('tap_posting_as_anonymous_field_explain') }}"
selected="{$selected}"
label="{{ phrase('tap_posting_as_anonymous') }}" />
</xf:checkboxrow>
</xf:if>
</xf:macro>
Reputation:
Reputation:
/* Disable upload option in the toolbar, keep the upload via link option */
#imageUpload-1 {
display: none !important;
}
.fr-popup .fr-image-upload-layer {
display: none !important;
}
/* Disable the attachment upload button */
.js-attachButton {
display: none;
}
Reputation:
To "partialy" solve it, you can add this lines on EXTRA.LESS:
HTML:/* Disable upload option in the toolbar, keep the upload via link option */ #imageUpload-1 { display: none !important; } .fr-popup .fr-image-upload-layer { display: none !important; } /* Disable the attachment upload button */ .js-attachButton { display: none; }
NOTE: This will not prevent ppl from still uploading images via "Drag & Drop", so we still need a real solution at code lvl.
The problem(i can pay if the problem is solved sucesfully)
<xf:callback class="Truonglv\AnonymousPosting\Callback"
method="renderAnonymousPostingCheckbox"
params="{'context': $attachmentData.context}"/>
$0
<xf:callback class="Truonglv\AnonymousPosting\Callback"
method="renderAnonymousPostingCheckbox"
params="{'context': $thread}"/>
$0
<xf:callback class="Truonglv\AnonymousPosting\Callback"
method="renderAnonymousPostingCheckbox"
params="{'context': $__globals.thread}"/>
$0
Reputation:
Reputation:
<xf:macro name="body"
arg-message=""
arg-attachmentData="{{ null }}"
arg-forceHash=""
arg-messageSelector=""
arg-multiQuoteHref=""
arg-multiQuoteStorageKey=""
arg-simple="{{ false }}"
arg-submitText=""
arg-lastDate="0"
arg-lastKnownDate="0"
arg-loadExtra="{{ true }}"
arg-simpleSubmit="{{ false }}"
arg-minHeight="100"
arg-placeholder="{{ phrase('reply_placeholder') }}"
arg-deferred="{{ false }}"
arg-showGuestControls="{{ true }}"
arg-previewUrl="">
<xf:css src="message.less" />
<xf:set var="$sticky" value="{{ property('messageSticky') }}" />
<div class="message message--quickReply block-topRadiusContent block-bottomRadiusContent{{ $simple ? ' message--simple' : '' }}">
<div class="message-inner">
<div class="message-cell message-cell--user">
<div class="message-user {{ $sticky.user_info ? 'is-sticky' : '' }}">
<div class="message-avatar">
<div class="message-avatar-wrapper">
<xf:set var="$user" value="{{ $xf.visitor.user_id ? $xf.visitor : null }}" />
<xf:avatar user="$user" size="{{ $simple ? 's' : 'm' }}" defaultname="" />
</div>
</div>
<span class="message-userArrow"></span>
</div>
</div>
<div class="message-cell message-cell--main">
<div class="message-editorWrapper">
<xf:set var="$editorHtml">
<xf:macro name="editor"
arg-message="{$message}"
arg-attachmentData="{$attachmentData}"
arg-forceHash="{$forceHash}"
arg-messageSelector="{$messageSelector}"
arg-multiQuoteHref="{$multiQuoteHref}"
arg-multiQuoteStorageKey="{$multiQuoteStorageKey}"
arg-minHeight="{$minHeight}"
arg-placeholder="{$placeholder}"
arg-submitText="{$submitText}"
arg-deferred="{$deferred}"
arg-lastDate="{$lastDate}"
arg-lastKnownDate="{$lastKnownDate}"
arg-loadExtra="{$loadExtra}"
arg-simpleSubmit="{$simpleSubmit}"
arg-showGuestControls="{$showGuestControls}"
arg-previewUrl="{$previewUrl}"
/>
</xf:set>
<xf:if is="$deferred">
<div class="editorPlaceholder" data-xf-click="editor-placeholder">
<div class="editorPlaceholder-editor is-hidden">{$editorHtml|raw}</div>
<div class="editorPlaceholder-placeholder">
<div class="input"><span class="u-muted"> {$placeholder}</span></div>
</div>
</div>
<xf:else />
{$editorHtml|raw}
</xf:if>
</div>
</div>
</div>
</div>
</xf:macro>
<xf:macro name="editor"
arg-message=""
arg-attachmentData="{{ null }}"
arg-forceHash=""
arg-messageSelector=""
arg-multiQuoteHref=""
arg-multiQuoteStorageKey=""
arg-minHeight="100"
arg-placeholder=""
arg-submitText=""
arg-deferred="{{ false }}"
arg-lastDate="0"
arg-lastKnownDate="0"
arg-loadExtra="{{ true }}"
arg-simpleSubmit="{{ false }}"
arg-showGuestControls="{{ true }}"
arg-previewUrl=""
>
<xf:editor name="message"
value="{$message}"
attachments="{{ $attachmentData ? $attachmentData.attachments : [] }}"
data-min-height="{$minHeight}"
placeholder="{$placeholder}"
data-deferred="{{ $deferred ? 'on' : 'off' }}"
data-xf-key="{{ phrase('shortcut.quick_reply') }}"
data-preview-url="{$previewUrl}" />
<xf:if is="!$xf.visitor.user_id && $showGuestControls">
<xf:textboxrow name="_xfUsername" rowtype="fullWidth noGutter" data-xf-init="guest-username"
maxlength="{{ max_length($xf.visitor, 'username') }}"
label="{{ phrase('name') }}" />
</xf:if>
<xf:if is="$xf.visitor.isShownCaptcha()">
<div class="js-captchaContainer" data-row-type="fullWidth noGutter"></div>
<noscript><xf:hiddenval name="no_captcha" value="1" /></noscript>
</xf:if>
<xf:if is="$attachmentData">
<xf:macro template="helper_attach_upload" name="uploaded_files_list"
arg-attachments="{$attachmentData.attachments}"
arg-class="attachmentUploads--spaced" />
</xf:if>
<div class="formButtonGroup {{ $simpleSubmit ? 'formButtonGroup--simple' : '' }}">
<div class="formButtonGroup-primary">
<xf:button type="submit" class="button--primary" icon="reply">
{{ $submitText ?: phrase('post_reply') }}
</xf:button>
</div>
<xf:if contentcheck="true">
<div class="formButtonGroup-extra">
<xf:contentcheck>
<xf:if is="$attachmentData">
<xf:macro template="helper_attach_upload" name="upload_link_from_data"
arg-attachmentData="{$attachmentData}"
arg-forceHash="{$forceHash}" />
</xf:if>
<xf:if is="$xf.options.multiQuote && $multiQuoteHref">
<xf:macro template="multi_quote_macros" name="button"
arg-href="{$multiQuoteHref}"
arg-messageSelector="{$messageSelector}"
arg-storageKey="{$multiQuoteStorageKey}" />
</xf:if>
</xf:contentcheck>
</div>
</xf:if>
<xf:hiddenval name="last_date" autocomplete="off">{$lastDate}</xf:hiddenval>
<xf:hiddenval name="last_known_date" autocomplete="off">{$lastKnownDate}</xf:hiddenval>
<xf:hiddenval name="load_extra">{{ $loadExtra ? 1 : 0 }}</xf:hiddenval>
</div>
</xf:macro>
Reputation:
This is my quick_reply_macros tempate:
PHP:<xf:macro name="body" arg-message="" arg-attachmentData="{{ null }}" arg-forceHash="" arg-messageSelector="" arg-multiQuoteHref="" arg-multiQuoteStorageKey="" arg-simple="{{ false }}" arg-submitText="" arg-lastDate="0" arg-lastKnownDate="0" arg-loadExtra="{{ true }}" arg-simpleSubmit="{{ false }}" arg-minHeight="100" arg-placeholder="{{ phrase('reply_placeholder') }}" arg-deferred="{{ false }}" arg-showGuestControls="{{ true }}" arg-previewUrl=""> <xf:css src="message.less" /> <xf:set var="$sticky" value="{{ property('messageSticky') }}" /> <div class="message message--quickReply block-topRadiusContent block-bottomRadiusContent{{ $simple ? ' message--simple' : '' }}"> <div class="message-inner"> <div class="message-cell message-cell--user"> <div class="message-user {{ $sticky.user_info ? 'is-sticky' : '' }}"> <div class="message-avatar"> <div class="message-avatar-wrapper"> <xf:set var="$user" value="{{ $xf.visitor.user_id ? $xf.visitor : null }}" /> <xf:avatar user="$user" size="{{ $simple ? 's' : 'm' }}" defaultname="" /> </div> </div> <span class="message-userArrow"></span> </div> </div> <div class="message-cell message-cell--main"> <div class="message-editorWrapper"> <xf:set var="$editorHtml"> <xf:macro name="editor" arg-message="{$message}" arg-attachmentData="{$attachmentData}" arg-forceHash="{$forceHash}" arg-messageSelector="{$messageSelector}" arg-multiQuoteHref="{$multiQuoteHref}" arg-multiQuoteStorageKey="{$multiQuoteStorageKey}" arg-minHeight="{$minHeight}" arg-placeholder="{$placeholder}" arg-submitText="{$submitText}" arg-deferred="{$deferred}" arg-lastDate="{$lastDate}" arg-lastKnownDate="{$lastKnownDate}" arg-loadExtra="{$loadExtra}" arg-simpleSubmit="{$simpleSubmit}" arg-showGuestControls="{$showGuestControls}" arg-previewUrl="{$previewUrl}" /> </xf:set> <xf:if is="$deferred"> <div class="editorPlaceholder" data-xf-click="editor-placeholder"> <div class="editorPlaceholder-editor is-hidden">{$editorHtml|raw}</div> <div class="editorPlaceholder-placeholder"> <div class="input"><span class="u-muted"> {$placeholder}</span></div> </div> </div> <xf:else /> {$editorHtml|raw} </xf:if> </div> </div> </div> </div> </xf:macro> <xf:macro name="editor" arg-message="" arg-attachmentData="{{ null }}" arg-forceHash="" arg-messageSelector="" arg-multiQuoteHref="" arg-multiQuoteStorageKey="" arg-minHeight="100" arg-placeholder="" arg-submitText="" arg-deferred="{{ false }}" arg-lastDate="0" arg-lastKnownDate="0" arg-loadExtra="{{ true }}" arg-simpleSubmit="{{ false }}" arg-showGuestControls="{{ true }}" arg-previewUrl="" > <xf:editor name="message" value="{$message}" attachments="{{ $attachmentData ? $attachmentData.attachments : [] }}" data-min-height="{$minHeight}" placeholder="{$placeholder}" data-deferred="{{ $deferred ? 'on' : 'off' }}" data-xf-key="{{ phrase('shortcut.quick_reply') }}" data-preview-url="{$previewUrl}" /> <xf:if is="!$xf.visitor.user_id && $showGuestControls"> <xf:textboxrow name="_xfUsername" rowtype="fullWidth noGutter" data-xf-init="guest-username" maxlength="{{ max_length($xf.visitor, 'username') }}" label="{{ phrase('name') }}" /> </xf:if> <xf:if is="$xf.visitor.isShownCaptcha()"> <div class="js-captchaContainer" data-row-type="fullWidth noGutter"></div> <noscript><xf:hiddenval name="no_captcha" value="1" /></noscript> </xf:if> <xf:if is="$attachmentData"> <xf:macro template="helper_attach_upload" name="uploaded_files_list" arg-attachments="{$attachmentData.attachments}" arg-class="attachmentUploads--spaced" /> </xf:if> <div class="formButtonGroup {{ $simpleSubmit ? 'formButtonGroup--simple' : '' }}"> <div class="formButtonGroup-primary"> <xf:button type="submit" class="button--primary" icon="reply"> {{ $submitText ?: phrase('post_reply') }} </xf:button> </div> <xf:if contentcheck="true"> <div class="formButtonGroup-extra"> <xf:contentcheck> <xf:if is="$attachmentData"> <xf:macro template="helper_attach_upload" name="upload_link_from_data" arg-attachmentData="{$attachmentData}" arg-forceHash="{$forceHash}" /> </xf:if> <xf:if is="$xf.options.multiQuote && $multiQuoteHref"> <xf:macro template="multi_quote_macros" name="button" arg-href="{$multiQuoteHref}" arg-messageSelector="{$messageSelector}" arg-storageKey="{$multiQuoteStorageKey}" /> </xf:if> </xf:contentcheck> </div> </xf:if> <xf:hiddenval name="last_date" autocomplete="off">{$lastDate}</xf:hiddenval> <xf:hiddenval name="last_known_date" autocomplete="off">{$lastKnownDate}</xf:hiddenval> <xf:hiddenval name="load_extra">{{ $loadExtra ? 1 : 0 }}</xf:hiddenval> </div> </xf:macro>
Can't find that line.
Reputation:
sorry my mistake and not clear enough, it is the template modification which you need to change, the one from the addon
View attachment 37706