我也有這個問題出現,我剛裝上了 My Quick Reply 1.0.4 沒有問題,只是在快速回覆內打人文字按送出卻出現[sell] 打入文字[/sell] <---這個付費code,其他都一切正常。因爲你的兩個JS函數重名了,所以造成只有一個有效,你貼的viewtopic_body.tpl裏面有這2個:
但再裝上這個 Message too short 並引用了倉木麻衣大大的方法去修改
,再在快速回覆內打入文字(無論多少字數)都會出現[發表文章必須要有文章內容]<---這表示快速回覆失效嗎?#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>
#
#-----[ AFTER ADD ]------------------------------------------
#
// Here you can change 5 to the minimum amount
// of characters in a post you want.
<script language="JavaScript" type="text/javascript">
function checkForm()
{
var formErrors;
if (document.quick_reply.message.value.length < 5) {
formErrors = "{L_MESSAGE_TOO_SHORT}";
}
if (formErrors)
{
alert(formErrors);
return false;
}
else
return true;
}
</script>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
爬文後知道可能是這兩個JS函數重名了,所以其中一個會失效。但試著自己去修改,但都不能做好,希望大大們可以幫我看看怎樣將這兩個JS函數結合吧﹗先謝謝哦﹗
這兩個JS函數是這樣的:
代碼: 選擇全部
<!-- BEGIN switch_my_quick_reply -->
<script type="text/javascript">
function checkForm() {
formErrors = false;
document.post.message.value = '';
if (document.post.input.value.length < 2) {
formErrors = '{MQR_EMPTY_MESSAGE}';
}
if (formErrors) {
alert(formErrors);
return false;
} else {
if (document.post.quick_quote.checked) {
document.post.message.value = document.post.last_msg.value;
}
document.post.message.value += document.post.input.value;
return true;
}
}
</script>
<form action="{MQR_FORM_ACTION}" method="post" name="post" onsubmit="return checkForm()">
<tbody id="qr_open" style="display:none; position:relative;">
<tr>
<th class="thLeft" height="26" nowrap="nowrap" width="150">{MQR_LANG_OPTIONS}</th>
<th class="thRight" nowrap="nowrap">{MQR_LANG_QUICK_REPLY}</th>
</tr>
<tr>
<td class="row1 gensmall" align="left" valign="middle" width="150">
<a href="{MQR_SMILIES_URL}" onclick="window.open('{MQR_SMILIES_URL}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies">{MQR_LANG_SHOW_SMILIES}</a><br /><br />
<input type="checkbox" name="quick_quote" />{MQR_QUOTE_LAST_POST}<br />
<input type="checkbox" name="attach_sig" checked="checked" />{MQR_ATTACH_SIG}<br />
<!-- BEGIN switch_unlock_checkbox -->
<input type="checkbox" name="unlock" />{MQR_LANG_UNLOCK_TOPIC}<br />
<!-- END switch_unlock_checkbox -->
<!-- BEGIN switch_lock_checkbox -->
<input type="checkbox" name="lock" />{MQR_LANG_LOCK_TOPIC}<br />
<!-- END switch_lock_checkbox -->
</td>
<input type="hidden" name="mode" value="reply" />
<input type="hidden" name="sid" value="{MQR_SESSION_ID}" />
<input type="hidden" name="t" value="{MQR_TOPIC_ID}" />
<input type="hidden" name="message" value="" />
<input type="hidden" name="notify" value="{MQR_NOTIFY_USER}" />
<input type="hidden" name="last_msg" value='{MQR_LAST_MSG}' />
<td class="row1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row1" valign="top">
<span class="gensmall"><b>{MQR_SUBJECT}:</b></span><br />
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" class="post" value="{SUBJECT}" />
<textarea name="input" cols="70" rows="7" wrap="virtual" style="width:100%" class="post"></textarea>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td>
<input type="submit" name="preview" class="liteoption" value="{MQR_LANG_PREVIEW}" /> <input type="submit" name="post" class="mainoption" value="{MQR_LANG_SUBMIT}" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</form>
<!-- END switch_my_quick_reply -->
代碼: 選擇全部
<script language="JavaScript" type="text/javascript">
function checkForm()
{
var formErrors;
if (document.quick_reply.message.value.length < 6) {
formErrors = "{L_MESSAGE_TOO_SHORT}";
}
if (formErrors)
{
alert(formErrors);
return false;
}
else
return true;
}
</script>

