Installing Plone on Debian

A little howto to quickly install and try Plone (a GPL’d CMS based on Zope) on your linux box. Well, the installer seems to do the job nicely. 🙂

Tested on Plone 3.* version, Debian “Lenny”.

    • apt-get install g++
    • Download latest version of Plone (Unified Installer)
    • Execute:
      tar zxvf Plone-YOURVERSION-UnifiedInstaller.tgz
      cd Plone-
      YOURVERSION-UnifiedInstaller
      ./install.sh standalone
      gedit /usr/local/Plone/zinstance/README.txt &
      gedit /usr/local/Plone/zinstance/buildout.cfg &
      /usr/local/Plone/zinstance/bin/plonectl start
      less /usr/local/Plone/zinstance/adminPassword.txt

README should be read to follow installation instructions, then you can modify Plone configuration on buildout.cfg, and then you can start Plone. On adminPassword.txt you’ll find your Plone passwords to use for administrative purpouses.

  • Add /usr/local/Plone/zinstance/bin/plonectl start to /etc/rc.local before exit 0 (Red Hat) to run plone at any server restart or create a script on /etc/init.d/ (Debian) like.

Now you can test this CMS based on Python (I’ve tested it 4 years ago, maybe it hardly can replace Drupal but you can give it a try 😉 ).

moving files directory in Drupal

I’ve a multisite installation of Drupal 5.x, a modified Garland theme and user pictures (avatars) enabled. Till now, I used a single “/files” directory for all sites…yes, it sounds freaky (and it’s). I want to enable image upload, so now I want to create something like “files/my1stsite” without Drupal explodes. How to do that?

  1. If you have enabled CSS compression in admin/settings/performance, disable it
  2. Copy (not move!) the user picture folder (i.e. avatar) to “files/my1stsite”. Note: you have to make files and folder writable, if they aren’t: if you omit this step, users cannot change their avatar.
  3. (recommended) Put your site offline to prevent changes.
  4. Change manually all the user pictures path on the database table drp_shared_users, field “picture”. Before: files/avatar/picture-… After: files/my1stsite/avatar/picture-… Existing users images now are taken from the new folder.
  5. Go to admin/settings/file-system and set the new system path (i.e. “files/my1stsite”). Now even new users pictures go in the new folder.
  6. Go to admin/user/settings, verify the users pictures path and save.
  7. Go to admin/build/themes/settings/garland and save. It’ll create a “color” folder in the new system path, regenerating the theme.
  8. If you use image cache, you have to go to admin/settings/imagecache and update all your presets. Check any other module that uses the files directory.
  9. Put online your website. Now you can reactivate CSS compression.

Use this tutorial at your own risk.

Important: if you have a shared user table, avatars will be only visible in the site where users uploaded them, due to the (questionable?) choice to store a relative path in user tables.

UPDATE: to solve the latest problem, you’ve to patch user.module:

Old string:

$picture = file_create_url($account->picture);

New string:

#patch to multisite user picture de-linked

$picture = $account->picture;

If you use site user list, you’ve to change on admin/settings/site_user_list/fields the template value from:

<img src=”@_base/@picture” alt=”” />

to:

<img src=”@picture” alt=”” />

suppressing @_base value. Note: giving an “alt” value is good for accessibility, so do it. You can also link user profile wrapping image in a “<a href=”user/@uid”>” or “<a href=”user/@name”>” (if you use URL rewrite).