[support] Multi-Sites Question - Site Variables

Earnie Boyd earnie at users.sourceforge.net
Sun Dec 2 05:27:23 UTC 2007


Quoting "Tom Holmes Jr." <tom at tomholmes.net>:

> Yes, I know one instance of Drupal can have multiple sites.   It is
> clearly documented ... no issue there.
> I know it's about creating the right directories under the sites folder
> and moving settings.php to that directory.
> Clearly, settings.php holds the 'site variables' to a site in a directory.
> Please correct me if any of that is wrong ...
>
> So, my question is .... we want to add a dozen new site variables for
> our sites.
> I think the obvious thing to do would be add those custom variables to
> the settings.php file.
> Is that the best way to go about it ... I didn't look yet, but are there
> custom modules out there that specifically deal with new site variables.
>
> I mean, I am sure there are other ways to go about this ... but what way
> fits best in the Drupal module?
> I think my first suggestion of putting them in the settings.php file is
> the most appropriate, but I could be wrong.
>
> Thanks for any information or help!
>                                                                    Tom

As a SWAG I would create a module foo within the sites/all/modules/foo 
directory and use http://api.drupal.org/api/function/variable_set/ 
within the .install file to create them.  I assume that you want the 
same variables for each site.  You can then use the admin/settings/foo 
form to set specific site values.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/



More information about the support mailing list