MyBB Community Forums

Full Version: How To Add The Word 'Locked' To Locked Threads, Using Template Conditionals?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

How would I add the word 'locked' to locked threads using template conditionals?

Something like: (Obviously it won't work because I don't know the right function to include)
<if $thread['locked] then>Locked</if>
Does anyone know the right function to include?

Also, where can I learn Template Conditionals, and where can I learn the functions?
<if $thread['closed'] == 1 then>Locked</if>

It requires PHP knowledge (this is not function, it's conditional btw) together with MyBB's basics such as "In which file can I find that variable?" at least.

Then also maybe MySQL and MyBB tables knowledge: For example in this case it was important because there is no 'locked' column in mybb_threads, only 'closed': But you can find that in forumdisplay.php too.
Wow, thank you so much.

And thank you again for the MyBB Tables link, that will help me a lot in the future for writing conditionals. All I know in PHP is the if,else statements Smile

Thanks once again.