Skip to content. | Skip to navigation

Sections
Personal tools

Plone/Zope Cookbook

Various little recipes and tidbits from my experiences with Plone and Zope

How to allow non-members to add non-anonymous comments
When configuring a plone site to allow for non-members to add comments, their feedback will always be marked as from 'Anonymous User'. Here's how to give them the option of supplying a name.
SimpleBlog entries in CMFCalendar
By default, CMFCalendar only shows 'Events'. With a surprisingly little amount of tweaking, it will also show your blog entries!
How to pass authorization credentials via URL
Some ftp or http servers accept login-credentials encoded in the target URL as username:password@hostname.tld/path/to/item. Plone does, too - just slightly differently.
CreatePloneProduct.tgz
Creates a Plone product, i.e. the minimum file- and directory structure necessary to be registered by Plone as an installable Product. NOTE: This Product is obsolete and superseded by CreatePloneSkin!
Plone Product Howto
An easy way to create a Plone Product
validating Quills Atomfeed
This version actually validates - there is one nasty hack left, though: the timezone for the modification date is hardcoded to -01:00 (European time). Change that if necessary. Search for w3cdate in the source ;-)
Atom Feed with Comments for Quills
Contains a modified atom template plus a macro defintion.
CreatePloneSkin
This script generates a ready-to-install skin in form of a Product for Plone 2.1 - all you need to do is supply the name of your new skin and the location of your Products folder, that's it! No more copy & pasting from tutorials, as all necessary code is generated for you and you can dive right into your actual work ;-)
Creating hot Zope backups
Performs full or incremental backups of Zope instances. When performing a full backup we rename any existing backup directory and create a new, empty one, into which repozo will do its magic. When renaming the backup, we delete any existing old backup to prevent infinite space usage. Otherwise we just perform an incremental backup into the existing folder After performing a full backup we intentionally don't delete the old backup: if we did, we would lose all incremental backups performed since the last full backup. I.e when performing nightly incremental backups and weekly full backups you will always have between seven and fourteen snapshots instead of just between one and seven.
Sample Zope configuration
This zope.conf file includes values from an external file (defines.conf) containing the unique definitions to a particular instance and otherwise just contains boilerplate code. It is thus suitable to be reused for multiple instances without modification.
Create a ZEO based Plone instance - instantly!
This shell script takes just four arguments and installs a ZEO/Zope combination with Plone and even creates a start/stop script. Life just doesn't get much easier ;-)
instaPlone 0.3 (SnowSprint3 version)
A convenience shell script to create Zope/ZEO combo-instances... instantly.
Use IPython as a Shell for Zope
Sure, you can use 'zopectl debug' but IPython runs circles around it ;-) This shell script let's you do just that. All it requires is $PYTHON_PATH pointing to your Zope's SOFTWARE_HOME.
Batch add users to Plone
This script creates new Plone members with properties supplied from a CSV file. Add it as a 'Script (Python)' instance via ZMI in the root of your plone instance. The script expects a File object with id `users.csv` in the same folder it resides. Run it by clicking on the 'Test' tab. The CSV format is: password;userid;lastname;firstname;email Created 2006-11-03 by Tom Lazar <tom@tomster.org>, http://tomster.org/ under a BSD-style licence (i.e. use as you wish but don't sue me) N.b. tested with Plone 2.5.x, YMMV
Outdated Information
Please note that most of the information contained in this section is several years old and while most of it is still useful, hardly none of it applies directly to current versions of the software discussed. Proceed with caution, your mileage may vary etc. pp. ;-)