AmiWiki:Coordination/Drupal things

Skin

 * http://gmuf.com/mosaic/drupal/amiatwork.tar.gz

Configuration
For site-wide authentication, see ../Drupal auth.

Pretty URLs
Enable "clean URLs" as described in http://drupal.org/node/15365.

Aliases
The following code should be added to the config file in order to support aliases in the form :

function conf_url_rewrite($path, $mode = 'incoming') { if ($mode == 'incoming') { // URL coming from a client if ($path{0} == '~') { $u = db_fetch_object(db_query("SELECT uid FROM {users} WHERE name = '%s'", check_plain(substr($path, 1)))); if ($u) $path = "blog/$u->uid"; } }  elseif ($mode == 'outgoing') { // URL going out to a client if (substr($path, 0, 5) == 'blog/' and strspn(substr($path, 5), '0123456789') == strlen(substr($path, 5))) { $u = db_fetch_object(db_query("SELECT name FROM {users} WHERE uid = '%s'", check_plain(substr($path, 5)))); if ($u) $path = "~$u->name"; } }  return $path; }