Archives in Fiction: Technical information
The Archives in Fiction database is accessed via a single perl script
called archives.cgi. This is GPLed, and available for download
using the link below, for anyone who wants to use or adapt it for
another site. It currently fetches its data from a mysql database,
though on principle should work with any SQL database engine for which a
suitable perl DBD module is available.
The script is 'copyleft'-ed by its author and licensed under the GNU General Public License (GPL). It
is free software, and may be redistributed and/or modified as required,
under the terms of the GPL (qv). Download and see top of script for
details.
To download and set up the script for another website:
- Set up a directory for the script (or use your cgi-bin directory
if preferred/mandated by your ISP).
- Create a subdirectory for the config information: this will
contain your database connection details, so should only be readable
by the user running the CGI script.
- Download the following files into the main script directory:
- Download the myconfig.txt file, rename it to
myconfig.pl and move it into the subdirectory created at
step (2).
- Edit the $datadir variable setting near the top of
archives.cgi, to point to the subdirectory created at step (2).
- Create an index.html file (and/or steal and adapt
mine).
- Download the archives.sql file, and import this into your SQL
database to create the required tables. (The actual table names can
be altered: if you do so, change the setings in your
myconfig.pl file to match.)
- Download the messages.sql file, and import this also into your
SQL database. This creates and populates a table holding the
messages used in the screens: change table name in this file and in
myconfig.pl if required, as in archives.sql.
- Change settings in your myconfig.pl file as required
(see comments within that file).
Return to project page.