Jump to the post that solved this thread.
Solved: 9 Years, 10 Months, 3 Weeks ago Thread closed button not showing to moderators
#1
Solved: 9 Years, 10 Months, 3 Weeks ago Thumbs Down 
in 1.8 the thread closed button is no longer showing to moderators, I've only found this thread http://community.mybb.com/thread-159051.html explaining that moderators will not see it locked but members will. I know that the quick reply will show red if it's locked, but I don't want to use quick reply.

So there is no way of telling if the thread is locked or not and it's becoming annoying, I have some threads that I need to lock and unlock occasionally for my members to post in and I have to keep asking them if they are showing locked.   

So does anyone know how I could show the "Thread Closed" button to moderators like it used to be in 1.6 ?

Thank You.
Reply
#2
Solved: 9 Years, 10 Months, 3 Weeks ago
I fixed it using a template conditional, but it is a bug imo. Not sure if already reported.

In showthread new reply template I did

<if $thread['closed']==1 then>
<a href="newreply.php?tid={$tid}" class="topbutton signup float_right"><span title="{$lang->thread_closed}"><i class="fa fa-times"></i> Closed</span></a>
<else>
<a class="topbutton float_right" href="newreply.php?tid={$tid}"><i class="fa fa-plus"></i> {$lang->post_reply_img}</a>
</if>
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#3
Solved: 9 Years, 10 Months, 3 Weeks ago
(2014-12-22, 11:35 PM)Leefish Wrote: I fixed it using a template conditional, but it is a bug imo. Not sure if already reported.

In showthread new reply template I did


<if $thread['closed']==1 then>
<a href="newreply.php?tid={$tid}" class="topbutton signup float_right"><span title="{$lang->thread_closed}"><i class="fa fa-times"></i> Closed</span></a>
<else>
<a class="topbutton float_right" href="newreply.php?tid={$tid}"><i class="fa fa-plus"></i> {$lang->post_reply_img}</a>
</if>

Hello Leefish, I tried what you said but it made the button disappear. Huh

Is there a way of finding if it has been reported as a bug, because in my opinion it is a bug and needs fixing for the next upgrade.

Thank you.
Reply
#4
Solved: 9 Years, 10 Months, 3 Weeks ago
To have that code work you would need to use a template conditional - which requires a plugin. I guess it could also be done with a class (so no plugin required). Re the bugs - there is this forum and also github:

http://community.mybb.com/forum-157.html

Though it is preferred that we make a thread rather than posting direct on github, not all bugs are recorded here on the board, so it is best to check github first - then check the forum.

http://community.mybb.com/announcement-22.html

If you post the content of your showthread newreply template then I can see if I can add a class - basically make the button a different color if closed.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#5
Solved: 9 Years, 10 Months, 3 Weeks ago
(2014-12-23, 10:40 AM)Leefish Wrote: If you post the content of your showthread newreply template then I can see if I can add a class - basically make the button a different color if closed.

OK thank you.

I would be grateful if you could come up with something to change the colour to RED when closed, this is what's in showthread newreply.


<a href="newreply.php?tid={$tid}" class="button new_reply_button"><span>{$lang->new_reply}</span></a>&nbsp;
Reply
#6
Solved: 9 Years, 10 Months, 3 Weeks ago
Still not solved

Thank you.
Reply
#7
Solved: 9 Years, 10 Months, 3 Weeks ago
Sorry - I missed your reply due to Christmas. Try this:

<a href="newreply.php?tid={$tid}" class="button new_reply_button st_{$thread['closed']}"><span>{$lang->new_reply}</span></a>&nbsp;

and add a class of .st_1 in your css. Something like:

.st_1 {background-color:red;}
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#8
Solved: 9 Years, 10 Months, 3 Weeks ago
(2014-12-30, 01:37 AM)Leefish Wrote: Sorry - I missed your reply due to Christmas. Try this:


<a href="newreply.php?tid={$tid}" class="button new_reply_button st_{$thread['closed']}"><span>{$lang->new_reply}</span></a>&nbsp;

and add a class of .st_1 in your css. Something like:


.st_1 {background-color:red;}


Hello Leefish thank you for getting back to me. I changed the showthread newreply template and added the .st_1 part in global css but the button is still the same.

Have I put the css in the wrong place?

Happy New Year to yo.
Reply
#9
Solved: 9 Years, 10 Months, 3 Weeks ago
I don't know because I don't know where you put the css Smile

I would put it at the bottom of global.css

It definitely works though because I tested it.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#10
Solved: 9 Years, 10 Months, 3 Weeks ago
Sorry, yes I put this at the bottom of global.css

.st_1 {background-color:red;}


I must be doing something wrong if it's working for you, but I can't get it to change.

Thank you anyway.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)