%% INCLUDE html/header title = "Andy's Online Architecture Page" keywords = "www,online,web,html" description = "Andy Wardley's Online Architecture Page" bodytags = "vlink=\"#ba46ba\"" %% %% INCLUDE header heat = 060 secname = online secdesc = "Online Architect" back = "#online" %%
Hackery and Imagery you might say.
The library and tools will hopefully be released into the public domain one day Real Soon Now.
Pictures speak louder than words, so check out some example of what I do when the creative mood strikes:
The Guestbook is a Perl 5 script requiring the CGI module and the Date::Format module as well as Perl 5 itself. These are all available from the CPAN archives:- see the Perl Language Home Page or contact your local sysadmin or Perl guru.
One important caveat to using the Guestbook code concerns file permissions. Most web servers (the program that actually runs the script and delivers the generated page to the user's browser) assume a different user identity when executing CGI scripts. This may be "nobody", "www" or any other user, depening on how your server was configured. Because the script needs to write to a guestbook file, it is important that the permissions on the file permit it to do so.
The most effective solution is to run the script as 'setuid'. That is, the script adopts your own user id when it runs. There are some potential security problems with making the script itself setuid. The solution to this is to use a small C program (which can safely be setuid) which runs the Perl script itself. The Perl script (e.g. "guestbook.pl") should be owned by you and have permissions 500 (-r-x------). The wrapper program, once compiled (something like "cc -o guestbook guestbook.c"), should also be owned by you and have permissions 6555 (r-sr-sr-x). The guestbook.pl Perl script can reside anywhere on your filesystem (as long as you edit guestbook.c to indicate the full path to it) and the compiled guestbook wrapper program should reside in your cgi-bin or should be executable by the server (check with your server adminstrator if you're not sure how to do this).
Once you've got a few guestbook entries, you can go through and mark some of them as "favourites". The guestbook file stores each entry on a seperate line. The first character of the line is a '0' by default. Edit the guestbook file and change the '0' to a '1' for each message you want to mark as a "favourite". When you select "Best Entries" from the Guestbook, you will see only those message marked '1'. The normal "Read Guestbook" option shows all messages regardless.
You may freely copy, distribute, use and modify the code in condition with the terms specified in the source code.
Requires Perl 5 and the CGI.pm module. These are available from the CPAN archives:- see the Perl Language Home Page or contact your local sysadmin or Perl guru.
You may freely copy, distribute, use and modify the code in condition with the terms specified in the source code.
%% INCLUDE footer %%