skshost Posted March 5, 2007 Share Posted March 5, 2007 It's not working outside of WHMcs either. php.net should have answers, or at least another similar solution. Edit: Someone was having a similar issue with Gallery2: http://gallery.menalto.com/node/49802 The solution they came up with isn't ideal. But it works if you just need to change a few images & the style sheet. I know there's a way to pass your domain to if else.. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 5, 2007 Share Posted March 5, 2007 Smarty goes something like this(not quite sure): ['smarty']->assign(array('this_domain'=.$_SERVER['HTTP_HOST'])); Then of course the IF and Else you've always wanted to work. {php} {if $this_domain == "domain.co.uk"} {/php} If you can get the smary syntax in there right this should work. Then again, I've said that before. lol 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted March 5, 2007 Author Share Posted March 5, 2007 ahh intersesting - I'll give it a shot 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted March 5, 2007 Author Share Posted March 5, 2007 okay I think that the correct smarty would be: {php} $smarty->assign('domain',$_SERVER['HTTP_HOST']); {/php} {if $domain eq "domain.co.uk"} with help from here. Not working but I think this is right? Ad 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 5, 2007 Share Posted March 5, 2007 I think you have to assign variable somewhere else(in smarty) maybe a different file. I'm not the best with smarty though. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 8, 2007 Share Posted March 8, 2007 Got this to work: {php} $this_domain = $_SERVER['HTTP_HOST']; if ( $this_domain == 'yourdomain1.com' ) { echo "HTML 4 your first domain's theme"; } else { echo "HTML 4 your second domain's theme"; } {/php} It's 'yourdomain1.com' instead of yourdomain1.com. LOL May have some issue with http://www., but that's another can of worms. 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted March 8, 2007 Author Share Posted March 8, 2007 cool I'll give it a shot later! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.