[development] let's cleanup /misc

Khalid B kb at 2bits.com
Thu Jan 5 18:14:11 UTC 2006

> > 1. In DocumentRoot, there should be only 2 files: index.php and
> > .htaccess, and one directory (drupal/). Nothing else. This allows
> > other applications to coexist cleanly (without clutter) with drupal.
> If you want other applications to coexist then use subdirs. That's clean.

It is not. If I want to create a tar archive (or zip) of Drupal, I have to name
the directories to include, not just backup the "drupal/" directory.

If I want to clone the Drupal install to a subdirectory (say I have a hosting
account and they add domains/subdomains in subdirectories) for testing
or another site, then it is a pain.

> > 2. Under drupal/, there are two directories: core/ (with includes,
> > modules, misc, ...etc.), and sites/. Anything under core/ should only
> > be core Drupal, untouched by anyone, and hence easily upgradable.
> > everything in core can be read only, and hence security is not an
> > issue.
> Under drupal/site/sitename you have everything you need to backup.

True. We need to publicize it more, and even enforce it. Perhaps allowing
only core themes and modules to run off modules and themes is the way

> > 5. The current scheme of having .module, .inc and .css under one
> > directory for a given module should continue. It works well. My only
> > gripe is that many modules do not do a drupal_get_path(), and hardcode
> > 'modules' in there.
> So true. What's the URL of the handbook page where you have documented
> this tip?

Here is an example of a patch I recently submitted.

I found that same problem in many modules when I was reorganizing my site's
directory structure to move all contribs under sites. Event,
statistics trends, and
something else comes to mind.

More information about the development mailing list