Hey Brad, thank you for your offer to help out!!
I have started to try and make changes on my own. But I am certainly missing something
I'm working locally with apache set to respond to two host names, vbsite1 and vbsite2. They point to the same files.
The following code has been added to global.php at line 269
PHP Code:
// overwrite styles for specific sites
$sitestyles = array(
'vbsite1' => 1,
'vbsite2' => 2,);
$hostname = $HTTP_SERVER_VARS['HTTP_HOST'];
if(array_key_exists($hostname, $sitestyles))
{
$styleid = $sitestyles["$hostname"];
}
That appeared to me to be the last place styleid is checked before setting up the templates. However, for some reason its not working as intended. I'm getting the Default Template for all sites, regardless.
Now I can to and do
after my if and it works. So I would think something is wrong with my if....well, I run the code segment on its own outside of vB and it echos the proper name just fine.
PHP Code:
//styletest.php
$styleid = 0;
$sitestyles = array(
'vbsite1' => 1,
'vbsite2' => 2,);
$hostname = $HTTP_SERVER_VARS['HTTP_HOST'];
if(array_key_exists($hostname, $sitestyles))
{
$styleid = $sitestyles["$hostname"];
}
echo $styleid;
That works as expected.
Thanks for your help!!