Knowledge Base

Show/Hide Quick Reply Button For Subsilver2
Article ID: 1046
Written By: Rahber
Written On: Fri Oct 15, 2010 3:57 pm
Description: Adds a Button To show/hide Quick reply.
link to this article on phpbb.com: Select All
[kb=show+hide-quick-reply-button-for-subsilver2]Show/Hide Quick Reply Button For Subsilver2[/kb]
link to this article on your own board: Select All
[url=http://www.phpbb.com/kb/article/show+hide-quick-reply-button-for-subsilver2/]Knowledge Base - Show/Hide Quick Reply Button For Subsilver2[/url]

Quick Reply Show/Hide for subsilver2
This tutorial will help you add a show/hide button to show or hide the quick reply while viewing a topic.

First, open /styles/subsilver/template/overall_header.html

Find
Code: Select all
// <![CDATA[

After that, add
Code: Select all
function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }

Now open /styles/subsilver/template/quickreply_editor.html

Find
Code: Select all
<form method="post" action="{U_QR_ACTION}">

Before, add
Code: Select all
<div id="quick_reply" style="display: none;">

Find
Code: Select all
</form>

After, add
Code: Select all
</div>

Finally, open /styles/subsilver/template/viewtopic_body.html

Find (the 2nd occurance)
Code: Select all
<!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->

After, add
Code: Select all
<a href="#" class="right-box up" onclick="toggle_visibility('quick_reply');" title="Show/Hide">{REPLY_IMG}</a>


Note : I have used {REPLY_IMG}, you can replace it with any other image of your own choice.