Threads by default allows a custom header for each forum and different stylesheet for each forum in 6.4 if you want. You would design a custom header for each forum you wish and save it in the format header_BOARDKEYWORD.php and place it in your includes directory. By default after you create such headers or footers you can edit them directly from the admin panel if you so choose.
Although if you want to have special headers footers based on whether they are a user or guest this might be what you where looking for though it is written for 6.2
https://www.ubbdev.com/forum/showflat.php?Cat=0&Board=beta&Number=73272&Forum=,All_Forums,&Words=custom%20header&Searchpage=1&Limit=25&Main=73272&Search=true&where=sub&Name=9439&daterange=0&newerval=&newertype=&olderval=&oldertype=&bodyprev=#Post73272