MyBB Community Forums

Full Version: Showing a thread is closed.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
www.smiteforums.com

As you can see, I have done a fairly large amount of modifications to the thread display and post bit. Basically, I am wanting to display a red notice at the top of the thread, similar to the notices I have on the index, just informing the user when a thread is closed.

Is this something that can be done with core edits or would I be better off using some sort of a plugin?
If you are using Template Conditionals:
<if $thread['closed'] then>Thread closed, blabla.</if>

In your forumdisplay_thread* templates. Otherwise, maybe you can use some CSS trick.
class="threadclass_{$folder}"

Then in your global.css:
*[class*="threadclass_*lock*"] {
	// dadada
}

You should probably wait for the CSS experts on the last though.
In template:

<span class="thread_closed_{$thread['closed']}">What to display if the thread is closed</span>

In global.css:

.thread_closed_0 {
display:none;
}
.thread_closed_1 {
/* Styling */
color:pink;
background:yellow;
font-weight:strong;
padding:300px;
}
Yep, there is a simple way to do it.
I just want to say, I love the simplicity of your site. I never realized how much removing most of the postbit makes everything a lot less cluttered. Smile
It looks really nice in Red too Toungue
(2013-01-22, 04:33 AM)Omar G. Wrote: [ -> ]Yep, there is a simple way to do it.

And that would be? No luck with Seabody's response, it just seems to show it on all threads.
Perhaps, then (took a peek at your source code and it wasn't displaying how I expected):

<span class="thread_closed{$thread['closed']}">What to display if the thread is closed</span>

.thread_closed {
display:none;
}
.thread_closed1 {
/* Styling */
color:pink;
background:yellow;
font-weight:strong;
padding:300px;
}
Worked perfectly, thanks for the help Seabody.
What template do you put the following in?
<span class="thread_closed{$thread['closed']}">What to display if the thread is closed</span>