Creativyst® Quote Catcher Installation Instructions |
v 1.0c |
[top] |
[top] |
You will notice that the script itself includes some terse commenting explaining what each variable does. Trailing slashes on directory names are optional.
Note: User setable variables in Creativyst scripts employ a simple naming convention. Any variable that holds a FILE location relating to your server's DISK DRIVE is prefaced with the word "File" while any variable that is expecting a web address (as it would be typed into a browser's location bar for example) is prefaced with the acronym "Url" |
[top] |
All files uploaded should be chmod 755.
[top] |
You should see a form that allows you to enter a quote along with an attribution. There is also a field labeled ShortList size which can be left blank for now.
You will also see a list of categories with check boxes (you may configure your own set of categories in the future). Check all the categories from the list that are applicable to the quote you are entering.
Enter the quote and attribution (author name)
and push the submit button. The
quote will be recorded and you will receive the form back with the quote set up
for editing. If the quote does not need editing, click on the "New
Quote" link to get a blank form. Enter the next new quote in the
blank form. Continue on in this fashion until you have entered a few quotes
into your database.
[top] |
into the address bar to view/enter quote number zero. From there you may move forward through the quotes in your database. You may also type the number of the quote in place of 'z' in the address bar, i.e.
This will begin the edit/view session at the quote number specified. You may
still use the next and previous links to move
around and view/edit other quotes.
[top] |
Note to users of previous versions: The function name for including message parts in your pages has changed from msg() to cqc.Msg() (note the upper case 'M' and the 'cqc.' preceding it). If you continue to use msg() the quote displayed will be a reminder that you should change to cqc.Msg(). |
Let's begin. First, include the JSMsg.js script in the header
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="http://www.creativyst.com/Site/quotes/JSMsg.js"> </script> |
<hr> <font FACE="Arial, sans-serif" SIZE="2"> <i> <script LANGUAGE="JAVASCRIPT"> cqc.Msg("Body"); </SCRIPT> </i><br> -- <script LANGUAGE="JAVASCRIPT"> cqc.Msg("Attrib"); </SCRIPT> </font> |
-- |
This will display the message "Body" followed by a double dash and the message "Attrib" ("Attribute") for a randomly chosen message. Each time you reload the page, a new message will be selected at random and displayed.
<hr> <font FACE="Arial, sans-serif" SIZE="2"> <i> <script LANGUAGE="JAVASCRIPT"> cqc.MsgDay("Body"); </SCRIPT> </i><br> -- <script LANGUAGE="JAVASCRIPT"> cqc.MsgDay("Attrib"); </SCRIPT> </font> |
-- |
Unlike the example above that changes every time you re-load the page, this one will only change once a day.
<hr> <font FACE="Arial, sans-serif" SIZE="2"> <i> <script LANGUAGE="JAVASCRIPT"> cqc.MsgN("Body", 10); </SCRIPT> </i><br> -- <script LANGUAGE="JAVASCRIPT"> cqc.MsgN("Attrib", 10); </SCRIPT> </font> |
-- |
This will display a message that only changes when the current list changes. That is to say, when you run the application that re-builds the JSMsg.js file. If there are less than 10 messages in the current list in the above example, it will wrap around and start counting up from the beginning again.
The ...MsgN() display is very usefull for displaying a formatted list of the top N messages in the list, as you might do for example, in a list of recent news stories.
<hr> <font FACE="Arial, sans-serif" SIZE="2"> <i> <script LANGUAGE="JAVASCRIPT"> var msg; msg = "<B>1: </B>"; msg += cqc.GetN( "Body", 0 ); msg += "<BR> --"; msg += cqc.GetN( "Attrib", 0 ); msg += "<hr WIDTH=\"35%\">"; msg += "<B>2: </B>"; msg += cqc.GetN( "Body", 1 ); msg += "<BR> --"; msg += cqc.GetN( "Attrib", 1 ); msg += "<hr WIDTH=\"35%\">"; msg += "<B>3: </B>"; msg += cqc.GetN( "Body", 2 ); msg += "<BR> --"; msg += cqc.GetN( "Attrib", 2 ); msg += "<hr WIDTH=\"35%\">"; document.write(msg); </SCRIPT> </font> |
|
You may use ...Get..() functions as well as ...Msg..() functions from within your javascript scripts for nearly unlimited flexibility when displaying message parts.
Had the application constructed a JSMsg file containing a list of news stories in most-recent-first order, the above JavaScript would have shown the three most recent ones. Note also, that the message numbers start at zero.
<hr> <font FACE="Arial, sans-serif" SIZE="2"> <i> <script LANGUAGE="JAVASCRIPT"> var msg; msg = "<B>1: </B>"; msg += cqc.Get( "Body", 0 ); msg += "<BR> --"; msg += cqc.Get( "Attrib", 0 ); msg += "<hr WIDTH=\"35%\">"; msg += "<B>2: </B>"; msg += cqc.Get( "Body", 1 ); msg += "<BR> --"; msg += cqc.Get( "Attrib", 1 ); msg += "<hr WIDTH=\"35%\">"; msg += "<B>3: </B>"; msg += cqc.Get( "Body", 2 ); msg += "<BR> --"; msg += cqc.Get( "Attrib", 2 ); msg += "<hr WIDTH=\"35%\">"; document.write(msg); </SCRIPT> </font> |
|
We've used the ...Get() function above, but it would have worked just the same way had we used the ...Msg() function to display the messages directly.
Here, instead of a single message that changes every time the page reloads, there are three messages changing every time the page reloads. You can add as many as you'd like to such a list (they will simply wrap around to the beginning if there aren't enough messages in the JSMsg file).
The field names currently supported by the msg() function are:
[top] |
If you're interested in selling this and other products with us, or have
suggestions for making our associates program even better, please refer to our
Creativyst Associates Program
(CAP) information page. Your feedback is greatly appreciated.
back to top |
Creativyst Quote Catcher () | © Copyright 2001-2002, Creativyst, Inc. |