1
Lance_
sitename variable change
  • 2006/11/3 20:36

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Hey,

Background info: doing a simple multisite.

I have the theme changing depending on the url being called.
The next step is to have the sitename change depending on the site being called.

1. Is it possible to have the variable sitename changed at the theme portion so that the correct name appears in modules? example in newbb "Welcome to [sitename] forum" or other modules that use the sitename from the DB config.

2. Would you suggest a different easier way of doing it?

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

2
Lance_
Re: sitename variable change
  • 2006/11/4 16:19

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


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

3
PnViking
Re: sitename variable change
  • 2006/11/5 20:31

  • PnViking

  • Just popping in

  • Posts: 9

  • Since: 2004/1/31


In mainfile.php:

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'https://xoops.org');
define('XOOPS_URL', 'http://' . $_SERVER["SERVER_NAME"]);

This will make any hostname the hostname...

/Niklas

4
Lance_
Re: sitename variable change
  • 2006/11/6 15:00

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Thanks for the try, but not what I'm looking for.


In essence, how can I change the $xoopsConfig['sitename'] value?

Can it be done at the theme level or must it be done before?

Pretty please...


Edit/ Before someone answers in Admin-Preferences...note that I want to specify a different sitename depending on the url you use to access the site.

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

5
Arowana
Re: sitename variable change
  • 2006/11/6 16:00

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


Dont know if this is what you are looking for or not.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=46590&viewmode=flat&order=ASC&start=0
Arowana

6
Lance_
Re: sitename variable change
  • 2006/11/6 19:38

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Really want to keep it to the simplest level yet, as far as multisiting is concerned. Since All I want to do is change the theme and a couple other text from the bas config without having to hack too many files.

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

7
Lance_
Re: sitename variable change
  • 2006/11/7 19:57

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Aight,

Placed my if--else structure in the header.php file.

So with the multi-theme code and the hacked header.php I now have two sites exactly the same but with only different themes and names based on the url.

I'm fairly unlucky at getting my answers through the forums(about 10% of the time). Or my questions are just too hard to understand.

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

Login

Who's Online

147 user(s) are online (79 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

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

Latest GitHub Commits