Viper007Bond
03-23-2007, 10:00 PM
I wanted to easily be able to close and open a thread after I posted via the quick reply. You can do this via the full reply page and via the dropdown at the top of the page, but not via the quick reply box. So, I wrote a little template modification to allow me to do so.
However, because this mod is only intended for moderators and admins, I left this mod simple and didn't go to the large trouble of making it change the "Reply" button to a "Closed" button or changing the checkbox text. You'll have to refresh the page in order to see those update.
See attached screenshot for an example.
To add this new feature, you'll need to edit the "SHOWTHREAD" template (it can be found in the "Show Thread Templates" group).
Find this text, about a 1/3 of the way down:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
</fieldset>
After all of that, add all of this:
<if condition="$show['openclose']">
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>Thread Management</legend>
<div style="padding:3px">
<div>
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" tabindex="1" /><if condition="$show['closethread']">Close<else />Open</if> this thread after reply post (the reply button's icon will not be updated for you)</label>
</div>
</fieldset>
</if>
However, because this mod is only intended for moderators and admins, I left this mod simple and didn't go to the large trouble of making it change the "Reply" button to a "Closed" button or changing the checkbox text. You'll have to refresh the page in order to see those update.
See attached screenshot for an example.
To add this new feature, you'll need to edit the "SHOWTHREAD" template (it can be found in the "Show Thread Templates" group).
Find this text, about a 1/3 of the way down:
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
</fieldset>
After all of that, add all of this:
<if condition="$show['openclose']">
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>Thread Management</legend>
<div style="padding:3px">
<div>
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" tabindex="1" /><if condition="$show['closethread']">Close<else />Open</if> this thread after reply post (the reply button's icon will not be updated for you)</label>
</div>
</fieldset>
</if>