1
Tuscany
2 URL's, 1 content, 2 different themes - is that possible?
  • 2006/12/7 11:41

  • Tuscany

  • Just popping in

  • Posts: 56

  • Since: 2005/4/19


Hi!

I really need a solution to set the theme of my website depending on the initial URL

example:

2 Domainnames "www.blue.com" and "www.green.com" refer to one xoops-website. now I want the "blue_theme" set when the visitor goes to the site by using the "www.blue.com" url, and the "green_theme" when the users access the site by using the "www.green.com" url.

I am no coder - so I badly need the help of one you - experienced users (developers) of xoops

Please help me!

Thanks

Tus

2
Lance_
Re: 2 URLs, 1 content, 2 different themes - is that possible?
  • 2006/12/7 13:13

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Create a theme.html file with the following code:
le="color: #000000"><?php <{php}> $siteurl = $_SERVER['HTTP_HOST']; $siteurl = str_replace("www.","",$siteurl); $siteurl = str_replace(".com","",$siteurl); $siteurl = str_replace(".net","",$siteurl); $siteurl = str_replace(".org","",$siteurl); if ($siteurl == 'site1') { $theme='theme1'; } else { $theme='theme2'; } $this->assign('themename', $theme.'/theme.html'); $this->assign('xoops_theme', $theme); $this->assign('xoops_themecss', XOOPS_URL.'/themes/'.$theme.'/style.css'); $this->assign('xoops_imageurl', XOOPS_URL.'/themes/'.$theme.'/'); <{/php}> <{include file="$themename"}>


Put this file in a folder caleed multi-theme in the themes folder, and set this "multi-theme" as the default theme for the site.

Cheers.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

3
Tuscany
Re: 2 URLs, 1 content, 2 different themes - is that possible?
  • 2006/12/7 14:47

  • Tuscany

  • Just popping in

  • Posts: 56

  • Since: 2005/4/19


Thank You so much!

I will try that on the weekend, because I have to leave home now (sh...)

But I am sure it will work

Thanks again

Tus

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!