MyBB Community Forums

Full Version: Disable "CLOSED" button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, When a topic is closed, How do I make it a simple CLOSED button. I mean, Members click on it, It shows them following message:

You cannot post replies in this thread because it has been closed by a moderator.

But I wan't to make it unclickable. Means, Members cant click on it. Basically, It just shows them an image which is non-clickable.
Remove <a class="cssbutton" href="newreply.php?tid={$tid}" title="{$lang->thread_closed}"> or something similar and </a> from showthread_newreply_closed template.
(2013-11-01, 03:56 PM)Destroy666 Wrote: [ -> ]Remove <a class="cssbutton" href="newreply.php?tid={$tid}" title="{$lang->thread_closed}"> or something similar and </a> from showthread_newreply_closed template.

This is what i found in showthread_newreply_closed

<a href="newreply.php?tid={$tid}"><img src="{$theme['imglangdir']}/closed.gif" alt="{$lang->thread_closed}" title="{$lang->thread_closed}" /></a>&nbsp;
^ you can change it to below code
<img src="{$theme['imglangdir']}/closed.gif" alt="{$lang->thread_closed}" title="{$lang->thread_closed}" />&nbsp; 
Yes you can remove as .m. says and it shows only an image withour a reference to find, that's what you want, if you put url for this task, then you see this message, but if you wanna click on a single image do nothing xD.
Thanks. But it has taken my power to post too!
Even admins or mods can't post to locked topics.
1 more thing
When we drag mouse on that button, It shows: Thread Closed
I wan't to show : Thread Locked!
^ template conditionals plugin is required for such modifications.

you can use conditionals code like below (assuming that user groups IDs are not changed)
<if in_array($mybb->usergroup['gid'], array('3', '4', '6')) then>
<a href="newreply.php?tid={$tid}"><img src="{$theme['imglangdir']}/closed.gif" alt="{$lang->thread_closed}" title="{$lang->thread_closed}" /></a>&nbsp; 
<else>
<img src="{$theme['imglangdir']}/closed.gif" alt="Thread Locked" title="Thread Locked" />&nbsp; 
</if>