DOCUMENTATION - UNIX README 12/7/2002 #################################################################### # # # Script Name: RandText # # Version: 2.2 # # Author: George Prociuk (pointafter.com) # # Overview: RandText is a perl script designed to generate a # # random line of text each time a web page is opened. # # This is controlled by inserting a single line of code # # into the web page on which the text is to appear. # # This script requires that your server supports SSI # # coding # # # # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License as # # published by the Free Software Foundation; either version 2 of # # the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public # # License along with this program; if not, write to: # # Free Software Foundation, Inc. # # 59 Temple Place - Suite 330 # # Boston, MA 02111-1307 # # USA # # # # # # Copyright (c) 2002 - Pointafter.com - All rights reserved # # Author: George Prociuk - pointafter.com # # # #################################################################### # # # DISCLAIMER: # # In no event will pointafter.com be liable to the user of this # # script or any third party for any damages, including any lost # # profits, lost savings or other incidental, consequential or # # special damages arising out of the operation of or inability to # # operate this script, even if user has been advised of the # # possiblitity of such damages. # # # #################################################################### RandText 2.1 by Pointafter.com ===================================================================================== History: 03/25/2002 - Released version 1.0 of RandText. Features include: 1) Multi-file support - This script will support numerous random text files. The file being used is designated in the SSI. 2) An admin script that allows for editing of random text files via a simple text editor that is executable from any browser. 3) Full error handling. Error messages that support the text editing process. ===================================================================================== 04/05/2002 - Released version 2.0 of RandText. Features include: 1) Added password protection to admin script. The first time you use randadmin.pl, you will be prompted to enter a user id and password. Afterwards, you will be prompted to enter the user id and password each time you use the RandText admin/editor. 2) Added functionality to allow the text editor to delete a text file. 3) Added SSI display to allow for cut and paste of SSI command into your HTML 4) Fixed the bug that allowed for multiple line returns at the end of a line of text. 5) Fixed the bug that displayed incorrect column headings after a record was updated. 6) Added functionality to focus the cursor to the textarea when adding or editing text. ===================================================================================== 04/13/2002 - Released version 2.1 of RandText. Features include: 1) Fixed the bug that incorrectly displayed the cut and paste SSI script when viewed with Netscape. 2) Revised the security/password functionality eliminating the need for any html documents. RandText is now completely self contained and does not depend on any external html files for its functionality. 3) Added functionality to automatically reload/refresh the screen after a file is created or deleted. This eliminates the need to manually refresh/reload the screen in order to update the file list in the control panel frame. ===================================================================================== 12/7/2002 - Released version 2.2 of RandText. Features include: 1) Enhanced the text editor to simplify the process for editing or deleting a record. 2) Added the ability to insert a record at a specific location in the data file. ===================================================================================== Setup Instructions: ------------------- To display a line of random text on your web page, place a line of SSI code in the webpage where you would like to see the random text displayed. The admin center/text editor will display the correct line for you, so all you'll need to do is cut and paste it into your html. The proper format is: "yourfile.dat" is the name of the text file containing the lines of random text that will be displayed on your web page. This file must end with the .dat suffix and must be stored in the randtext folder in your cgi-bin. "yourfile.dat" should contain a separate line of text for each text line to be displayed on your web page. All random text formatting (fonts, color, positioning, size) should be done as part of your web page HTML. Randtext merely displays random text. ===================================================================================== Files needed: ------------- You should find the following files in the archive and they should be set with the following permissions: Script files: ------------- randadmin.pl (755) -rwxr--r-- (RandText Admin Center and Text Editor) randtext.pl (755) -rwxr--r-- (Random line generator. Referenced by HTML) rtsetup.lib (644) -rw-r--r-- (Contains all the variables that need editing) Sample Random Text Data File: ----------------------------- random1.dat (644) -rw-r--r-- (Sample Random text file) Misc Info Files: ---------------- Readme.txt Setup/Installation Instructions gnu.txt GNU License Agreement ===================================================================================== Installation Instructions: -------------------------- Note: If you are upgrading from a previous version of RandText, delete all previous versions of Randtext script files (those with a .pl extension) and HTML files (those with a .htm extension) from the Randtext folder in your cgi-bin and follow the instructions below. Do not delete any random text files (those with a .dat extension). Version 2.1 will correctly use previously created .dat files. Before FTP'ing any files to your server: (if your server requires .cgi extensions, be sure to rename the .pl files to *.cgi). Change the first line of randadmin.pl and randtext.pl to the location of PERL on your system. The rtsetup.lib file is the only file that needs editing. The following variables can be customized: Required: --------- $datapath - This is the path to the randtext folder in your cgi-bin directory $domain - This is your domain name in the format "yourdomain.com" and is used in headings $domainURL - This is the full URL of your website. This is used to create a referrer comparison (for security) to ensure that the admin script is only executed from your website. The correct format is "http://www.yoursite.com" Optional: --------- $dbtitle - This is the heading that will appear at the top of all pages displayed by the random text admin center. Current Value is "Random Text Admin Center" $bgcolor - This is the background color for all pages displayed by the random text admin center. Current value is "white" $headingscolor - This is the background color for all table headings on all pages displayed by the random text admin center. Current value is "cornsilk" $fontsize - This is the font size for the Column headings in all tables displayed by the random text admin center. Current value is "2" $tablewidth - This defines the width of the tables used for editing a random text file. Default is 700. I would suggest not changing this. (Note: $width1 + $width2 should equal $tablewidth). $width1 - This defines the width of the column of cells that contain the radio buttons for selecting which record should be edited. Default value is 50. I would suggest not changing this (Note: $width1 + $width2 should equal $tablewidth). $width2 - This defines the width of the column of cells that contain the contents of each record in a file. Default value is 650. I would suggest not changing this. (Note: $width1 + $width2 should equal $tablewidth). After you have made the above changes: 1. Create a folder called randtext in your cgi-bin directory. If you are upgrading from version 2.0 or earlier, you should already have this folder in your cgi-bin directory. 2. FTP the following files to the randtext folder and set the permissions as indicated. Be sure to FTP the files in ASCII format. If you FTP in Binary format, you will have execution problems. Script files: ------------- randadmin.pl (755) -rwxr--r-- randtext.pl (755) -rwxr--r-- rtsetup.lib (644) -rw-r--r-- random1.dat (644) -rw-r--r-- 3. In your browser's address line, enter the following URL: http://www.yourdomain.com/cgi-bin/randtext/randadmin.pl (where yourdomain.com is your website's domain name) 4. If you did everything correctly, you should be looking at the RandText User ID and Password Selection screen. The first time you use RandText, you will need to establish a User ID and Password. Afterwards, you will be prompted for this User ID and Password each time you use RandText. If you ever forget your password, delete the file .rtpw10 from the randtext folder on your server. The next time you execute the randadmin.pl script, it will prompt you to enter a new user id and password. (.rtpw10 is a hidden file, so you may need to set your FTP software options to display hidden files). ===================================================================================== If you run into installation problems and require technical support, please use our Bulletin board to post your situation. The Perl Script forum is monitored daily and you can expect a response to your question(s) within 24 hours. Also, please submit any comments and suggestions for improvement regarding this script at our Bulletin Board also, The bulletin board can be found at: http://www.pointafter.com/cgi-bin/ikonboard/ikonboard.cgi ========================================================== Enjoy! Our specialty is our Website Usability Analysis services. Would you like to find out how your site rates from a Usability perspective. Give us a try. You won't be disappointed. George Prociuk pointafter.com