Page 1 of 1

Problems with Softblue template

Posted: Mon Feb 05, 2007 8:11 pm
by PaNtheris
I am experiencing problems with Softblue template. Using easymod it is difficult to install any mod, because the error occurs. For exaple i tried to install quick reply mod - error, tried to install keep unread flags - error and so on :)

Any suggestions? :)

Posted: Mon Feb 05, 2007 8:23 pm
by Thatbitextra
Don't use EasyMOD and do the edits by hand :)

Posted: Mon Feb 05, 2007 8:29 pm
by PaNtheris
I tried, but it is not easy to do all by hand.

I did everything by hand adding quick reply mod, but it still not working :)
Mod creators says it is only for subsilver template and i can not get any proper support ;)

Posted: Mon Feb 05, 2007 8:58 pm
by Arty
instead of searching for exact match, search for similar code, and instead of replacing whole block look at what's being changed and do similar changes to softblue's tpl files.

Posted: Mon Feb 05, 2007 9:36 pm
by PaNtheris
Thank you for advice, but i am not expert on html coding. So the only way to me is, to look for similar matches and to change it corretly or to ask for support.

I'll tried both :)

Posted: Mon Feb 05, 2007 9:38 pm
by Arty
Then just post here what you need to find and what you need to replace it with.

Posted: Tue Feb 06, 2007 4:18 pm
by PaNtheris
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}" />&nbsp;<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>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;<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 -->
&nbsp;&nbsp;<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.

Posted: Tue Feb 06, 2007 4:31 pm
by Arty
Add first part of code after this:

Code: Select all

	<td align="right" valign="top" nowrap="nowrap"><br /><span class="nav">{PAGINATION}</span> 
	  </td>
  </tr>
  <tr>
	<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
  </tr>
</table>
and before that code block add this:

Code: Select all

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
and after it add </table><br />

Posted: Tue Feb 06, 2007 5:11 pm
by PaNtheris
i don't know if i understood you right, my vievtopic.tpl :

<!-- END postrow -->
<tr>
<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>&nbsp;&nbsp;&nbsp;<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 -->
&nbsp;&nbsp;<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>

<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td align="right" valign="top" nowrap="nowrap"><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">

<!-- 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}" />&nbsp;<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 -->

<br />
<div class="forumlinemain">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">

Posted: Tue Feb 06, 2007 6:22 pm
by Arty
You are missing </table> after <!-- END switch_my_quick_reply -->

Posted: Tue Feb 06, 2007 7:56 pm
by PaNtheris
And that's it? everything else is allright?

Posted: Tue Feb 06, 2007 8:19 pm
by Arty
All other code looks fine

Posted: Wed Feb 07, 2007 10:33 am
by PaNtheris
At last quick reply works !!!

But..something wrong in the code and i have two new problems, made two screenshots :

Something wrong with the table i think :

http://www.prisonbreak.lt/problem.JPG

And another problem is, not so big, but some style problem on the top of the window :

http://www.prisonbreak.lt/problem2.JPG

Posted: Wed Feb 07, 2007 6:57 pm
by Arty
Looks like some table isn't closed, or columns count is incorrect in some of main tables.

Posted: Wed Feb 07, 2007 7:10 pm
by PaNtheris
But where ? can't find anything, this problems occured after i changed the code which i pasted here.