########################################### # Boderlines v1.0 by Allen C. Huffman # # Copyright (C) 2001 by Sub-Etha Software # # FREEWARE! # # subetha@pobox.com # # http://disneyfans.com/subetha # ########################################### Introduction: Long before the public Internet, the elite few who actually had home computers with modems would use them by dialing up Bulletin Board Systems (BBS). A BBS was simply a program you ran on your computer which would let others dial in and leave public (or private) messages to other folks who dialed in later. It was cutting edge back then, and there was some excellent BBS software available for the original home computers (Apple, Commodore, Atari, TRS-80, etc.) Sadly, alot of the "neat" features that BBSs had seem to have disappeared as the Internet took over and made everything a "point and click" experience. One very cool feature which was available for "Shadow BBS" on the Radio Shack Color Computer was called "borderlines". The original idea came from other systems, but Shadow BBS tried to take as many cool features as possible and cram them into one package. Anyway, a borderline was simply a message that would be displayed directly before the system prompt (where the visitor would type in the next command they wanted to do). Users were allowed to add their own borderlines and the messages would rotate each time you were back at the main prompt. Originally the concept was a "graffiti wall" that you could add a line of text too, but someone decided to make it more "in your face" by adding it as as part of the main menu. So, "Sub-Etha Borderlines" is that concept brought to the web. This script will randomly display a one-line message anywhere on your web page via a server side include (SSI) tag. You can put in a link to let the user go to a script generated "view/add" page, or even create a custom form that will let them add a new entry. There is a mode to list the complete set of borderlines, and also a special SysOp (System Operator == admin) mode for looking at the list with the IP address of whoever posted the entry. Installation: 1) Customize the script (as shown below in the "Configuration" section). 2) Upload it to your server's CGI directory ("/cgi-bin" for instance). 3) Make the script executable. On my system, I have to set the permissions to Owner READ|WRITE|EXEC (700), but your system may require different settings for CGI scripts. 4) Add the following SSI tag whever you want a borderline to be displayed: 5) Put in a link somewhere to let the user add an entry by calling the same script with the parameter "mode=add": View/Add Borderlines If you would rather have the "add" function be built into one of your own pages rather than use the bland CGI script output, you can use the following CGI include to display ALL of the current borderlines: ...then you can include a form to let the user add a new borderline such as this:

If you would like to add a few words of wisdom, please do so:

Note the use of a hidden field called "returnURL". This is used to tell the script what page to load after the borderline is added. I choose to point it back to the same page so the user will see an updated list of all the borderlines with theirs added. That should be enough to get you started! Configuration: 1) Make sure the first line of the script is the path to PERL on your server. #!/usr/bin/perl 2) Set the number of borderlines you want to store in the data file. # # Max number of borderlines to store. # $max = 10; 3) The CGI "add" page will redirect the user back to a page after the a message is added. Specify what page (full URL) it should send them to. # # Where do we send the user when they are done? This can also be passed in # from a form using a hidden field with a name of "returnURL" and the # value set to the page such as "value=http://yourdomain.com/yourpage.htm". # $return_URL = "http://yourdomain.com/yourpage.htm"; 4) Specify the file name and location for the data file. # # Specify the path/name to where the borderline data file will be stored. # $datafile_path = "seborderlines.dat"; 5) In the event that the script does not reload properly, you might have to specify the server location for the file. # # Location/name of this script... Hopefully you won't have to change # this, but if you do it should be something like "/cgi-bin/seborderlines.cgi" # or wherever your script is and whatever it is called... # $this_script = "$ENV{'SCRIPT_NAME'}"; Support / Usage: If you have any suggestions on how I might clarify these instructions, please drop me a note. If you want to use this script for any purpose, feel free to do so. If you modify it and make a new version of it, please include a note that your version was based on this code. If you feel my script is worth something, you can make a donation of any amount (even if it's just .50 or a dollar) through my web page. Enjoy! -- Allen Trivia: "Shadow BBS" was written by Terry Todd, the other half of Sub-Etha Software. Sub-Etha was founded in 1990 to produce software for the Tandy/Radio Shack Color Computer as well as for computers that ran Microware's OS-9 operating system. Watch for more "BBS" type scripts coming soon!