Posted by socialnicheguru on May 6, 2010 at 4:03pm
conf_path() gives the path to sites/HOSTNAME (correct me if I am wrong).
Is there a similar variable which would give me the path to a platform?
For example, I want to check if authcache exists in the sites/all/modules directory for a platform
If it does, then I want the authcache configuration parameters set.
I want to do the same for Facebook too.
in /var/aegir/config/includes/global.inc
<?php
// Look for a settings.inc in the sites/blah.com directory.
if (file_exists(conf_path() . '/settings.inc')) {
include_once(conf_path() . '/settings.inc');
}
/************* AUTHCACHE *******/
// Needed for authcache to work
// http://drupal.org/project/authcache
// Check to make sure the file exists
if (file_exists('sites/all/modules/contrib/authcache/authcache.inc')) {
$conf['cache_inc'] = 'sites/all/modules/contrib/authcache/authcache.inc';
// specify cache router this way
if (file_exists('sites/all/modules/contrib/cacherouter/cacherouter.inc')) {
$conf['cache_inc_via_authcache']= 'sites/all/modules/contrib/cacherouter/cacherouter.inc';
}
}
/**
* Drupal for Facebook (fb)
*
* Important:
* Facebook client libraries will not work properly if arg_separator.output is not &.
* The default value is &. Change this in settings.php. Make the value "&"
* http://drupal.org/node/205476
*/
if (file_exists('sites/all/modules/fb/fb_settings.inc')) {
ini_set('arg_separator.output', '&');
require_once "sites/all/modules/fb/fb_settings.inc";
}
Comments
How can I modify global.inc file
take a look at http://drupal.org/node/500088
Campbell - www.linksync.com