[Geomoose-users] Multiple sites sharing the same Geomoose code

Brent Fraser bfraser at geoanalytic.com
Mon Dec 6 12:10:32 EST 2010


Bob (and others),

   I've been thinking about enhancing GeoMoose to allow multiple "map 
sites" to share the same GeoMoose code, mostly to improve the ease of 
maintenance.  Rigth now I just copy the entire gemoose2 directory.   
While that is expedient (and allows me to tweak parts of the GUI without 
fear of impacting other sites), I'm deferring an upgrade nightmare.

Instead of having geomoose.html as the site url, my strategy is to have 
something like:

http://myserver/maps/php/geomoose_start.php?conf=site1

The geomoose_start.php script would set a SESSION variable for the ini 
file name:
    $_SESSION['ini_file'] = '../../conf/'.$_REQUEST['conf'];

This would be used in config.php; so  instead of the current:
     $CONFIGURATION = parse_ini_file('../../conf/settings.ini');
it would be :
     $CONFIGURATION = $_SESSION['ini_file'];


geomoose_start.php would also read and send the site html file (e.g. 
site1_html.txt) to browser.  i think those are the only changes I'd need 
to make...

FYI, the directory structure would be:

geomoose2
     conf\
         site1.ini
         site1.xml
         site2.ini
         site2.xml
            :

     htdocs\
         site1_html.txt
         site2_html.txt
            :

         skins\site1\site.css (optional)
         skins\site2\site.css (optional)
            :

     maps\
         site1\
         site2\
            :

Your thoughts?

-- 
Best Regards,
Brent Fraser






More information about the Geomoose-users mailing list