The originating site for the Delorie Counter is http://www.delorie.com/web/counter/
To get a distribution tarfile (.tar.gz format) directly from delorie.com, use my autotar program. Please download as little as possible.
In all cases, you will need a copy of gd that can be used with C++, and a C++ compiler (gcc is recommended). Instructions for adding more character sets appear later in this document.
If you need the old version of gd, here it is.
Once you've built gd, modify gd.h to support C++ (see notes below) and build num2gif: gcc -O2 num2gif.cc -o num2gif -lgd -lm
While you are allowed to copy this software onto your server, you are not allowed to modify it or its documentation in any way without obtaining permission first, not even the background or link colors. Forward all comments and requests back to dj@delorie.com if you want them considered for addition to the official sources.
ISPs may change the example site names in using.html to match the site you install the software on if you wish. You may also remove the "Installing" section of the home page (between the two <HR>s
The software includes two files for backup maintainence: dump-db, which converts the database to a text file; and restore-db that converts the text file back into a database. You should dump the database just before any scheduled backups, since the text file can be manually edited if needed.
Configuring your Server
Choose an appropriate directory for the Delorie Counter software. It doesn't matter where. In your conf/srm.conf file, add lines like this:
AddType script/counter .cnt Action script/counter /where/i/installed/it/counter.cgi
Note that this should be the virtual path to the counter, not the physical filesystem location.
Note that you can use any MIME type (as long as the two match) and any suffix (although I recommend keeping the default one).Make sure that your server is configured to allow .cgi extensions to be executed as real CGIs in the counter's directory.
Some of the programs are perl scripts. They are shipped assuming that /bin/perl is a usable perl 4 or 5 interpreter with NDBM support. You may need to change the first lines of the perl scripts to suit your system configuration.
You must configure the counter.conf file for your site. This file defines all the permutations of server names you allow, as well as defining any virtual hosts you support and/or other servers you are serving counters to. For each entry, you must list three lines, as documented inside the file itself. Use "perl -c counter.cgi" to check the syntax. If none of these entries match the request, it checks against the ServerName you specified in conf/httpd.conf
Generating the Character Set Indexes
If you downloaded an index-less package or added new character sets or borders, you'll need to generate the charset browser indexes. These are single images that showcase a range of character sets, with a much faster download time than trying to download all the individual images. You do not need to generate or offer these, but you should.
../automerge
I got my character sets from www.digits.com. They must be converted to my custom format before they can be used. Here's how:
1 /tmp/1new.gif 2 /tmp/2new.gif a /tmp/anew.gif
num2gif -m /tmp/mymap.map > chars/new.gifThis will read all the gifs listed in the map file, and generate a custom gif (there is binary data to the left of each character) that the counter can use.
#ifdef __cplusplus extern "C" { #endif ... original gd.h ... #ifdef __cplusplus } #endif