Mini-hack: Ability for Style Override on ANY vB-powered page
This modification is in the archives.
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:
// [START HACK='Allow Style override on Any page' AUTHOR='KuraFire' VERSION='1.00' CHANGEID= 1 ]
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:
define('OVERWRITE_STYLEID', 1);
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. Download No files for download. |