PDA

View Full Version : Show Thread Enhancements - DRC - HeadUrz (Custom headers per forum and per thread)


Dr.CustUmz
02-23-2022, 10:00 PM
This could come in useful for a rules thread, a updates thread or any other threads you may find could use it's own custom header.

I would not recommend on a big site at the moment, I have yet to add permissions, but you could use it in a forum that only admins and mods can post new threads.

This will not use auto template edits because headers can vary on a per site basis, i could make this replace the header template entirely, and your custom code would need to include the ENTIRE header, but I know for the needs I made this I only need portion of my header replaced, since my navigation is very custom and within my header., and I feel those who will use this would know a little coding anyhow.

Sooo to make it work this is how I apply it, in header template the section I want to replace with custom templates i wrap with:
<if condition="$threadinfo[headurz]">
$threadinfo[headurz]
<else />
<if condition="$forum_header_code">
$forum_header_code
<else />
MY HEADER CODE
</if></if>

If you aren't seeing the text area when creating or editing a thread be sure to check forum manager and enable the option.

Dr.CustUmz
02-24-2022, 07:14 AM
Updated with support for per forums as well as per thread.

Explanation of how it works:
You set a custom header for a section within the forum manager.
All child forums will also get this header UNLESS you define one for them specifically for a child forum. If a thread within those forums has a custom header, it will override any previous set headers.

Modify forum headers via the forum manager, modify thread headers pretty much anywhere you edit a thread (new thread, edit 1st post, admin edit thread).

TO DO:
usergroup permissions to be able to apply custom headers.
header editor on forumdisplay pages.