Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTTP/1.1 200 OK
- Accept-Ranges:bytes
- Accept-Ranges:bytes
- Age:0
- Connection:keep-alive
- Content-Length:74002
- Content-Type:text/html
- Date:Thu, 02 Feb 2017 07:55:14 GMT
- Server:Apache/2
- <HTML>
- <HEAD>
- <TITLE>Connection Muse User's Guide</TITLE>
- <meta name="Microsoft Border" content="lr">
- </HEAD>
- <BODY BGCOLOR="#E3E3E3"><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" width="1%">
- <p> </p>
- <p> </p>
- </td><td valign="top" width="24"></td><!--msnavigation--><td valign="top">
- <P> </P>
- <H2 ALIGN="center">Word Circuits Connection Muse<BR>
- User's Guide</H2>
- <P ALIGN="center"> Version 1.0</P>
- <P ALIGN="center">Copyright (c) 2000 - 2005<br>
- Jean-Hugues Réty and Robert Kendall</P>
- <P ALIGN="center"> </P>
- <H2 ALIGN="center"><A NAME="GettingStarted"></A>Getting Started</H2>
- <P ALIGN="center"> </P>
- <h3 ALIGN="left"><a name="Terms"></a>Terms of Use</h3>
- <P ALIGN="left"> Connection Muse is free open-source software that you may
- use without charge and freely distribute to other users in accordance with
- the
- <a href="license.htm" target="_blank">GNU General Public License</a>. If you
- use the system in a published hypertext, we ask that you include a
- credit
- on the title page or credits page. For example:</P>
- <P ALIGN="left">"This work uses the Word
- Circuits Connection Muse"</P>
- <P ALIGN="left">We would also appreciate a link back to the Connection Muse
- Web site at http://www.wordcircuits.com/connect.</P>
- <P ALIGN="left"> </P>
- <H3 ALIGN="left"><A NAME="HowItWorks"></A>How the System Works</H3>
- <P ALIGN="left"> Connection Muse consists of two components: the Connection
- Library and the Connection Toolkit. The Library is a collection of JavaScript
- functions contained in a file called <I>connect.js.</I>
- This is the code that makes the system work and it must be loaded by any HTML
- document in which you wish to use Connection features. The Toolkit aids you in
- adding Connection elements to your hypertexts.</P>
- <P ALIGN="left">Connection elements (such as Conditional Links or randomly generated
- text) are created by inserting JavaScript functions into your text at appropriate
- places. When the document is viewed in a browser, the JavaScript functions you
- have added call the main library to perform their tasks. You can add Connection
- functions to your work in two ways. You can type in the JavaScript functions
- manually or you can use one of the Connection Tools to automatically generate
- the function code you need.</P>
- <P ALIGN="left">Many of Connection Muse's features rely upon a reading history
- that is created while your hypertext is read. The history is a list of all the
- nodes (that is, HTML pages) that have been visited during a reading and it is
- updated every time a new node is viewed by the browser. The history is stored
- in a cookie, which is a collection of data that a browser can save on the hard
- disk after visiting a Web site. Your readers must therefore have cookies enabled
- on their browsers for Connection Muse to work properly. They must also
- have JavaScript enabled.</P>
- <P ALIGN="left"> </P>
- <h3 ALIGN="left"><a name="Demos" id="Demos"></a>Demos</h3>
- <P ALIGN="left">To see Connection Muse in action, you can run the Connection
- Muse Demos:</P>
- <P ALIGN="left">The <a href="demos/simple/index.html" target="_blank">Simple
- Demo</a> presents the basics of Connection Muse link and text functions.</P>
- <P ALIGN="left">The <a href="demos/components/start.htm" target="_blank">Component
- Demo</a> presents some more sophisticated approaches. There are two windows
- in this demo, and you can read the story either by clicking on links in
- the main window or clicking on the squares in the Story Component
- window
- that appears at the left of the screen. <a href="#Component_Demo">More about this demo</a>.</P>
- <P ALIGN="left"> </P>
- <h3 ALIGN="left"> <a name="Limitations"></a>System Limitations</h3>
- <P ALIGN="left">Currently a history record can safely contain a maximum of about
- 1,400 nodes. This limit is the result of restrictions imposed on cookie length
- by Microsoft Internet Explorer. To achieve this maximum history capacity, the
- author must create a list of node names that the system will use to generate
- short IDs for nodes. If the list of node names is not created, the history record
- will be limited to approximately 400-1,000 nodes with Microsoft Internet Explorer
- and about 8,000-16,000 nodes with Netscape Navigator. The exact number of nodes
- that can be accommodated depends upon the length of HTML filenames that are
- used in the hypertext. (Netscape Navigator will support a history record up
- to 80,000 characters long, while Microsoft Internet Explorer limits the history
- to 4,000 characters.) Without the list of node names, performance may also be
- slow with very large hypertexts.</P>
- <P ALIGN="left"> </P>
- <h2 ALIGN="center"><A NAME="Preparing"></A>Preparing Your Hypertext to Use the
- System</h2>
- <p ALIGN="center"> </p>
- <h3><a name="Basic_Procedures"></a>Basic Procedures</h3>
- <P>1. <B>Copying the System Files</B>
- <P>The Connection Muse system files are contained in the compressed file <i><a href="http://www.wordcircuits.com/connect/MuseDoc&Files1.zip">MuseDoc&Files1.zip</a></i> in
- a folder called <i>system</i>.
- <P>It is easiest to use the system if all the HTML files that constitute your
- hypertext are in one directory, though the system does support multiple directories.
- Copy the system files <I>connect.js</I> and <I>config.js</I> into the directory
- where your hypertext is located (or the root directory of your hypertext if
- it uses multiple directories).
- <P><B>2. Editing the Configuration File</B>
- <P>Open <I>config.js</I> in an ASCII text editor (such as Notepad in Windows or
- SimpleText on the Mac). This file contains the configuration information for
- your hypertext. Find the following line:
- <P><CODE>histCookieName = "HypertextName"</CODE>
- <P>Change <CODE>HypertextName</CODE> to a name that represents your hypertext.
- The name cannot include spaces, commas, or semicolons. Be sure to leave the
- quotation marks intact.
- <P>You will
- also see a line that reads as follows:
- <P><CODE>totalNodes = 0</CODE>
- <P>This tells the system how many nodes your hypertext contains. Providing this
- information is only necessary if you wish to use functions that determine how
- much of the total work has been read. If you wish to use these features, change
- the "0" to the total number of nodes. (Do not put quotation marks
- around the number.) If the number of nodes changes, you will have to manually
- change this number, so it is best to wait until the work is finished before
- you set this variable.
- <P><B>3. Adding the Library-Loading Code</B></P>
- <P>Any HTML page that makes use of Connection System features must contain in
- its header the JavaScript code that loads the two system files (<i>connect.js</i>
- and <i>config.js</i>). Any node you want recorded in the history must also load
- these files. Each time <i>connect.js</i> is loaded, the node that loads it is
- added to the history. If you are working with a very large hypertext and want
- to use the features designed to accommodate large works, skip the rest of this
- section and follow the instructions in the next section, <a href="#Large_Hypertexts">Working
- with Very Large Hypertexts</a>. If your hypertext contains multiple directories,
- see <a href="#Multiple_Directories">Working with Multiple Directories</a>.</P>
- <P><B>If you are beginning a new hypertext. </B>Use the file <I>template.htm</I>
- as a template for creating any new page that should load the system files. This
- is a blank HTML page that contains the code for loading the files.</P>
- <P><B>If you are adding Connection System features to an existing hypertext.</B>
- You must add the appropriate code to each page that should load the system files.
- To add this code, view your document in ASCII or HTML editing mode and insert
- the following text between the <CODE><HEAD></CODE> and <CODE></HEAD></CODE>
- tags:</P>
- <P><CODE><SCRIPT LANGUAGE="javascript" SRC="config.js"></SCRIPT><BR>
- <SCRIPT LANGUAGE="javascript" SRC="connect.js"></SCRIPT></CODE>
- <P>The
- easiest way to do this is to use a text editor or HTML editor to perform a
- global search and replace on all the HTML files in your hypertext. Replace this
- text:<P> <CODE></HEAD></CODE>
- <P>with this text:
- <P><CODE><SCRIPT LANGUAGE="javascript" SRC="config.js"></SCRIPT><BR>
- <SCRIPT LANGUAGE="javascript" SRC="connect.js"></SCRIPT><BR>
- </HEAD></CODE>
- <P>
- <h3 ALIGN="LEFT"><b><a name="Large_Hypertexts"></a></b>Working with Very Large
- Hypertexts </h3>
- <P ALIGN="LEFT">Connection Muse provides special features for accommodating
- very large hypertexts containing more than 100 nodes or so. These features improve
- performance and allow history records of up to about 1400 nodes. (See <a href="#Limitations">System
- Limitations</a> for more about history length limits.)
- <P ALIGN="LEFT"><b>Short IDs</b>
- <P ALIGN="LEFT">To allow more history information to be stored in the history
- record, the system can substitute 1-3 character IDs for full filenames. To use
- this feature, you must create an array (or list) containing the filename of
- every node in your hypertext. To do this, you must add a line to the end of
- your config.js file using the following syntax:
- <P ALIGN="LEFT"><code>var nodesList = [<i>filename1, filename2,...filenameN</i>]</code>
- <P ALIGN="LEFT">Replace <code><i>filename1, filename2,</i></code> and so on, with
- the names of the files in your piece. If the nodes in your piece were called
- "node1.htm," "node2.htm," "node3.htm," "node4.htm,"
- and "node5.htm," the added line would look like this:
- <P ALIGN="LEFT"><code>var nodesList = ["node1.htm", "node2.htm",
- "node3.htm", "node4.htm", "node5.htm"]</code>
- <P ALIGN="LEFT">If you accidentally omit a few filenames from the list, this will
- not cause any errors in program execution but will reduce the amount of space
- available in the history record.
- <P ALIGN="LEFT">It's recommended that you store the short IDs in a Persistent
- System Frame, as described in the next section. This will guarantee the fastest
- performance.
- <P ALIGN="LEFT">If you choose not to use a Persistent System Frame, you must follow
- these steps: Copy the file <i>ids.js</i> from the <i>frame</i> folder (which
- is located inside the <i>system</i> folder) into the directory where your hypertext
- is located (or the root directory of your hypertext if it uses multiple directories).
- Then add the appropriate code to your hypertext so that each page loads <i>ids.js</i>.
- Open each page in ASCII or HTML editing mode and insert the following text between
- the <code><HEAD></code> and <code></HEAD></code> tags:
- <p><code><SCRIPT LANGUAGE="javascript" SRC="ids.js"></SCRIPT></code>
- <p>Alternatively you can do a global search and replace to make these changes.
- <P ALIGN="LEFT"><b>Persistent System Frames</b>
- <P ALIGN="LEFT">To improve performance and simplify working with Short IDs or
- multiple directories, you can create a frame in your hypertext that is used
- solely to store system information so that this information won't have to be
- reloaded every time a new page is displayed.
- <P ALIGN="LEFT">If you are not using short IDs, copy all the files from the <i>frame</i>
- folder (which is located inside the <i>system</i> folder) into the directory
- where your hypertext is located (or the root directory of your hypertext if
- it uses multiple directories). If you are using short IDs, copy all the files
- from the <i>frame_ids</i> folder (which is also located inside the <i>system</i>
- folder) into the directory where your hypertext is located.
- <P ALIGN="LEFT">The file <i>frameset.htm</i> (or <i>frameset_ids.htm</i> if you
- are using short IDs) contains a frameset containing a Persistent System Frame.
- You can use this frameset as the starting file for the hypertext. (You can rename
- this file to anything you want.)
- <P ALIGN="LEFT">If you want to add a Persistent System Frame to an existing frameset
- rather than using <i>frameset.htm</i> or <i>frameset_ids.htm</i>, you must name
- the new frame "systemFrame." Since this frame will be used only to
- store variable values, you should locate it in an unobtrusive place, such as
- at the bottom of the window, and set its size to "1" (which is the
- smallest size value the browser will accept). This new frame must then load
- the file <i>system.htm</i> (or <i>system_ids.htm</i> if you are using short
- IDs).
- <P ALIGN="LEFT"><i>start.htm</i> will be the first node in your hypertext, so
- you can modify this file as appropriate. (If you rename this file, you will
- also have to revise the frame definition in <i>frameset.htm</i> or <i>frameset_ids.htm</i>
- accordingly.) Each new node in your hypertext should be created from a copy
- of <i>frame_template.htm</i>. Both <i>start.htm</i> and <i>frame_template.htm</i>
- are blank pages containing JavaScript in their headers.
- <P ALIGN="LEFT"> If you are adding the Persistent System Frame to an existing
- hypertext, you must update all the pages in the hypertext so that each file
- contains the following lines of code in its header (between the <code><HEAD></code>
- and <code></HEAD></code> tags):
- <P ALIGN="LEFT"><code><SCRIPT LANGUAGE="javascript" SRC="config.js"></SCRIPT><br>
- <SCRIPT LANGUAGE="javascript">var connectWin=parent.systemFrame</SCRIPT><br>
- <SCRIPT LANGUAGE="javascript" SRC="connect-f.js"></SCRIPT></code>
- <p>The easiest way to do this is to use a text editor or HTML editor to perform
- a global search and replace on all the HTML files in your hypertext. Replace
- this text:
- <p> <code></HEAD></code>
- <p>with this text:
- <p><code><SCRIPT LANGUAGE="javascript" SRC="config.js"></SCRIPT><br>
- <SCRIPT LANGUAGE="javascript">var connectWin=parent.systemFrame</SCRIPT><br>
- <SCRIPT LANGUAGE="javascript" SRC="connect-f.js"></SCRIPT><br>
- </HEAD></code>
- <p>Note that if your files already contain this line:
- <p><code><SCRIPT LANGUAGE="javascript" SRC="connect.js"></SCRIPT></code>
- <p>you should delete it. This line should only appear in <i>system.htm</i>.
- <p>
- <h3 ALIGN="LEFT"><a name="Multiple_Directories"></a>Working with Multiple Directories</h3>
- <P ALIGN="LEFT">If your hypertext files are contained within more than one directory,
- put Connection Muse files in the root directory. Then follow the appropriate
- instructions below, depending upon whether or not you are using a Persistent
- System Frame.
- <P ALIGN="LEFT"><b>When Using a Persistent System Frame</b>
- <P ALIGN="LEFT">Any new pages added to subdirectories under the root directory
- must be created from copies of the file <i>subdir_frame_template.htm</i> (which
- is located inside the <i>system/subdir</i> folder). For example, if the root
- directory is <code>/hypertext</code> and you create new pages in a directory
- called <code>/hypertext/chapter1</code>, these pages must be based upon <i>subdir_frame_template.htm.</i>
- <P ALIGN="LEFT">Any pages not based upon the template must have the following
- lines of code added to their headers:
- <p align="LEFT"> <code><SCRIPT LANGUAGE="javascript" SRC="../config.js"></SCRIPT><br>
- <SCRIPT LANGUAGE="javascript">var connectWin=parent.systemFrame</SCRIPT></code><code><br>
- <SCRIPT LANGUAGE="javascript" SRC="../connect-f.js"></SCRIPT></code>
- <P ALIGN="LEFT"><b>When Not Using a Persistent System Frame</b>
- <P ALIGN="LEFT">Any new pages added to subdirectories under the root directory
- must be created from copies of the file <i>subdir_template.htm</i> (which is
- located inside the <i>system/subdir</i> folder).
- <P ALIGN="LEFT">Any pages not based upon the template must have the following
- lines of code added to their headers:
- <P ALIGN="LEFT"><code><SCRIPT LANGUAGE="javascript" SRC="../config.js"></SCRIPT><br>
- <SCRIPT LANGUAGE="javascript" SRC="../connect.js"></SCRIPT></code>
- <P ALIGN="LEFT">The following line must be added to <i>config.js</i>:
- <P ALIGN="LEFT"><code>var baseDirectory="<i>directoryName</i>"</code>
- <P ALIGN="LEFT"> <code><i>directoryName</i></code> should be the name of the root
- directory. For example, if the root directory is <code>/hypertext</code>, the
- line should read:
- <P ALIGN="LEFT"><code>var baseDirectory="hypertext"</code>
- <P ALIGN="LEFT"><b>When Using More Than One Level of Subdirectory</b>
- <P ALIGN="LEFT">Any pages located in a subdirectory within a subdirectory (for
- example, in <CODE>/hypertext/chapter1/part1</CODE>) must use <code>../../</code>
- instead of <code>../</code> in their header code, as in the following example:
- <P ALIGN="LEFT"><CODE><SCRIPT LANGUAGE="javascript" SRC="../../config.js"></SCRIPT><BR>
- <SCRIPT LANGUAGE="javascript" SRC="../../connect.js"></SCRIPT></CODE>
- <P ALIGN="LEFT"><b>Node Names</b>
- <P ALIGN="LEFT">Whenever a node name is used in an array or as a parameter to
- a function, it should be preceded by a forward slash (/) and include the directory
- name if the node is not located in the root directory. For example, if <i>node1.htm</i>
- is located in <code>/hypertext</code> and <code>/hypertext</code> is the root
- directory, the correct name for it would be "/node1.htm" in a function
- such as this:
- <P ALIGN="LEFT"><code>link("/node1.htm", "click here")</code>
- <P ALIGN="LEFT">If <i>node1.htm</i> is located in <code>/hypertext/chapter1</code>,
- the correct name for it would be "/chapter1/node1.htm":
- <P ALIGN="LEFT"><code>link("/chapter1/node1.htm", "click here")</code>
- <P ALIGN="LEFT">
- <h3 ALIGN="LEFT"><a name="Entry_Page"></a>Preparing an Entry Page</h3>
- <P ALIGN="LEFT">When a reader returns to your hypertext after having read part
- of it, you may want the opening page to give that reader the options of continuing
- the reading where it was left off or starting a new reading from the beginning.
- You can do this by creating an Entry Page. If the reader has not read any of
- the hypertext, when the Entry Page is loaded it displays a link labeled "Come
- In," which leads to the first node of the hypertext. If the reader is returning
- to the hypertext, the following message and options will be presented when the
- Entry Page is loaded:</P>
- <TABLE WIDTH="85%" BORDER="1">
- <TR>
- <TD> <BR>
- You have returned to a reading in progress. Choose an option:
- <UL>
- <LI>Resume the reading where you left off.</LI>
- <LI>Start over and delete the current history.</LI>
- </UL>
- </TD>
- </TR>
- </TABLE>
- <P ALIGN="LEFT">Clicking on the first option takes the reader to the last node
- read during the previous reading session. Clicking on the second option deletes
- the history record and takes the reader to the first node of the hypertext.
- <P ALIGN="LEFT">The Entry Page will also present the reader with a list of filenames
- of all the nodes that have been read. If you create a <a href="#Title_Array">Title
- Array</a>, the titles of nodes will be included in the list as well.
- <P ALIGN="LEFT">Letting the reader delete the history record when starting a new
- reading ensures that all the functions will perform accurately and keeps the
- record from becoming longer than necessary and slowing down performance. It
- also will prevent the reader from filling up the history record when rereading
- a very long hypertext.
- <P ALIGN="LEFT">Follow these steps to create an Entry Page:
- <OL>
- <LI> Copy <i>entry.htm</i> (located in the <i>system</i> folder) into the directory
- that contains your hypertext. If you are using a Persistent System Frame,
- copy the file <i>entry-f.htm</i> (located in the <i>frame</i> folder within
- the <i>system</i> folder) instead, if it has not already been copied into
- your hypertext directory. <BR>
- <BR>
- </LI>
- <LI>Open this file in an ASCII text editor (or in HTML source editing mode in
- your HTML editor) and find the following line:<BR>
- <BR>
- <CODE>firstNode="node.htm"</CODE><BR>
- <BR>
- Change <CODE>"node.htm"</CODE> to the name of the node that starts your hypertext.<BR>
- <BR>
- </LI>
- <LI>Copy the file entry.js into your hypertext directory.<BR>
- <BR>
- </LI>
- <LI>Add any desired text or formatting elements to complete the entry page.</LI>
- </OL>
- <p> </p>
- <h3 ALIGN="LEFT"><a name="Excluding_a_Page"></a>Excluding Pages from the History</h3>
- <P ALIGN="LEFT">There may be times when you wish to use Connection functions in
- a page but don't want that page to be recorded as part of the history. To prevent
- a page from being recorded in the history record when it loads <I>connect.js,</I>
- you can add the expression "<CODE>var noHistUpdate = true</CODE>"
- to the page's header before the line that loads <I>connect.js</I>, in the following
- manner:
- <P ALIGN="LEFT"><CODE><SCRIPT LANGUAGE="javascript">var noHistUpdate
- = true</SCRIPT><BR>
- <SCRIPT LANGUAGE="javascript" SRC="config.js"></SCRIPT><BR>
- <SCRIPT LANGUAGE="javascript" SRC="connect.js"></SCRIPT></CODE>
- <P ALIGN="LEFT">If you are not using any of the functions that depend upon the
- history record, you can add the following line to the <i>config.js</i> file
- to prevent any nodes from being recorded in the history:
- <P ALIGN="LEFT"><code>var noHistUpdate = true</code>
- <P ALIGN="LEFT">
- <H2 ALIGN="center"><A NAME="Toolkit"></A>The Connection Toolkit</H2>
- <P ALIGN="center">
- <P ALIGN="left">The Connection Toolkit provides the easiest method for working
- with the system. There are two versions of the toolkit, one that is an add-on
- for Dreamweaver and one that runs in a Web browser. The Dreamweaver version
- is the more sophisticated of the two, while the browser version will work with
- any editor. The basic functionality of the two versions is the same.
- <P ALIGN="left">Both versions of the toolkit generate not only function code but
- also explanatory comments for each function so that the workings of all Connection
- System elements will be fully documented within the hypertext itself. This is
- important for archival purposes.
- <P ALIGN="left">Currently not all Connection System features are supported by
- the Toolkit. Some elements can only be implemented by manually inserting JavaScript
- code in your document (see <A HREF="reference.htm">Function Reference</A>).
- <P ALIGN="left">
- <H3 ALIGN="left"><A NAME="DreamweaverToolkit"></A>Connection Toolkit for Dreamweaver</H3>
- <P ALIGN="left">Before you can use the Connection Toolkit for Dreamweaver, it
- must be properly installed.
- <P ALIGN="left"><FONT FACE="times new roman, Times New Roman, Times"><B><A NAME="Installation"></A>To install
- the Toolkit for Dreamweaver:</B></FONT>
- <OL>
- <LI>In Dreamweaver, go to the Commands menu and select Manage Extesions. This
- will open the Dreamweaver Extension Manager.</LI>
- <LI>In the Extension Manager go to the File menu and select Install Extension.
- Select the file <i><a href="http://www.wordcircuits.com/connect/ConnectionMuse1.mxp">ConnectionMuse1.mxp</a></i> and
- click Install.</LI>
- <LI>Follow the prompts to install the Connection Muse Extensions.</LI>
- <LI>Close the Extension Manager when you're done. </LI>
- <LI><FONT FACE="times new roman, Times New Roman, Times">If Dreamweaver is currently
- running, you must exit the program and restart it before you can use the Toolkit.</FONT></LI>
- </OL>
- <P ALIGN="left"><B>To add a Connection element to your hypertext:</B></P>
- <OL>
- <LI>
- <P ALIGN="left">Choose ConditionalLink in the Insert bar, either by clicking
- on the appropriate tab or selecting it from the pull-down menu.
- (You can also select the Connection elements from the Insert
- menu.)
- </LI>
- <LI>
- <P ALIGN="left">Position the cursor in your document at the point where you
- wish to add the element, then click on the icon in the Insert bar for
- the element you want. For all elements except Item Array, you can alternatively
- drag the icon from the Insert bar into your document. <i>Do not drag Item
- Array into your document.</i> (See Explanation of Individual Tools below for
- discussion of the different Connection elements.)
- </LI>
- <LI>
- <P ALIGN="left">Enter the requested information into the dialog box.
- </LI>
- <LI>
- <P ALIGN="left">Click OK and the element will appear in your document as
- a Dreamweaver JavaScript icon: <img src="Script.gif" width="18" height="18" align="absmiddle">
- (Be sure that Dreamweaver is configured to display these script icons. If they
- don't appear in your document, go to the Edit menu, select Preferences, click
- "Invisible Elements" in the Category list, and check the checkbox for Scripts.)
- </LI>
- </OL>
- <P ALIGN="left"><B>To change the values of an element after it has been inserted
- into a document:</B></P>
- <OL>
- <LI>
- <P ALIGN="left">Select the element by clicking on the <img src="Script.gif" width="18" height="18" align="absmiddle">
- icon in your document.
- </LI>
- <LI>
- <P ALIGN="left">Click the Edit button in the property inspector.
- </LI>
- <LI>
- <P ALIGN="left">Edit the variable values in the JavaScript code that appears
- in the Script Editor.
- </LI>
- </OL>
- <P ALIGN="left">If you don't feel comfortable with editing JavaScript code, simply
- delete the element and recreate it with the new values.</P>
- <P ALIGN="left"><b>How Connection elements are displayed in Dreamweaver and rendered
- in browsers:</b></P>
- <P ALIGN="left">Every Connection element (such as a Conditional Link or random
- text) that you add to your document will be displayed in Dreamweaver as a JavaScript
- icon (<img src="Script.gif" width="18" height="18" align="absmiddle">). When
- the document is displayed in a browser, the <img src="Script.gif" width="18" height="18" align="absmiddle">
- icon will be replaced by the HTML element (text, a graphic, a link, etc.) that
- you specified when defining the element.</P>
- <P ALIGN="left">Here is an example of how a Conditional Link will appear in Dreamweaver
- and in a browser:</P>
- <P ALIGN="left">In Dreamweaver:</P>
- <P ALIGN="left"><img src="Script.gif" width="18" height="18" align="absmiddle">
- to follow the Conditional Link.</P>
- <P ALIGN="left">In a browser:</P>
- <P ALIGN="left"><u><font color="#3333FF">Click here</font></u> to follow the Conditional Link.</P>
- <P ALIGN="left"><b>Replacing conventional links with Conditional Links</b></P>
- <P ALIGN="left">The Toolkit will not convert conventional links to Conditional Links or MultiLinks. Instead you must delete the link and create a Conditional Link in its place.</P>
- <P ALIGN="left"> </P>
- <H3 ALIGN="left"><A NAME="BrowserToolkit"></A>Connection Toolkit for Browsers</H3>
- <P ALIGN="left"><B>To add a Connection element to your hypertext:</B></P>
- <OL>
- <LI>
- <P ALIGN="left">Select a tool and load it into your browser. (You can do this
- by clicking on "Open browser version" in the explanation of the
- tool below.)
- </LI>
- <LI>
- <P ALIGN="left">Enter the requested information into the form.</LI>
- <LI>
- <P ALIGN="left">Click the Create Script button. The JavaScript code for the
- element you want will be generated in the text box at the bottom of the
- form.</LI>
- <LI>
- <P ALIGN="left"> Select and copy all the text that is
- generated in the text box at the bottom of the form.</LI>
- <LI>
- <P ALIGN="left">Open your Web document in
- HTML view in your editing program (or open it in an ASCII text editor) and paste
- the text into the document at the location where you wish the new element to appear.</LI>
- </OL>
- <P ALIGN="left">(Note that the scripts generated will not work properly unless
- the Connection Library is loaded by the HTML page.)</P>
- <P ALIGN="left"><B>To change the values of an element after it has been inserted
- into a document:</B></P>
- <OL>
- <LI>
- <P ALIGN="left"> Open your Web document in
- HTML view in your editing program (or open it in an ASCII text editor) and find
- the JavaScript code for the element you wish to change. (Each element will
- be preceded by the tag <CODE><SCRIPT LANGUAGE="javascript"></CODE>
- and followed by the tag <CODE></SCRIPT></CODE>.)</LI>
- <LI>
- <P ALIGN="left">Edit the variable values that appear in the code.</LI>
- </OL>
- <P ALIGN="left">If you don't feel comfortable with editing JavaScript code, simply
- delete the element and recreate it with the new values.</P>
- <P ALIGN="left"> </P>
- <H3 ALIGN="left"><A NAME="IndividualTools"></A>Explanation of Individual Tools</H3>
- Click on an icon to open the browser version of the corresponding tool.
- <H4 ALIGN="left"> <a name="Conditional_Links_Tool"></a><IMG SRC="ConditionalLink.gif" WIDTH="18" HEIGHT="18" BORDER="0">
- Conditional Links</H4>
- <P ALIGN="left"><FONT SIZE="-1">[<A HREF="ConditionalLink.htm" target="_blank">Open
- browser version</A>]</FONT>
- <P ALIGN="left">In the form area labeled "Condition," you must specify
- the condition that determines what will be displayed in your document. Click
- on a radio button to select a condition and then fill in any necessary values.
- <P ALIGN="left">In the remaining form fields you must specify:
- <OL>
- <LI> The link to be displayed if the condition is true.</LI>
- <LI>What will be displayed if the condition is false. You can choose to display
- the same text but without a link, to display nothing, or to display a second
- alternative link.</LI>
- </OL>
- <H4 ALIGN="left"><a name="MultiLink_Tool"></a><IMG SRC="MultiLink.gif" WIDTH="18" HEIGHT="18">
- MultiLink</H4>
- <P ALIGN="left"><FONT SIZE="-1">[<A HREF="MultiLink.htm" target="_blank">Open
- browser version</A>]</FONT>
- <P ALIGN="left">This tool lets you create a link with a destination that is selected
- on the fly from a set of specified nodes. You can specify the selection criteria
- that will determine which node in the set will serve as the link destination.</P>
- <P ALIGN="left">If you have defined an array of node names in the configuration
- file (config.js), you can enter the name of the array in the first field of
- the tool's dialog box. (See <a href="#Item_Arrays">Item Arrays</a> and <a href="#Item_Array_Tool">Item
- Array Tool</a>.) Alternatively you can type a list of node filenames into this
- field, separating the filenames
- with spaces or commas.</P>
- <P ALIGN="left">Click a radio button to specify whether the set of possible destination
- nodes should be treated as 1) a sequence in which the first node matching the
- selection criteria is selected or 2) a constellation of unordered nodes in which
- the nodes are evaluated in random order until one is found that meets the selection
- criteria.</P>
- <P ALIGN="left">Specify the selection criteria. If you include a JavaScript expression
- in the selection criteria, it must evaluate to either <i>true</i> or <i>false</i>.
- You should use "filename" as the parameter for functions that accept
- a single node name as a parameter. For example, to limit selected nodes to those
- visited less than three times, you would enter the following in the "JavaScript
- expression" field:</P>
- <P ALIGN="left"><code>nbVisits(filename) < 3</code></P>
- <P ALIGN="left">Specify an alternative destination node in case none of the specified
- nodes fit the selection criteria. In the Linked Text field, type the text that
- will serve as the link. If you have defined a <a href="#Title_Array">Title Array</a>
- in the configuration file, you can click the radio button that specifies the
- linked text should be the title corresponding to the destination node.</P>
- <H4 ALIGN="left"><a name="Conditional_Text_Tool"></a><IMG SRC="ConditionalText.gif" WIDTH="18" HEIGHT="18" BORDER="0">
- Conditional Text</H4>
- <P><FONT SIZE="-1">[<A HREF="ConditionalText.htm" target="_blank">Open browser
- version</A>]</FONT></P>
- <P>In the form area labeled "Condition" you must specify the condition
- that determines what will be displayed in your document. Click on a radio button
- to select a condition and then fill in any necessary values. </P>
- <P>In the remaining form fields you must specify the text to be displayed if the
- condition is true and the text to be displayed if the condition is false. These
- fields will accept multiple lines and HTML tags. In fact, you can copy an entire
- page of HTML source code into either of these fields and the tool will format
- it so that it will be displayed properly in your document.</P>
- <H4 ALIGN="left"><a name="Random_Text_Tool"></a><IMG SRC="RandomText.gif" WIDTH="18" HEIGHT="18">
- Random Text</H4>
- <P ALIGN="left"><FONT SIZE="-1">[<A HREF="RandomText.htm" target="_blank">Open
- browser version</A>]</FONT></P>
- <P ALIGN="left">The Random Text element randomly selects and displays a text item
- from among a series of text items that you specify.</P>
- <P ALIGN="left">To specify each text item, type it into the field labeled "Alternative
- text items" and then click the "Add" button. Each item you add
- will appear in the "List of alternative items." Separate items will
- appear in the list enclosed in quotation marks and separated by comments. To
- remove an item from the list, you must edit the list.</P>
- <H4 ALIGN="left"><a name="Item_Array_Tool" id="Item_Array_Tool"></a><img src="ItemArray.gif" width="18" height="18"> Item
- Array</H4>
- <P ALIGN="left"><FONT SIZE="-1">[There
- is no browser version of this tool]</FONT></P>
- <P ALIGN="left">The Item Array Tool lets you automatically create sets of
- filenames or other items that can be used by other Connection Muse functions.
- (See <a href="#Item_Arrays">Item
- Arrays</a>.) There are two methods for adding items to an array:</P>
- <P ALIGN="left">To add a group of filenames to an array:</P>
- <ol>
- <li>In the Dreamweaver Site Panel, select the files you want to
- add to your array.</li>
- <li>Open the Item Array Tool by clicking on its toolbar icon.</li>
- <li>Enter a name for your array.</li>
- <li>Click the Add Selected Nodes button and the selected filenames will appear
- in the List of Array Items. You can edit the contents of this list if you
- wish.</li>
- <li>Click the Save Item Array button and your array will be added to your
- config.js file.</li>
- <li>Click the Close button to close the dialogue box.</li>
- </ol>
- <P ALIGN="left">To add filenames or other items one at a time:</P>
- <ol>
- <li>Open the Item Array Tool by clicking on its toolbar icon.</li>
- <li>Enter a name for your array.</li>
- <li>Add items to the List of Array Items either by typing in the text of each
- item and clicking the Add Text Button or clicking the Add Node button and
- selecting a filename from the popup list. You can add as many items as you
- wish using either method.</li>
- <li>Click the Save Item Array button and your array will be added to your config.js
- file.</li>
- <li>Click the Close button to close the dialogue box.</li>
- </ol>
- <P ALIGN="left">To change an item array after it has been
- saved,
- you must open config.js with the Dreamweaver text editor, find the name of your
- array in the file, and edit the list that follows the name.</P>
- <P ALIGN="left"> </P>
- <H2 ALIGN="CENTER"><A NAME="ConfigurationOptions"></A>Configuration Options</H2>
- <P ALIGN="left"> </P>
- <P ALIGN="left">There are a number of factors you can control globally throughout
- the hypertext, such as the appearance of links or other elements. You control
- these factors by entering configuration parameters in the configuration file
- (<I>config.js</I>). Open <I>config.js</I> in an ASCII text editor and follow
- the instructions below for changing configuration options.</P>
- <P ALIGN="left"> </P>
- <H3 ALIGN="left"><A NAME="General_Properties"></A>1. General Properties</H3>
- <H4 ALIGN="left">History Name</H4>
- <P><CODE>histCookieName = <I>string</I></CODE></P>
- <P>The history record for your hypertext is stored in the cookie, which must be
- given a unique name. If your history name duplicates that of another hypertext
- stored on the same Web site, the history will become corrupted. To create a
- history name, find the following line in <I>config.js</I>.</P>
- <P><CODE>histCookieName = "HypertextName"</CODE> </P>
- <P>Change <CODE>HypertextName</CODE> to a name that represents your hypertext.
- The name cannot include spaces, commas, or semicolons. Be sure to leave the
- quotation marks intact.
- <H4>History Recording</H4>
- <P><CODE>noHistUpdate = true | false</CODE>
- <P>By default, every time the Connection Library is loaded, it adds the current
- node to the history record. If you wish to disable history recording, add the
- following line to <I>config.js:</I>
- <P><CODE>noHistUpdate = true</CODE>
- <P>Disabling history recording is recommended if you want to use only features
- that don't rely on the history, such as randomly displayed text or links.
- <H4>Hypertext Length</H4>
- <P><CODE>totalNodes = <I>integer</I></CODE>
- <P>The system can determine what proportion of your total hypertext has been read
- and use this information to perform conditional functions. To use this feature,
- though, you must tell the system how many nodes your hypertext contains. To
- do this, find the following line in <I>config.js:</I>
- <P><CODE>totalNodes = 0</CODE>
- <P>Change the "0" to the total number of nodes. (Do not put quotation
- marks around the number.) If the number of nodes changes, you will have to manually
- change this number, so it is best to wait until the work is finished before
- you define this attribute. Providing this information is only necessary if you
- wish to use functions that rely on how much of the total work has been read.
- <P>
- <H3><A NAME="Link_Appearance"></A>2. Link Appearance</H3>
- <P>You can control the way links are displayed throughout the document by adding
- attribute definitions to <I>config.js</I>. Add the line of text indicated to
- the end of the file.</P>
- <H4>Color</H4>
- <P><CODE>linkColorDefault = <I>color</I></CODE></P>
- <P>Specifies an HTML color value that determines the color of the linked text
- for all the links throughout the hypertext created with the link() function.
- Its value may be the name of a color enclosed in quotation marks ("red", "green",
- etc.), a hexadecimal color value, or a JavaScript color property (document.fgColor,
- document.linkColor, etc.). The default value is <I>null,</I> which specifies
- that the browser's default color will be used.</P>
- <P>For example, the following line sets the default link color to green:</P>
- <P><CODE>linkColorDefault = "green"</CODE></P>
- <H4>Embellishments</H4>
- <P><CODE>linkPrefixDefault = <I>embellishment</I><BR>
- linkSuffixDefault = <I>embellishment</I></CODE></P>
- <P><CODE>linkPrefixDefault</CODE> specifies text or HTML code to be placed immediately
- before every link and <CODE>linkSuffixDefault</CODE> specifies text or HTML
- code to be placed immediately after every link. This can be used to put bullets
- in front of or brackets around all the links in a hypertext. The default value
- is no embellishments.</P>
- <P> For example, the following lines enclose links in brackets:</P>
- <P> <CODE>linkPrefixDefault = "[ "<BR>
- linkSuffixDefault = " ]"</CODE></P>
- <P>This line adds a graphic before links to serve as a bullet:</P>
- <P> <CODE>linkPrefixDefault = '<IMG SRC="bullet.jpg" WIDTH="37" HEIGHT="29">'</CODE></P>
- <H4>Inactive Link Appearance</H4>
- <P><CODE>deadLinkColor = <I>color<BR>
- </I>deadLinkStyle = "text" | "link" </CODE></P>
- <P>When a Conditional Link becomes inactive you have the option of hiding the
- linked text or displaying it as unlinked text (a "dead link"). These
- attributes determine how these dead links are displayed throughout the hypertext.
- <CODE>deadLinkColor</CODE> sets the color of the dead link. Its value may be
- the name of a color enclosed in quotation marks ("red", "green", etc.), a hexadecimal
- color value, or a JavaScript color property (document.fgColor, document.linkColor,
- etc.). The default color is <code>null</code>, which causes the document text
- color to be used. If <CODE>deadLinkStyle</CODE> is set to "text,"
- the dead link will be displayed as plain text. If this attribute is set to "link,"
- the dead link will be displayed as underlined text.</P>
- <P>For example, the following lines set dead links to appear as plain text in
- the same color as live links:</P>
- <P><CODE>deadLinkColor = document.linkColor<BR>
- </CODE><CODE>deadLinkStyle = "text"</CODE></P>
- <P>This line sets dead links to green:</P>
- <P><CODE>deadLinkColor = "green"</CODE></P>
- <P> </P>
- <H3><A NAME="Annotated_Text"></A>3. Annotated Text</H3>
- <P><CODE>annotatedTextColorDefault = <I>color<br>
- </I>annotatedTextCSS = <i>value</i><br>
- annotatedTextPrefixDefault = <i>embellishment</i><br>
- annotatedTextSuffixDefault = <i>embellishment</i></CODE></P>
- <P><code>annotatedTextColorDefault</code> sets the color of annotated text created
- with the display() function. Its value may be the name of a color enclosed in
- quotation marks ("red", "green", etc.), a hexadecimal color value, or a JavaScript
- color property (document.fgColor, document.linkColor, etc.). The default value
- is <CODE>null</CODE>, which causes the default link color to be used. (When
- the mouse pointer is moved over annotated text, a message is displayed in either
- a pop-up text box or the status bar.)</P>
- <P> The following line sets annotated text to gray:</P>
- <P><CODE>annotatedTextColorDefault = "gray"</CODE></P>
- <P><code>annotatedTextCSS</code> determines whether annotated text is underlined. The default
- setting is</P>
- <P><code>annotatedTextCSS = "text-decoration: none"</code></P>
- <P>which turns underlining off. The following setting will turn underlining on
- and display annotated text as if it were a link:</P>
- <P><code>annotatedTextCSS = ""</code> </P>
- <p><code>annotatedTextPrefixDefault</code> specifies text or HTML code to be placed
- immediately before every piece of annotated text and <code>annotatedTextSuffixDefault</code>
- specifies text or HTML code to be placed immediately after every piece of annotated
- text. This can be used to mark all the annotated text in a hypertext. The default
- value is no prefixes or suffixes.</p>
- <p> For example, the following line puts an asterisk after all the text created
- with the display() function:</p>
- <p><code>annotatedTextSuffixDefault = "*"</code></p>
- <p> </p>
- <H3><A NAME="Annotations"></A>4. Annotations</H3>
- <P><CODE>popupTextDefault = <I>string<br>
- </I></CODE><CODE>popupTextColorDefault = <i>color<br>
- </i>popupBgColorDefault = <i>color</i><BR>
- popupAttDefault = <I>values</I><I><BR>
- </I>statusTextDefault = <I>string</I><BR>
- deadLinkPopup = true | false<BR>
- deadLinkStatus = true | false<BR>
- titlePopup = true | false<BR>
- titleStatus = true | false</CODE></P>
- <P>These attributes control annotations for links or annotated text that appear
- as pop-up text messages or status bar messages. <CODE>popupTextDefault</CODE>
- specifies a default text string that will be displayed in a pop-up box whenever
- the mouse pointer is moved over a link created with link() or text created with
- display(). The default is "null" for no pop-up display.</P>
- <P><code>popupTextColorDefault</code> specifies the color of pop-up text. This
- may be either the name of a color enclosed in quotation marks ("red",
- "green", etc.) or a hexadecimal color value. The default value is
- <code>null</code>, which causes the text color of the document to be used. <code>popupBgColorDefault</code>
- determines the background color of the pop-up text. The default setting is <code>"#FFFFCC",</code>
- which sets the background color to pale yellow.</P>
- <P><code>popupAttDefault</code> specifies attributes that determine the appearance
- of the pop-up text. This text is formatted by means of an HTML table, so <code>popupAtt</code>
- will accept any string of attributes allowed by the HTML <TABLE> tag.
- The attributes are entered in the following format:</P>
- <p> <code>popupAttDefault = '<i>attribute1</i>="<i>value1</i>" [<i>attribute2</i>="<i>value2</i>"]'</code></p>
- <p>This example sets a specific width for the pop-up box:</p>
- <p><code>popupAttDefault = 'width="100"'</code> </p>
- <P>The pop-up text feature relies on DHTML and therefore will only work in version
- 4 or later browsers. <FONT COLOR="#FF0000">[Note: A bug in the current version
- prevents pop-up text from working properly in Netscape Navigator if the relevant
- link appears in text that is centered or in a table.]</FONT></P>
- <P><CODE>statusTextDefault</CODE> functions the same way as <CODE>popupTextDefault</CODE>,
- except the specified annotation appears in the browser's status bar. The default
- is "null" for no status bar message.</P>
- <P>Both <CODE>popupTextDefault</CODE> and <CODE>statusTextDefault</CODE> can be
- overridden by specifications made in individual coals to either link() or display().</P>
- <P>If <CODE>deadLinkPopup</CODE> or <CODE>deadLinkStatus </CODE>is set to "true,"
- the specified pop-up or status bar annotation will be displayed by dead links.
- (See Link Appearance for discussion of dead links.) The default for both these
- attributes is "false."</P>
- <P>If <CODE>titlePopup</CODE> or <CODE>titleStatus </CODE>is set to "true,"
- node titles specified in a Title Array will be used as pop-up or status bar
- annotations for links to the corresponding nodes. The default for both these
- attributes is "false."</P>
- <P>For example, the following lines specify default text to appear in the status
- bar and specify that node titles be displayed as pop-up annotations for live
- and dead links.</P>
- <P><CODE>statusTextDefault = "Be brave. Click here."<BR>
- deadLinkPopup = true<BR>
- titlePopup = true</CODE></P>
- <P><a name="Title_Array"></a>To create a Title Array, add the following line to
- <I>config.js:</I></P>
- <P><CODE>titleArray = new Array()</CODE></P>
- <P>Then assign titles to file names using the following syntax:</P>
- <P><CODE>titleArray[<I>filename</I>] = <I>title</I></CODE></P>
- <P>For example, the following Title Array will cause "Node 1" to be
- displayed as pop-up text for every link to<I> node1.htm,</I> "Node 2"
- for every link to <I>node2.htm, </I>and so on:</P>
- <P><CODE>titleArray = new Array()</CODE></P>
- <P><CODE> titleArray["node1.htm"] = "Node 1"<BR>
- titleArray["node2.htm"] = "Node 2"<BR>
- titleArray["node3.htm"] = "Node 3"<BR>
- titleArray["node4.htm"] = "Node 4"</CODE></P>
- <P> </P>
- <h3><a name="Item_Arrays"></a>5. Item Arrays</h3>
- <P> Many of the Connection functions support multiple items as parameters, allowing
- you to perform such operations as randomly selecting one of several node filenames
- (see <a href="reference.htm" target="_top">Function Reference</a>). If you
- wish to use the same set of items repeatedly in different functions, you can
- define
- the set as an item array in <i>config.js</i>. You can then use the array name
- as a function parameter instead of entering each individual item name as a
- separate
- parameter. You can use the <a href="#Item_Array_Tool">Item Array Tool</a> to
- create item arrays.</P>
- <P>Item arrays take the following form:</P>
- <P><i><code>arrayName</code></i><code> = [<i>item1</i>, <i>item2</i>, <i>item3,
- ...</i>]</code></P>
- <P>For example, this line added to <i>config.js</i> defines an array of four node
- filenames:</P>
- <P><code>someNodes = ["1.htm", "2.htm", "3.htm", "4.htm"]</code></P>
- <P>The array name <code>someNodes</code> can then be used in functions instead
- of the names of the four nodes. For example, this code would create a link to
- one of the four nodes selected at random:</P>
- <P><code><SCRIPT LANGUAGE="javascript"><br>
- link(select("random", someNodes), "random link")<br>
- </SCRIPT></code></P>
- <P>Arrays of other types of items may be created for use with multi-parameter
- selection or evaluation functions.</P>
- <P> </P>
- <h3><a name="Optimizing_Performance"></a>6. Optimizing Performance</h3>
- <P><code>fileExtension = "htm|html"</code></P>
- <P>By default, the system expects node names to end with the extension "<i>.html</i>"
- and treats "<i>.htm</i>" extensions as exceptions. If most or all
- of your HTML filenames end with the "<i>.htm</i>" extension, you can
- gain a slight increase in both performance and the capacity of the history record
- by adding the following line to <i>config.js</i>:</P>
- <P><code>fileExtension = "htm"</code></P>
- <P>The default setting is:</P>
- <P><code>fileExtension = "html"</code></P>
- <P>This <code>fileExtension</code> variable has no effect if you are using <a href="#Large_Hypertexts">Short
- IDs</a>.</P>
- <P> </P>
- <h3><a name="Automatic_Execution"></a>7. Automatic Function Execution</h3>
- <P><code>executeAfterLoading()</code></P>
- <P>If you wish to execute a particular function every time any node is loaded,
- you can declare the <code>executeAfterLoading()</code> function in the <i>config.js</i>
- file. This function will be executed every time <i>connect.js</i> is loaded.
- Because it is executed after the system files are loaded, it can make use of
- any Connection System functions. The function is declared by adding the following
- lines to <i>config.js</i>:</P>
- <P><code>function executeAfterLoading() {<br>
- <i>JavaScript expressions</i> <br>
- } </code></P>
- <P><code><i>JavaScript expressions</i></code> are the lines of JavaScript code
- you wish to execute. The following example updates a Table of Contents page
- (<i>contents.htm</i>) in a frame called <i>leftFrame</i> every time a node is
- loaded.</P>
- <P><code>function executeAfterLoading() {<br>
- parent.leftFrame.location = "contents.htm" <br>
- } </code></P>
- <P>You cannot define parameters for this function.</P>
- <P>If you wish to prevent <code>executeAfterLoading()</code> from being executed
- on a particular page, add the following lines to the header of that page:</P>
- <P><code><SCRIPT LANGUAGE="JavaScript"><br>
- noExecuteAfterLoading = true<br>
- </SCRIPT></code></P>
- <P> </P>
- <h2 align="center"><a name="Using_Features"></a>Using Connection System Features</h2>
- <p> </p>
- <h3><a name="Conditional_Text"></a>Conditional and Random Text</h3>
- <p>Connection Muse lets you add conditional elements to your text using
- the <a href="#Conditional_Text_Tool">Conditional Text Tool</a>. These are fragments
- of text that are either displayed or not displayed on the page, depending upon
- conditions that you specify (such as whether or not a particular node has been
- read). You can also create several alternative text fragments and specify conditions
- that will determine which of the fragments will be displayed when the node is
- read.</p>
- <p>You can add random elements to your text by creating several alternative text
- fragments and specifying that one of these be selected randomly and displayed
- in your page when it is read. This can be done with the <a href="#Random_Text_Tool">Random
- Text Tool</a>.</p>
- <p>Conditional or random text elements can be any length and can include any HTML
- tags, so they can contain graphics, tables, audio elements, or JavaScript. You
- can specify as many alternative text fragments as you wish within a random text
- element. </p>
- <h4><a name="Using_Conditional_Text"></a>When to Use Conditional and Random Text</h4>
- <p>Conditional text can alter a text so that it will better fit into multiple
- contexts, creating syntactic or narrative transitions as needed. This lets you
- provide the reader with more options for rearranging the hypertext in different
- ways during a reading.</p>
- <p>Conditional text can also make node recurrence more interesting and meaningful.
- When reading a hypertext, the reader is likely to periodically encounter nodes
- she's already read. Rereading these nodes can be more fruitful for the reader
- when something new is revealed in them. Changing a few words in the text when
- it is read a second or third time can bring out meanings that were only implied
- the first time around. Context-sensitive variant versions of a node can ensure
- that reading the node in different contexts (that is preceded by different nodes)
- reveals new meaning in it. Different implications of a text passage may be brought
- out when it is preceded by different nodes, and subtle conditional alterations
- to the text can make these implications more explicit. Random variations can
- create a more unpredictable type of variety upon rereading.</p>
- <p>It can sometimes be useful to suppress or add certain information conditionally
- within a node. If a particular node containing background information about
- an event or character has already been read, that information can be omitted
- from other nodes by means of conditional text. For example, you could specify
- that whenever the name "Mary" first appears in a node, it is preceded
- by the phrase "Bob's wife," unless another node referring to Mary
- has already been read, in which case Mary will already have been identified
- as Bob's wife.</p>
- <p>Conditional text can also be used to create alternative plot lines. For example,
- after a reader encounters a node in which Mary is killed, Mary could be eliminated
- from subsequent nodes by suppressing some of the text in those nodes. If the
- reader never encounters the node containing Mary's death, Mary can continue
- to figure in the story until the end.</p>
- <p>Adding several random elements within the same node can create interesting
- and unpredictable textual juxtapositions, such as those found in Surrealist
- or Dadaist writings.</p>
- <p> </p>
- <h3><a name="Conditional_Links"></a>Conditional Links and MultiLinks</h3>
- <p>The Connection System lets you create a wide variety of Conditional Links using
- the <a href="#Conditional_Links_Tool">Conditional Links Tool</a>. You can specify
- that a Conditional Link is to be activated (that is, made clickable) only if
- certain conditions are met, or you can specify that the destination node for
- a Conditional Link should vary depending on specified conditions.</p>
- <p>To create a simple Conditional Link, you define a link and then specify a condition,
- such as whether or not a particular node or a specified number of nodes has
- been read. You then specify what will happen if the condition is met or not
- met. Generally you will want the link to be displayed and activated if the condition
- is met. If the condition is not met, you can substitute an alternative destination,
- you can deactivate the link (display it as text that is not clickable), or you
- can hide the link altogether.</p>
- <p>To create a MultiLink, you specify a number of alternative destination nodes
- for the link using the <a href="#MultiLink_Tool">MultiLink Tool</a>. You can
- then specify that the destination should be chosen randomly or according to
- whether or not certain conditions are met. You can also combine random and conditional
- selection, so that a destination is chosen randomly from all nodes that meet
- a specified condition (such as all nodes not yet visited by the reader).</p>
- <h4><a name="Using_Conditional_Links"></a>When to Use Conditional Links</h4>
- <p>Simple Conditional Links can serve many useful purposes. You can deactivate
- or hide links that lead to nodes that have already been read. This can be useful
- if you want to steer readers to new material but for aesthetic reasons don't
- want to use an alternative vlink color for followed links. If you are using
- clickable graphics for links, you can specify that an alternative graphic image
- be displayed for links that lead to previously read nodes.</p>
- <p>Conditional Links can be useful for controlling the reader's access to certain
- material. To maintain suspense in a story, you might want to withhold certain
- passages (such as the one revealing whodunit in a mystery tale) until most of
- the hypertext has been read. You can do this by using Conditional Links as the
- reader's only means to get to the restricted passages. The links could then
- be hidden or deactivated until a specified number of nodes has been read.</p>
- <p>For the sake of coherence and logical development in a narrative, you might
- want to ensure that certain widely scattered passages within the hypertext are
- encountered in a particular order. You can do this by creating Conditional Links
- to the passages, specifying that the links remain hidden or inactive until the
- prerequisite nodes have been read. For example, Conditional Links could restrict
- access to a node that describes a certain action--this node would be inaccessible
- until other nodes had been read that establish the motivation for this action.
- </p>
- <p>Conditional Links can help with character development. Suppose you want to
- ensure the progressive development of a character named Mary. First, you could
- categorize all the nodes dealing with Mary as belonging to one of three stages
- in her development. Conditional links could then ensure that none of the Stage
- 2 nodes are visited until all of the Stage 1 nodes have been read. Similarly,
- you could ensure that no Stage 3 nodes are available until all Stage 2 nodes
- have been read.</p>
- <p>Conditional Links can also implement alternative plot elements in a manner
- similar to that described in the section on conditional text. If the reader
- encounters a node in which Mary dies, this could deactivate all the links to
- nodes in which Mary is depicted as being still alive and activate links to nodes
- that deal with the consequences of her death.</p>
- <h4><a name="Random_Links"></a>Random Links and Other MultiLinks</h4>
- <p>MultiLinks can randomly take the reader to a new destination. This can be useful
- if you want to achieve a highly fragmented style along the lines of, say, one
- of William Burroughs' "cut-up" novels. MultiLinks can also be used
- in a more structured way, as described in the following section on text components.</p>
- <p>You can specify the alternative destinations in the MultiLink Tool by entering
- the names of all the destination nodes in the Nodes field. If you wish to create
- a number of different MultiLinks that use the same set of destination nodes,
- it is better to create an <a href="#Item_Arrays">Item Array</a> that contains
- the names of all the nodes. Then whenever you create a MultiLink you need only
- enter the name of the Item Array in the MultiLink Tool. Item Arrays should also
- be used to implement Text Componenets as described in the next section.</p>
- <p> </p>
- <h3><a name="Text_Components"></a>Text Components and Organic Hypertext</h3>
- <p>Connection Muse provides features for handling large-scale structural
- elements of a story or poem. You can define the large-scale narrative or thematic
- components of your text and then specify parameters for how these text components
- should unfold and interact with each other during a reading. In other words,
- you can assign behaviors to the important elements of your text.</p>
- <p>This component and behavior approach lets you define structure as process and
- create what we call <i>organic hypertext</i>. There are two facets to the concept
- of organic hypertext:</p>
- <ul>
- <li>The individual parts of the hypertext contain their own predefined behaviors
- for growth so they can unfold during the reading with relative independence
- when necessary.</li>
- <li>At the same time, these individual parts are able to adapt to the unique
- circumstances of a particular reading so that the parts can better serve the
- whole</li>
- </ul>
- <p>Here we provide a brief introduction to components and organic hypertext. For
- a more in-depth discussion, see <a href="http://www.wordcircuits.com/connect/ht2000.htm" target="_blank">Toward
- an Organic Hypertext</a>.</p>
- <h4><a name="What_Are_Components"></a>What Are Text Components?</h4>
- <p>Text components are any structural or conceptual elements that are likely to
- cohere as distinct entities in the reader's mind during the reading process.
- For example, the reader may encounter passages about a particular character
- scattered throughout the text. The reader will mentally piece the content of
- these passages together to form a conceptualization of that character's personality
- and history. Here are some categories of text components, along with some specific
- examples of these components that we will use in a demo for a hypothetical story:</p>
- <p>Settings of time or place</p>
- <ul>
- <li>Chicago</li>
- <li>New York</li>
- </ul>
- <p>Characterizations</p>
- <ul>
- <li>Susan</li>
- <li>Jacob</li>
- <li>Shirley</li>
- </ul>
- <p>Plot lines</p>
- <ul>
- <li>Affair between Susan and Jacob</li>
- <li>Susan's childhood</li>
- <li>Jacob's sexual abuse of his niece, Shirley</li>
- </ul>
- <p>Themes, unifying metaphors, symbolic elements, and so on</p>
- <ul>
- <li>guilt and atonement</li>
- <li>sexual obsession</li>
- </ul>
- <p>Here is a <a href="diagram.htm" target="_blank">diagram</a> of the text component
- structure of this hypothetical story. Note how some text components are contained
- within others (for example, Susan's childhood is set in New York), while others
- overlap (the theme of sexual obsession overlaps with both Jacob's affair and
- his abuse of his niece).</p>
- <h4><a name="Using_Components"></a>Using Text Components</h4>
- <p>You define a text component by specifying a group of nodes that contain the
- relevant textual material. Components may not always be clear-cut, so the contents
- of different components can overlap with each other--that is, the same nodes
- can be contained within more than one component. The content of components can
- even be changed dynamically by adding or removing nodes during the reading.
- Once components are defined, you determine their behavior. You can then create
- links directly to a text component instead of to an individual node. The component's
- predefined behavior will determine which specific node within the component
- will serve as the link's destination.</p>
- <p>You define the contents of a component by creating an <a href="#Item_Arrays">Item
- Array</a> in your config.js file. The Item Array lists all of the nodes that
- constitute the component, and you can access these nodes as a group by using
- the name of the array.</p>
- <p>The nodes in a component can behave as an ordered or an unordered set. If the
- order of the nodes is governed by a logic of chronology or exposition, you can
- treat the nodes as an ordered sequence. An example of this is a group of nodes
- that relate a particular plot line, such as the affair between Susan and Jacob
- in our hypothetical story. Ordered components are represented as ovals in the
- <a href="diagram.htm" target="_blank">diagram</a>. You can specify that every
- time the reader returns to an ordered component, she is taken to the first unvisited
- node in the sequence. This type of component is called a <i>retentive path,</i>
- and it lets a reader easily return to a narrative thread and pick up where she
- left off.</p>
- <p>If the nodes are clearly connected in content but don't inherently demand a
- particular ordering, they can be treated as unordered. An example of this is
- a group of nodes that contribute to the reader's understanding of a particular
- character, locale, object, or event or simply share a philosophical outlook
- or style of writing. All the nodes that bear upon Susan's personality could
- constitute an unordered component. Unordered components are represented as rectangles
- in the <a href="diagram.htm" target="_blank">diagram</a>. (Note that in the
- diagram the unordered components representing locale contain ordered plot components
- within them. Part of a component can behave as an ordered sequence while the
- rest behaves as unordered.)</p>
- <p>Other more complex behaviors are also possible. For example, particular nodes
- can be included in a component or excluded from it depending on whether all
- or part of some other component has been read. Once a component and its behavior
- are defined, links can be created directly to a component instead of to an individual
- node within the component. The component's behavior will determine which node
- the link leads to.</p>
- <p>In the current version of the system, the behavior of a component must be specified
- every time a link is created. You create links to a component with the <a href="#MultiLink_Tool">MultiLink
- Tool</a>, and you specify the behavior by filling out the fields in the MultiLink
- Tool. In our prototype for a future version, behaviors need be specified only
- once, since they will be stored centrally with the components themselves.</p>
- <h4><a name="Component_Demo"></a>The Component Demo</h4>
- <p>We've created a <a href="demos/components/demo.htm" target="_blank">hypertext
- prototype</a> for part of the hypothetical story referred to above. Note that
- this is just a rough outline for demonstration purposes and not meant to be
- a real piece of fiction. After clicking on the link above to launch the demo,
- you will see the main text window on the right and a component map for navigational
- purposes in a smaller window on the left. The demo text consists of 3 text components,
- which are represented by icons in the component map:</p>
- <ol>
- <li><b>The Affair</b> (between Susan and Jacob) is a sequence of 7 nodes that
- unfold a short chronological plot thread. This is a retentive path.</li>
- <li>The <b>Susan</b> component consists of all the nodes about Susan that don't
- require any chronological ordering. These five nodes merely describe aspects
- of her character and they could be slipped in anywhere within the plot line
- and presented in any order. This is an unordered component.</li>
- <li>The <b>Jacob</b> component is an unordered component of five nodes describing
- Jacob.</li>
- </ol>
- <p>All the links in both windows of this demo are made directly to one of these
- three components, and the component's behavior determines the exact destination
- node. All of the links to <b>The Affair</b> lead to the first unvisited node
- in the sequence. All of the links to <b>Susan</b> or <b>Jacob</b> lead to a
- randomly selected unvisited node in the respective component. Once all of a
- character's nodes have been read, previously visited nodes are presented instead
- of new nodes.</p>
- <p>If you wish, you can read all the text by simply clicking repeatedly on the
- 3 icons in the map. These icons shrink in proportion to the amount of text within
- the component that has been read, and moving the mouse pointer over an icon
- shows the percentage of the component read. You can also navigate by following
- links in the text itself.</p>
- <p>Clicking on the <b>Susan</b> or <b>Jacob </b>icon or a link on a character's
- name in the text always yields new material about that character, as long as
- new material is available. This guarantees that a link to a character from anywhere
- in the hypertext will always let you continue to flesh out your knowledge of
- that character and allow you to keep moving forward with the reading.</p>
- <p>After reading several Susan or Jacob nodes, you can return to the story line
- at any time by clicking on either <b>The Affair</b> in the map or "return
- to the steamy stuff" in the text. This lets you resume the story line exactly
- where you left off, no matter where you are in the hypertext.</p>
- <p>The way these links function is an example of allowing the different parts
- of the text to grow independently, one of the goals of organic hypertext. This
- approach makes for a very smooth reading experience. In this short hypertext
- the chances of prematurely looping (that is, encountering previously read material)
- and the need for backtracking to find new material are virtually eliminated,
- even if the reader doesn't use the map. This wouldn't be the case if all the
- links in this work were static and fixed. It is easier for the reader to achieve
- closure in the reading, since it's always clear what remains to be read. The
- component map also makes it much clearer to the reader how she is interacting
- within the large-scale structure of the text.</p>
- <h4> <a name="Complex_Approaches"></a>More Complex Approaches</h4>
- <p> In a larger, more complex hypertext a component map, retentive paths, and
- other Connection System elements can be even more valuable for the reader. Their
- use may also become more complex than in our component demo. Suppose you were
- to implement all of the components you see in our <a href="diagram.htm" target="_blank">component
- diagram</a> and then add some new ones. You might then want to control the reader's
- access to material by manipulating links in the text and on the map. You might
- want the map to dynamically hide or display some components, rather than presenting
- them all at once. For example, a component might appear on the map only after
- the reader has already encountered it through links in the text. You might not
- want to give the reader access to Jacob's sexual abuse until she's read some
- background material about Jacob or Shirley.</p>
- <p> You might not want the reader to be able to read through the entire Affair
- sequence without interruption; you might want to create suspense by withholding
- the last node or two until a lot of other material in the hypertext has been
- read. You may want the reader to be able to read a plot thread by jumping around
- in it occasionally and encountering some events out of order. You might feel
- the need to use mutually exclusive alternative text elements, such as different
- outcomes for a single plot line. You may decide to combine certain components
- or exclude nodes from a component under certain circumstances. All of these
- things are possible with the system. They are examples of the individual parts
- of the text adapting themselves to serve the needs of the whole, the second
- goal of organic hypertext</p>
- <p> </p>
- <h3><a name="Recognized_Problems" id="Recognized_Problems"></a>Recognized Problems</h3>
- <p><b>Pop-up Text</b></p>
- <p>In Netscape Navigator, pop-up text doesn't work properly when connected to
- text that is centered or placed in tables.</p>
- <p>In Internet Explorer, pop-up text doesn't wrap properly when it reaches the
- edge of the window. This may cause some text to be cut off.</p>
- <p>In Internet Explorer, when pop-up text is added to a link or to hot text presented
- with the display() function, any space inserted after the link or the hot text
- is not displayed. This problem does not occur if pop-up text is not used. For
- example, this code:</p>
- <p><code>Place your mouse pointer<br>
- <br>
- <script language="JavaScript"><br>
- text = "here"<br>
- popupText = "this is the pop-up text"<br>
- display(text)<br>
- </script><br>
- <br>
- to view the pop-up text. </code></p>
- <p>should be displayed like this:</p>
- <p>Place your mouse pointer here to view the pop-up text.</p>
- <p>Instead it is displayed like this:</p>
- <p>Place your mouse pointer hereto view the pop-up text. [no space between "here" and "to"] </p>
- <p>Here is a workaround for the problem:</p>
- <p><code>Place your mouse pointer<br>
- <br>
- <script language="JavaScript"><br>
- text = "here"<br>
- popupText = "this is the pop-up text"<br>
- display(text)<br>
- </script>&nbsp;to<br>
- <br>
- view the pop-up text.</code></p>
- <p><b>Opening First Page in New Window</b></p>
- <p>The connect.js library file may not load properly when a Connection System
- page is opened in a new browser window by right-clicking on a link and selecting "Open
- in new window." To avoid this problem, it is best not to use Connection
- System functions in the opening page of a hypertext, since a reader may open
- this page in a new browser window when following a link to it from another
- Web site.</p>
- <p> </p>
- <!--msnavigation--></td><td valign="top" width="24"></td><td valign="top" width="1%">
- <p> </p>
- </td></tr><!--msnavigation--></table></BODY>
- </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement