Welcome to Geeklog, Anonymous Wednesday, October 09 2024 @ 07:32 pm EDT
Downloads
Category: Add-ons
Date: 2004-12-08 14:01
Size: 53.91 KB
Version: 0.1
MD5: b85c1220e8aaacdc82188057d38945d6
Submitter: supermagic
Web: -
Rating: 0.00
Popularity: 796 POP
Block that displays a quote/fortune using "traditional" fortune data files.
FortuneBlock is based on the Fortune-Cookie programs of Unixland from time
immemorial. Well, perhaps not that long, but the fortune program is well
established.
Fortune works on a flat file system where a directory containing a series of files of quotes separated by a % along with a separate file indexing those quotes is examined, and a random quote is extracted from one of those files.
This is useful for GeekLog users. First, there are a great many quotes files already prepared (http://freshmeat.net/browse/895/?topic_id=895 ). Secondly, if you happen to be hosting your site externally with limited database capacity, this method does not require any db space. As no SQL db is used, adding or removing quotes is as simple as adding or removing files from the quotes directory. Building the index files is a pain, though. In Unixland, use the command strfile (see the man page for how to do this). The Fortune 1.1 script this block is based on also has a createIndexFile() method to build indexes.
Based on Fortune 1.1 by Henrik Aasted Sorensen ( http://www.aasted.org/quote/ )
immemorial. Well, perhaps not that long, but the fortune program is well
established.
Fortune works on a flat file system where a directory containing a series of files of quotes separated by a % along with a separate file indexing those quotes is examined, and a random quote is extracted from one of those files.
This is useful for GeekLog users. First, there are a great many quotes files already prepared (http://freshmeat.net/browse/895/?topic_id=895 ). Secondly, if you happen to be hosting your site externally with limited database capacity, this method does not require any db space. As no SQL db is used, adding or removing quotes is as simple as adding or removing files from the quotes directory. Building the index files is a pain, though. In Unixland, use the command strfile (see the man page for how to do this). The Fortune 1.1 script this block is based on also has a createIndexFile() method to build indexes.
Based on Fortune 1.1 by Henrik Aasted Sorensen ( http://www.aasted.org/quote/ )