Jump to content

order form q


Adamski

Recommended Posts

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..

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated