View Full Version : How to apply a style to a single page only
lackhand
05-08-2008, 01:41 AM
Let's say I want to have the FAQ pages have a different style than the rest of my board. How would I go about doing that? I know how to make certain forums and categories have certain styles, but cannot figure out how to do the same for non-forum pages. I'm not wanting to do template edits, I am already accustomed to this and it wouldn't serve my needs. Thanks.
Kirk Y
05-08-2008, 01:56 AM
If by style you mean a separate skin, then the following should work.
Create a new plugin using hook location 'style_fetch' with the following:
if (THIS_SCRIPT == 'faq'){
$styleid = X;
}
Change X to the Style ID you'd like to use.
Shelby
05-08-2008, 02:01 AM
Thanks for that Kirk.
Wonder if it's possible to delineate it further. If FAQ ID = X, then Y.
Kirk Y
05-08-2008, 02:08 AM
Sure, just add a check using the $faqparent var.
if (THIS_SCRIPT == 'faq' AND $faqparent == X){
$styleid = Y;
}
For multiple:
if (THIS_SCRIPT == 'faq')
{
switch ($faqparent)
{
case X:
$styleid = A;
break;
case Y:
$styleid = B;
break;
case Z:
$styleid = C;
break;
}
}
lackhand
05-08-2008, 02:12 AM
If by style you mean a separate skin, then the following should work.
Create a new plugin using hook location 'style_fetch' with the following:
if (THIS_SCRIPT == 'faq'){
$styleid = X;
}
Change X to the Style ID you'd like to use.
Thanks, I'll give that a try. Seems like what I need!
Sweet! This works! Thank you!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.