Fortune has arrived for Drupal 6.
The Fortune module is a port of the venerable BSD Unix fortune cookie program created by Ken Arnold. It provides a block that displays a random fortune each time the page is reloaded.
Fortune is similar to Quotes, but was built to specifically support the huge library of "fortune cookie files" which often rely on an 80 column display, a monospaced font, and tabs set 8 spaces apart.
The "fortune cookie file" itself is a simple ASCII (ISO-Latin-1) Unix text file in which each fortune is followed by a percent symbol (%) on a line by itself. Fortune files usually come with a binary index file having the same name plus a ".dat" extension.
The Fortune module uses the "fortunes" folder in the files directory as storage for both fortune and index files. You can add new fortunes to that folder via FTP or by using the Upload field on the Fortune Settings Page (admin/settings/fortune). When using FTP you should include the .dat file, but in the Settings form you only have to upload the fortune file itself, and a .dat file will be created automatically.
There are lots of places on the web to get fortunes. Most fortune files are GPL or public domain and free for distribution. Some links to sources of fortune files are included on the module's settings page.
When I started writing this module I didn't realize there was a "Quotes" module already! I only knew nothing turned up when I searched for a "Fortune" module, and there wasn't anything yet built to the BSD fortune file spec. The Quotes module could add BSD fortune file support anytime. Meanwhile I hope this module makes using those fortune files simpler.
The next version of Fortune Module will import fortunes into the database instead of (or in a addition to) keeping them as files - to simplify the module code and optimize performance. The version 1.0 module is being released without database support as a faithful implementation of the file-based fortune reader.
Project Information
- Module categories: Content Display, Games and Amusements
- Maintenance status: Unknown
- Development status: Unknown
- Reported installs: 30 sites currently report using this module. View usage statistics.
- Last modified: February 24, 2010