Log in

View Full Version : Changing $vbulletin->options on the fly


dfc005
04-06-2008, 04:20 AM
Hi,

I want to be able to change $vbulletin->options['bbtitle'] and $vbulletin->options['bburl'] on the fly based on the current domain.

Where are they initially set? Would I be able to set them in a global_start hook?

--------------- Added 1207460812 at 1207460812 ---------------

Actually, no worries. Did it fine with global start.

--------------- Added 1207461726 at 1207461726 ---------------

If anyone else needs or wants to do something like this, here's how I did it.


if(strpos($_SERVER["HTTP_HOST"],'site2') > 0) {
$vbulletin->options['bbtitle'] = "Site2";
$vbulletin->options['bburl'] = "http://".$_SERVER["HTTP_HOST"];
} else if(strpos($_SERVER["HTTP_HOST"],'site3') > 0) {
$vbulletin->options['bbtitle'] = "Site3";
$vbulletin->options['bburl'] = "http://".$_SERVER["HTTP_HOST"];
} else if(strpos($_SERVER["HTTP_HOST"],'site4') > 0) {
$vbulletin->options['bbtitle'] = "Site4";
$vbulletin->options['bburl'] = "http://".$_SERVER["HTTP_HOST"];
} else {
// Will just show the default you listed in vBulletin options
}