The random quote script is very flexible, and be used to display
various random content on your web pages. This can include text,
images, URLs, media files, HTML, and other types of code. The script
is easy to configure, and uses uses SSI (Server
Side Includes) to display a randomly selected item from a
preconfigured list.
A random quote sample is available:
How to Add Random Content
Follow these simple steps to add random content to your web pages:
- Create your content data file.
- Upload the data file and any referenced files or images.
- Add the random quote code to your web page.
Create Your Content Data File
Use Notepad (or similar text editor) to open a new text file and
enter details of your text, code, or images, each separated by a blank
line as follows:
First text, code, or image item.
Second text, code, or image item.
Third text, code, or image item.
Example:
This is a a text string. The script won't end the string until it
sees a blank
line, so your text can span multiple lines like this.
<SPAN><B>You can also add code, images, media and more!</B></SPAN>
<IMG SRC="http://www.yourname.com/images/yourimage.gif">.
Save the file as "filename.txt" (replacing "filename"
with your preferred name for this random quote group).
Upload the Data File and Any Referenced Files or Images
Upload this file to your "freeCGI" directory, which is one level
above your document root ("htdocs"). Use
FTP or
Webby to upload your file (you cannot access this directory with
FrontPage).
Upload any referenced files or images to the location you specified
in your data file.
Add the Random Quote Code to Your Web Page
To instruct the server to look for SSI commands, your page should
end in an ".shtml" extension. SSI commands will not be recognized if
the page has an ".html" extension.
To include the random content on your web page, simply add the
following code to the page body (where "filename" is the name
you gave to your random quote data file):
<!--#include virtual="/cgi-t/quote.cgi?file=filename.txt"
-->
Note: Remember to save your page with an ".shtml" extension. |