Firefox PHP

The same forum on different virtual servers?

Posted by vaidotas 
The same forum on different virtual servers?
October 09, 2006 12:50PM
Is it possible somehow to run the same forum on different virtual servers, and to show for different domains different templates?

For example I have forum on forum.mysite.com, but I want that if user connects to
pda.mysite.com, he can see the same forum but with different template.
Re: The same forum on different virtual servers?
October 09, 2006 01:21PM
you will have to write a module to do this.
its even needed for running phorum under multiple domains as we generate full urls, not relative ones - mainly for avoiding cookie problems.


Thomas Seifert
Re: The same forum on different virtual servers?
October 09, 2006 02:42PM
I guess it would be a small extension to the HTTP Path mod. That mod will already handle changing the HTTP Path setting dynamically based on the actual URL. All you'd have to do is smash in a block of code to set $PHORUM["template"] to the desired template.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: The same forum on different virtual servers?
October 10, 2006 02:45AM
Quote
mmakaay
All you'd have to do is smash in a block of code to set $PHORUM["template"] to the desired template.

Just added:
        if ($_SERVER["HTTP_HOST"] == "my.site.com") {
                $PHORUM["template"] = "my-custom-template";
        }
to function phorum_get_template() in common.php and now everything is working as I need.

Maybe would be better to add this piece of code somewhere else, but I don't know where :-)



Edited 2 time(s). Last edit at 10/11/2006 07:17AM by vaidotas.
Re: The same forum on different virtual servers?
October 10, 2006 05:55AM
Hi Vaidotas,

Quote
vaidotas
Is it possible somehow to run the same forum on different virtual servers, and to show for different domains different templates?

What about to share the database?

Each domain has his own phorum installation with an individual template (the name of the template directory should be the same for all domains). But all Phorum installations are using the same database.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Sorry, only registered users may post in this forum.

Click here to login