Post
by PaNtheris » Tue Feb 06, 2007 4:18 pm
Ok, thanks.
At first :
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- My Quick Reply Mod -->
<script language="javascript" type="text/javascript">
function qr_show_hide() {
var id = 'qr_open';
var item = null;
if (document.getElementById) {
item = document.getElementById(id);
}
else if (document.all) {
item = document.all[id];
}
else if (document.layers) {
item = document.layers[id];
}
if (item && item.style) {
if (item.style.display == "none") {
item.style.display = "";
}
else {
item.style.display = "none";
}
}
else if (item) {
item.visibility = "show";
}
}
</script>
<!-- My Quick Reply Mod -->
I did everything with my softblue template, added this script before " / head " tag.
Second step.
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_smilies.tpl
#-----[ FIND ]------------------------------------------
#
if (opener.document.forms['post'].message.createTextRange && opener.document.forms['post'].message.caretPos) {
#-----[ BEFORE, ADD ]------------------------------------------
#
if (eval(opener.document.forms['post'].input)) {
if (opener.document.forms['post'].input.createTextRange && opener.document.forms['post'].input.caretPos) {
var caretPos = opener.document.forms['post'].input.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
opener.document.forms['post'].input.focus();
} else {
opener.document.forms['post'].input.value += text;
opener.document.forms['post'].input.focus();
}
}
else {
#
#-----[ FIND ]------------------------------------------
#
opener.document.forms['post'].message.value += text;
opener.document.forms['post'].message.focus();
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
I did everything in my template.
Next step.
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- 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}
<!-- BEGIN switch_member_functions -->
<br /><input type="checkbox" name="attach_sig" {switch_my_quick_reply.switch_member_functions.MQR_ATTACH_SIG_STATUS} />{switch_my_quick_reply.switch_member_functions.MQR_ATTACH_SIG}
<!-- END switch_member_functions -->
</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="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">
<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 -->
#
#-----[ FIND ]------------------------------------------
#
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a>
<!-- BEGIN switch_my_quick_reply -->
<a href="javascript:qr_show_hide();"><img src="{QUICK_REPLY_IMG}" border="0" alt="{L_QUICK_REPLY}" align="middle" /></a>
<!-- END switch_my_quick_reply -->
</span></td>
I did everything in my template, but intuition says to me, that there is something wrong in this tpl, because, when i do everything i can see quick reply button but i can't use it, it is only like some not working imagine or not working java script.
Every next step is done by easymod, because it is not realated with specific template.
Thank you a lot for your time.