The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[REQUEST] Different "Showthread" template based on forumid
Hello all!
I am requesting something that should be rather simple, but I've not figured out how to do it. I'm wanting threads in a certain forum to look different than other forums. I've installed [profile]Firefly[/profile]'s "Change Style of First Post" hack which is doing most of what I need to be done. This hack calls a separate template "postbit_first" for all threads in the forum I specified. (note - Yes, I know this hack applies to only the first post in the thread, but I don't imagine any threads will be longer than one post, so it works) What I would like to do is call a separate showthread template based on forumid. I looked into editing FIrefly's hack to make it work myself, but I don't think I quite understand how to do it alone. |
#2
|
|||
|
|||
If I'm concious tomorrow during school I'll try making an admin CP based way of doing it, but remember the bit templates will be the same too. showthread is only the container for the bits like postbit.
|
#3
|
||||
|
||||
Rose, if you don't have a lot of different styles, what about creating a custom style for the forum and then modifying the showthread template for that style? You can force the forum to use the style and it makes life pretty darn easy.
Otherwise, it's just a matter of finding the code in showthread.php that evaluates the showthread template and putting an if clause around it. (and any of the other sub-templates if you need them different as well) Amy |
#4
|
|||
|
|||
With vB3's inheritable templates it should be reasonably easy, too, with Amy's method, although if your board has a ton of styles it'll be hell.
|
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
This is ugly, and not tested, but you can try something like:
in showthread.php find: PHP Code:
PHP Code:
if you want to do this with multiple forums, showing the same custom template, do this. PHP Code:
PHP Code:
|
#7
|
||||
|
||||
Thanks, Brad! I spent a while working on it last night until the host decided to go down - that usually means its bedtime anyway. For the purposes I need, I think Amy's idea will work grand. But I've made note of your changes so I might use them in the future, probably near future. *hehe*
Thanks again, all! If everything works right, I'll have a pretty neat hackless(ish) gallery for my members. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|