Back to vBulletin 3.0 Add-Ons

Mini-hack: Ability for Style Override on ANY vB-powered page
Mod Version: 1.00, by KuraFire

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 9
Released: 02 Feb 2004 Last Update: Never Downloads: 1
Not Supported  

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:
// #############################################################################
 // if user can control panel, allow selection of any style (for testing purposes)
 // otherwise only allow styles that are user-selectable 
Add DIRECTLY ABOVE that:

PHP Code:
 // [START HACK='Allow Style override on Any page' AUTHOR='KuraFire' VERSION='1.00' CHANGEID= 1 ]
 
if (defined('OVERWRITE_STYLEID'))
 {
     
$styleid intval(OVERWRITE_STYLEID);
 }
 
// [END 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); 
where 1 is the styleid of the style you wish to use on that page.

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.


vblts.ru supports vBulletin®, 2022-2024