![]() |
Mini-hack: Ability for Style Override on ANY vB-powered page
Searching around, I couldn't find a way to get any page that wasn't a thread/forum based page to have a style override. So what happens then if you have, for instance, a fixed width layout and a liquid layout but you want the FAQ to always be fixed width, regardless of the user's chosen style, and the Memberlist to always be liquid?
Well, here's how to make that possible. It's really simple, open up ./global.php and find this code (line 265 unhacked RC3): PHP Code:
PHP Code:
Now, if you wish for a certain style to override on a certain page, use this in that page's .php file above the require_once('./global.php'); line: PHP Code:
That's all. Now you can enforce any style on any page, regardless of usersetting. Works on non-vB pages too, as long as you're using the vB engine for the templates of your page. :) |
nice work kura :)
|
it's so simple I'm amazed that this wasn't actually possible in vB3 itself already.. :D
|
nice and easy
|
psst, you forgot handy ;)
|
Nice, easy, handy AND well done! ;)
|
Hehe, thanks, glad you like :)
|
Mind if I post it in my how-to area giving you full credit? ;)
|
not at all, but if other people are gonna implement it on their boards, they ought to hit that Install button over there ;)
|
LOL I don't have an install button. Never figured out how to set it up like they did here. ;)
|
All times are GMT. The time now is 07:33 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|