Path

ez projects / gis / forum / general / tip for a multi-siteaccess...


Tip for a multi-siteaccess & virtual hosted installation

You need to be logged in to post messages in the forums. New users may register here.

Ronan Guilloux

Member since:
09 January 2008

Posts: 4

Monday 26 January 2009 10:52:20 am

Purpose :

How I used this extension in a multi-siteaccess & virtual hosts installation, by example for a http://admin.mysite.com + http://www.mysite.com, http://de.mysite.com, all running on a single eZ instance.

The fact is that multi-siteaccess with virtual host installation require multi API keys, one for each domain (http://admin., http://www., http://de., http://it., http://es., etc.) (well, at least for googlemap API).

In the PHP code and in tpl files, the ezini calls are written like this :




$gisini = eZINI::instance( "gis.ini" );                          

$key = $gisini->variable( "Google", "ApplicationID" );


$url = $gisini->variable( "Google", "Url" );




or




{ezini("Google", "ApplicationID", "gis.ini")}




So after having generated your Gmap keys, you have to re-organize the original gis.ini like this :

* copy the original gis.ini in ../settings/override/
* rename the original ../extension/gis/settings/gis.ini in gis.ini.memo
* then create an empty gis.ini in each of your virtual hosted siteaccess
* in the ../settings/override/gis.ini, just comment the ApplicationID=XXX line
* copy the [Google] line and this ApplicationID= line in each of your siteaccess site.ini : in the ../settings/siteaccess/admin/gis.ini, in the ../settings/siteaccess/www/gis.ini, etc., then complete this line with the google map api key for your current virtual hosted siteaccess.

Here you are !



--
Ronan Guilloux
www.mazedia.fr
www.coolforest.net

Up

You need to be logged in to post messages in the forums. New users may register here.