PDA

View Full Version : Show Thread Enhancements - Remove Staff Reply (Closed Threads)


AdamDV
05-14-2012, 10:00 PM
Description
This modification will be able to stop anyone from being able to reply to closed threads, including staff. I will also post the additional code needed to add on if you are wanting to only disable it for certain staff user groups.

Info:
Products to Add: 1
Hooks to Edit: 1 (only if you are disabling for certain staff user groups)
Templates to Edit: 2

Install:
1. Import Product via Manage Product. ACP >> Plugins & Products >> Manage Products >> [Add/Import Product]
2. Click Mark as Installed
3. Go to edit your Postbit/Postbit_Legacy and search for:
<if condition="$post['replylink']">
Before this code you need to add:
<if condition="$show['closethread']">
Now search for:
<img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
And add after that:
</if>
4. Click Save
5. Go to edit the SHOWTHREAD template, and search for:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
And replace it with:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /></a><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></td>
Now search for:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$LASTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
And replace it with:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$LASTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /></a><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></td>


Note: The next part is only for if you are going to disable it for certain usergroups.

1. Open the following hook ready to edit. ACP >> Plugins & Products >> Plugins >> Remove Quick Reply For Staff (Closed Threads)
2. At the beginning add:
if (is_member_of($vbulletin->userinfo, 5, 6, 7))
3. Edit the 5, 6, 7 with the staff usergroup ID's that you do not want to be able to reply.

Modification originally created for the members at http://dirvine.com

Enjoy :D