Archive for July, 2005

Multiple Drupal Sites With One Install

I’ve been trying to setup a system that allows me to maintain a single Drupal installation while having multiple sites which use it while maintaining different modules and themes.

Here are some requirements.

1) core application is not editiable by local users
2) local users can modifiy themes and modules

It looks like this is in the pipe line already.

For the meantime, I need to get things moving. So I did the following.

1) Installed a master copy of drupal in /var/www/drupal_master
2) In each of the installations I’m using it for, I create a symlink to /var/www/drupal_master to locally drupal
So I end up with /var/www/domainname.com/drupal -> /var/www/drupal_master
3) In /var/www/drupal_master/stites I create domainname.com
4) in /var/www/domainname.com, I add the following .httaccess:

RewriteEngine on
# Redirect root page to drupal home (if desired)
# NOTE: without trailing slash, external redirect to /drupal will
# be used and it will show up in browser. With slash, hidden.
RewriteRule ^$ drupal/ [L]
# Rewrite non-file/directory URL's to be under drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/$1 [L]

Unfortunately, it seems as though modules can’t be site specific, so all installs share the same modules. This just means good configuration every time I setup an additional subdomain.

/var/www/drupal_master/sites ends up looking like this:

domainname.com1->themes/, settings.php
domainname.com2->themes/, settings.php
domainname.com3->themes/, settings.php
default->settings.php

Comments

Custom Link Display for Drupal

If you want to do link display in drupal, but not rely on the link processing that drupal does automatically, it’s not to hard to setup some code to display a link list that handles things slightly differently.

I wanted to do a display where the last item of the list was displayed differently. Turns out it’s really simple. I borrowed the idea from http://www.heydon.com.au/?q=node/661

foreach ($primary_links as $singlelink) {
  print "<li>";
  if ($singlelink == end($primary_links)) {
     $singlelink = str_replace("" ;

Comments

Drupal Module Repository

Well Drupal is still somewhat down, so there is a nifty place where you can download modules while we wait for the nice folks at drupal to get their new server back online.

http://drupal.bitnet.hu/

Comments

Tiger, gcc and pwgen

Ugh. Tiger broke my tool chain and I didn’t realize it. Trying to install something as straight forward as pwgen via fink (well really apt-get) I got the following errors:

checking for gcc… gcc
checking whether the C compiler (gcc -L/sw/lib) works… no
configure: error: installation or configuration problem: C compiler cannot create executables.
### execution of ./configure failed, exit code 1
Failed: compiling pwgen-2.03-11 failed

The problem is that even though I had installed XCode when I upgraded to Tiger, the gcc3.3 that comes with XCode doesn’t work. The sollution is at the very least the following:

sudo gcc_select 4.0

This selects the 4.0 gcc (assuming you have it installed). Supposedly XCode 2.1 fixes the issue, but it’s not done downloading yet….

Comments