Index: default/category_list.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/category_list.html,v
retrieving revision 1.28
retrieving revision 1.32
diff -b -u -r1.28 -r1.32
--- default/category_list.html  18 Dec 2001 01:47:04 -0000      1.28
+++ default/category_list.html  27 Apr 2002 00:20:45 -0000      1.32
@@ -25,7 +25,11 @@
 <%body_table%>
   <tr>
     <td align=left valign=top>
+<%if main_page%>
+      <br><%title_font%><%site_title%><%/title_font%>
+<%else%>
       <br><a href="gforum.cgi?<%hidden_query%>"><%title_font%><%site_title%><%/title_font%></a>
+<%endif%>
     </td>
     <td>
       <%include include_logo.html%>
@@ -37,7 +41,8 @@
 <%if current_user_id%>
        Welcome, <%nbsp current_user_username%>
 <%else%>
-       You are not logged in. <a href="gforum.cgi?do=login;<%hidden_query%>">Click here</a> to log in.
+       You are not logged in. <a href="gforum.cgi?do=login;<%hidden_query%>">Click here</a> to log in.<br>
+        If you are not a member, <a href="gforum.cgi?do=user_signup">Sign up here</a>!
 <%endif%>
        <br>&nbsp;
       <%/body_font%>
@@ -78,7 +83,7 @@
         <a name="<%cat_id%>"></a>
           <%header_font%>
             <%if cat_depth%><img src="<%image_url%>/clear_shim.gif" height=1 width="<%cat_depth * 25%>"><%endif%><a href="gforum.cgi?category=<%cat_id%>;<%hidden_query%>"><%cat_name%></a>
-            <%if current_user_id and cat_show_forums%><a href="gforum.cgi?<%if cats_query%><%cats_query%>;<%endif%><%if cat_hidden%>un<%endif%>hide_cat=<%cat_id%>;<%hidden_query%>"><small><%if cat_hidden%>[+]<%else%>[-]<%endif%></small></a><%endif%>
+            <%if current_user_id and cat_show_forums and main_page%><a href="gforum.cgi?<%if cat_hidden%>un<%endif%>hide_cat=<%cat_id%>;<%hidden_query%>" title="<%if cat_hidden%>Expand<%else%>Collapse<%endif%> this category"><small><%if cat_hidden%>[+]<%else%>[-]<%endif%></small></a><%endif%>
             <%if cat_desc%> - <%cat_desc%><%endif%>
           <%/header_font%>
          </td>
@@ -165,7 +170,7 @@
     <td colspan=2>
       <%body_font%>
        &nbsp;<br><br>
-       <img src="<%image_url%>/recent.gif" border="0" width="15" height="11" alt="New posts!"> = Forum has new posts - <a href="gforum.cgi?do=mark_all_read;redo=<%this_do%>;<%if cats_query%><%cats_query%>;<%endif%><%hidden_query%>">Mark all read</a><br>
+       <img src="<%image_url%>/recent.gif" border="0" width="15" height="11" alt="New posts!"> = Forum has new posts<%if current_user_id%> - <a href="gforum.cgi?do=mark_all_read;redo=<%this_do%>;<%if cats_query%><%cats_query%>;<%endif%><%hidden_query%>">Mark all read</a><%endif%><br>
        <img src="<%image_url%>/no_recent.gif" border="0" width="15" height="11" alt="No new posts"> = Forum has no new posts<br>
       <%/body_font%>
     </td>
Index: default/forum_view.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/forum_view.html,v
retrieving revision 1.39
retrieving revision 1.42
diff -b -u -r1.39 -r1.42
--- default/forum_view.html     18 Dec 2001 01:47:04 -0000      1.39
+++ default/forum_view.html     4 Mar 2002 04:01:20 -0000       1.42
@@ -166,7 +166,7 @@
              <img src="<%image_url%>/reply_post.gif" border="0" width="13" height="7" alt="Reply">
              <%GForum::Template::store_gvars(legend_reply => 1)%>
 <%  endif%>
-             <a href="gforum.cgi?post=<%post_id%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if post_depth and user_default_post_display == 1%>#<%post_id%><%endif%>">
+             <a href="gforum.cgi?post=<%post_id%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">
                <%post_subject%>
              </a>
            <%/body_font%>
@@ -179,7 +179,7 @@
          <td style="border-right:1px solid <%dark_beige%>">
            <%body_font%>
 <%  if user_id%>
-             <a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>"><%nbsp post_username%></a>
+             <a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a>
 <%  else%>
              <%nbsp post_username%>
 <%  endif%>
@@ -508,7 +508,7 @@
     <td align="right" valign="top">
 <%hidden_form%>
       <br><br>
-      <select name="forum" size="1" class="button">
+      <select name="jump" size="1" class="button">
 <%GForum::Forum::jump_list($forum_id)%>
       </select>
       <input type="submit" value="Jump to forum" class="submit">
Index: default/globals.txt
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/globals.txt,v
retrieving revision 1.23
retrieving revision 1.26
diff -b -u -r1.23 -r1.26
--- default/globals.txt 18 Dec 2001 01:47:04 -0000      1.23
+++ default/globals.txt 12 Jan 2002 20:53:53 -0000      1.26
@@ -1,6 +1,6 @@
 # This file is auto generated and contains a perl hash of
 # your template globals for 'default' template set.
-# Generated on: Tue Dec 11 17:46:10 2001
+# Generated on: Sat Jan 12 12:43:20 2002
 # vim: syn=perl

 {
@@ -9,11 +9,15 @@
        '/header_font' => '</b></font>',
        '/title_font' => '</b></font>',
        '/top_row_font' => '</b></font>',
+       'advanced_editor_background' => '#d9e4f2',
+       'advanced_editor_button' => '#E6F5D7',
+       'advanced_editor_font' => 'Verdana',
        'body_font' => '<font face="Verdana,Arial,Helvetica" size=2 color="black">',
        'body_table' => '<table border=0 width="100%" cellpadding=0 cellspacing=0><tr><td width=50><img src="<%image_url%>/clear_shim.gif" height=1 width=50></td><td width="100%"><table border=0 width="100%" cellpadding=0 cellspacing=0>',
        'body_tag' => '<body bgcolor="white" topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0>',
        'dark_beige' => '#A1A576',
        'dark_green' => '#256A19',
+       'editor_base_color' => '#E6F5D7',
        'even_color' => 'white',
        'header_font' => '<font face="Verdana,Arial,Helvetica" size=3 color="#003300"><b>',
        'header_row' => '<tr bgcolor="#E6F5D7">',
@@ -25,6 +29,8 @@
        'medium_green' => '#93B371',
        'odd_color' => '#d9e4f2',
        'registered_users' => 'sub { $DB->table(\'User\')->count }',
+       'scrollbar_arrow_color' => '#00ff33',
+       'scrollbar_base_color' => '#404040',
         'site_home' => 'Home',
        'site_title' => 'Gossamer Forum',
        'title_font' => '<font face="Verdana,Arial,Helvetica" size=4 color="#7a9f54"><b>',
Index: default/include_css.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_css.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
--- default/include_css.html    28 Aug 2001 23:37:39 -0000      1.3
+++ default/include_css.html    10 Jan 2002 09:00:31 -0000      1.4
@@ -11,7 +11,7 @@
 --%>
 <style type="text/css" media="screen">
 <!--
-body { scrollbar-base-color: #404040; scrollbar-arrow-color: #00ff33; }
+body { scrollbar-base-color: <%scrollbar_base_color%>; scrollbar-arrow-color: <%scrollbar_arrow_color%>; }
 a.menu:link,a.menu:visited { font-size:11; color:black; text-decoration:none; font-face:'Verdana,Helvetica,Arial'; font-weight:600; }
 a.menu:hover { font-size:11; color:#256A19; text-decoration:underline; font-face:'Verdana,Helvetica,Arial'; font-weight:600; }
 .submit { background-color:#7a9f54; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:white; font-weight:bold; }
Index: default/include_message_common_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_message_common_write.html,v
retrieving revision 1.13
retrieving revision 1.17
diff -b -u -r1.13 -r1.17
--- default/include_message_common_write.html   22 Oct 2001 18:36:16 -0000      1.13
+++ default/include_message_common_write.html   15 Mar 2002 00:47:22 -0000      1.17
@@ -45,6 +45,7 @@
     </td>
     <td align="left">
       <input type="text" name="user_username"<%if user_username%> value="<%user_username%>"<%endif%> class="button" tabindex=1>
+      <%body_font%>(<a href="gforum.cgi?do=user_list;<%hidden_query%>">View Member Directory</a>)<%/body_font%>
     </td>
   </tr>
 <%else%>
@@ -79,18 +80,31 @@
       <%/body_font%>
     </td>
     <td>
+      <input type="hidden" name="basic_editor" value="1">
 <%if message_style%>
       <select name="msg_style" size="1" class="button" tabindex=3>
 <%  if message_style == 1%>
-       <option value="1"><%GForum::language(FORUM_STYLE_MARKUP)%></option>
+       <option value="1"<%if msg_style_selected == 1%> selected<%set selected=1%><%endif%>>
+          <%GForum::language(FORUM_STYLE_MARKUP)%>
+        </option>
 <%  elsif message_style == 2%>
-       <option value="2"><%GForum::language(FORUM_STYLE_HTML)%></option>
+       <option value="2"<%if msg_style_selected == 2%> selected<%set selected=1%><%endif%>>
+          <%GForum::language(FORUM_STYLE_HTML)%>
+        </option>
 <%  elsif message_style == 3%>
-       <option value="3"<%if current_user_default_message_style == 3%> selected<%endif%>><%GForum::language(FORUM_STYLE_BOTH)%></option>
-       <option value="2"<%if current_user_default_message_style == 2%> selected<%endif%>><%GForum::language(FORUM_STYLE_HTML)%></option>
-       <option value="1"<%if current_user_default_message_style == 1%> selected<%endif%>><%GForum::language(FORUM_STYLE_MARKUP)%></option>
+       <option value="3"<%if msg_style_selected == 3%> selected<%set selected=1%><%endif%>>
+          <%GForum::language(FORUM_STYLE_BOTH)%>
+        </option>
+       <option value="2"<%if msg_style_selected == 2%> selected<%set selected=1%><%endif%>>
+          <%GForum::language(FORUM_STYLE_HTML)%>
+        </option>
+       <option value="1"<%if msg_style_selected == 1%> selected<%set selected=1%><%endif%>>
+          <%GForum::language(FORUM_STYLE_MARKUP)%>
+        </option>
 <%  endif%>
-       <option value="0"><%GForum::language(FORUM_STYLE_PLAIN)%></option>
+       <option value="0"<%unless selected%> selected<%endunless%>>
+          <%GForum::language(FORUM_STYLE_PLAIN)%>
+        </option>
       </select>
 <%  if message_style == 1 or message_style == 3%>
       &nbsp;&nbsp;&nbsp;&nbsp;
@@ -122,6 +136,11 @@
       <input type="button" class="button" name="markup_tag_email" tabindex=30 value="email" onClick="javascript: addTag(this.value); this.value = (this.value == 'email' ? '/email' : 'email');">
       <input type="button" class="button" name="markup_tag_url"   tabindex=30 value="url"   onClick="javascript: addTag(this.value); this.value = (this.value == 'url'   ? '/url'   : 'url');">
       <br>
+<%if is_ie and ie_version >= 5.5%>
+      <br><br>
+      <input type="submit" class="button" name="do=<%this_do%>;advanced_editor=1;advanced_editor_switch=1;message=<%parent_msg_id%>" value="Switch to Advanced Editor">
+<%endif%>
+      <br>
       <%body_font%>
        &nbsp;<input type="checkbox" name="msg_append_signature" value="1"<%if msg_append_signature%> checked<%endif%> tabindex=5>
        &nbsp;Append signature to message<br>
@@ -144,20 +163,20 @@
 <%GForum::Utils::new_alternation(attachments)%>
 <%loop attachments%>
        <tr bgcolor="<%GForum::Utils::alternation(attachments, $odd_color, $even_color)%>">
-         <td>
+         <td<%unless first%> style="border-top: 1px solid <%dark_beige%>"<%endunless%>>
            <img src="<%GForum::Attachment::icon($att_content, $att_filename)%>">
          </td>
-         <td style="border-right:1px solid <%dark_beige%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top: 1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%att_filename%>
            <%/body_font%>
          </td>
-         <td style="border-right:1px solid <%dark_beige%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top: 1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%GForum::Attachment::friendly_size($att_size)%>
            <%/body_font%>
          </td>
-         <td align="right">
+         <td align="right"<%unless first%> style="border-top: 1px solid <%dark_beige%>"<%endunless%>>
            <input type="submit" name="do=message_attachment_delete;att_id=<%att_id%>;redo=<%this_do%>" value="Delete Attachment" class="button" tabindex=6>
          </td>
        </tr>
Index: default/include_message_display.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_message_display.html,v
retrieving revision 1.9
retrieving revision 1.11
diff -b -u -r1.9 -r1.11
--- default/include_message_display.html        14 Oct 2001 03:42:49 -0000      1.9
+++ default/include_message_display.html        15 Mar 2002 00:47:22 -0000      1.11
@@ -22,7 +22,7 @@
   <%top_row%>
     <td colspan="2">
       <%top_row_font%>
-       <b><%msg_subject%></b>
+       <b><%msg_subject%></b><br>
       <%/top_row_font%>
     </td>
   </tr>
@@ -77,7 +77,7 @@
     </td>
     <td>
       <%body_font%>
-       <a href="gforum.cgi/<%messatt_filename_escaped%>?do=message_attachment;messatt_id=<%messatt_id%>;<%hidden_query%>">
+       <a href="gforum.cgi?do=message_attachment;messatt_id=<%messatt_id%>;<%hidden_query%>">
          <%messatt_filename%>
        </a>
        (<%GForum::Attachment::friendly_size($messatt_size)%>)
Index: default/include_message_html_common_write.html
===================================================================
RCS file: default/include_message_html_common_write.html
diff -N default/include_message_html_common_write.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/include_message_html_common_write.html      13 Mar 2002 01:21:50 -0000      1.4
@@ -0,0 +1,149 @@
+<%--
+
+File
+====
+include_message_common_write.html
+
+Description
+===========
+Every page involving writing a message uses this common page
+as an include for the actualy display.
+
+--%>
+<%if ie_version >= 6%><object id="dlg" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object><%endif%>
+<script language="Javascript">
+<!--
+
+var privateMessage = 1;
+
+<%include editor.js%>
+
+// -->
+</script>
+<%if attachment_error%>
+<font color="red">Your attachment was not uploaded successfully: <%attachment_error%><%endif%>
+<input type="hidden" name="temp_id" value="<%temp_id%>">
+<table border="0" cellspacing="0" cellpadding="4" width="100%">
+
+<%if ask_username%>
+  <tr>
+    <td align="right" width="125">
+      <%body_font%>
+       Recipient:<br> 
+      <%/body_font%>
+    </td>
+    <td align="left">
+      <input type="text" name="user_username"<%if user_username%> value="<%user_username%>"<%endif%> class="button" tabindex=1>
+      <%body_font%>(<a href="gforum.cgi?do=user_list;<%hidden_query%>">View Member Directory</a>)<%/body_font%>
+    </td>
+  </tr>
+<%else%>
+  <tr>
+    <td align="right" width="125">
+      <%body_font%>
+       Recipient:<br>
+      <%/body_font%>
+    </td>
+    <td>
+      <input type="hidden" name="user" value="<%user_id%>">
+      <%body_font%>
+       <%nbsp user_username%>
+      <%/body_font%>
+    </td>
+  </tr>
+<%endif%>
+  <tr>
+    <td align="right">
+      <%body_font%>
+       Subject:
+      <%/body_font%>
+    </td>
+    <td>
+      <input type="text" name="msg_subject" size="60" value="<%msg_subject%>" class="button" tabindex=2>
+    </td>
+  </tr>
+  <tr>
+    <td align="right">
+      <%body_font%>
+       Message Style:
+      <%/body_font%>
+    </td>
+    <td>
+      <input type="hidden" name="msg_style" value="1">
+      <input type="hidden" name="advanced_editor" value="1">
+      <%body_font%>
+        <%GForum::language(FORUM_STYLE_MARKUP)%>
+      <%/body_font%>
+    </td>
+  </tr>
+    </td>
+  </tr>
+  <tr>
+    <td align="right" valign="top">
+      <%body_font%>
+       Post:<br>
+      <%/body_font%>
+<%include include_smilies_write.html%>
+    </td>
+    <td>
+      <input type="hidden" name="msg_body_html" value="<%msg_body%>">
+      <input type="hidden" name="msg_body" value="<%orig_msg_body%>">
+      <iframe name="editor_iframe" id="editor_iframe" width="100%" height="300" onLoad="initOuterIFrame()" style="visibility: hidden"></iframe>
+      <br><br><br>
+      <input type="submit" class="button" name="do=<%this_do%>;basic_editor=1;basic_editor_switch=1;message=<%parent_msg_id%>" value="Switch to Basic Editor">
+      <br>
+      <%body_font%>
+       &nbsp;<input type="checkbox" name="msg_append_signature" value="1"<%if msg_append_signature%> checked<%endif%> tabindex=5>
+       &nbsp;Append signature to message<br>
+      <%/body_font%>
+    </td>
+  </tr>
+
+<% --
+The following loops through attachments that are either going to be added with the message.
+    The following variables are available:
+       - att_id - the attachment ID of the post (in the temp attachment directory)
+       - att_filename - the filename of the attachment
+       - att_size - the size of the attachment in bytes. Use <%GForum::Attachment::friendly_size($att_size)%>
+                    to get a "friendly" size such as "66.3 KB" instead of "67890".
+       - att_content - the content type of the file (such as text/html for .html files). Use <%GForum::Attachment::icon($att_content, $att_filename)%> to get the web path to the appropriate icon.
+-- %>
+  <tr>
+    <td colspan="2">
+      <%list_table%>
+<%GForum::Utils::new_alternation(attachments)%>
+<%loop attachments%>
+       <tr bgcolor="<%GForum::Utils::alternation(attachments, $odd_color, $even_color)%>">
+         <td<%unless first%> style="border-top: 1px solid <%dark_beige%>"<%endunless%>>
+           <img src="<%GForum::Attachment::icon($att_content, $att_filename)%>">
+         </td>
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top: 1px solid <%dark_beige%><%endunless%>">
+           <%body_font%>
+             <%att_filename%>
+           <%/body_font%>
+         </td>
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top: 1px solid <%dark_beige%><%endunless%>">
+           <%body_font%>
+             <%GForum::Attachment::friendly_size($att_size)%>
+           <%/body_font%>
+         </td>
+         <td align="right"<%unless first%> style="border-top: 1px solid <%dark_beige%>"<%endunless%>>
+           <input type="submit" name="do=message_attachment_delete;att_id=<%att_id%>;redo=<%this_do%>" value="Delete Attachment" class="button" tabindex=6>
+         </td>
+       </tr>
+<%endloop%>
+      </table>
+    </td>
+  </tr>
+<%if can_attach%>
+  <tr bgcolor="<%medium_beige%>">
+    <td colspan="2">
+      <%body_font%>
+       Attachment:
+        <input type="file" name="msg_attachment" class="button" tabindex=6>
+        <input type="submit" name="do=message_attachment_upload;redo=<%this_do%>" value="Upload attachment" class="button" tabindex=6>
+      <%/body_font%>
+    </td>
+  </tr>
+<%endif%>
+</table>
Index: default/include_paging.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_paging.html,v
retrieving revision 1.6
retrieving revision 1.9
diff -b -u -r1.6 -r1.9
--- default/include_paging.html 8 Oct 2001 02:03:30 -0000       1.6
+++ default/include_paging.html 13 Mar 2002 01:25:19 -0000      1.9
@@ -10,42 +10,28 @@
 see on any page having too many items to display on one
 screen.

+Note - as of Gossamer Forum 1.1.2, this is primarily done
+through a function call (GForum::GUI::draw) to optimize
+paging performance and simplify the paging.
 --%>
-<%unless this_do eq post_view_flat and mh == -1%>
-<%  GForum::Utils::paging($num_page_items, $mh, $this_page, 9, 'use ...')%>

-<%  unless top_page = 1%>
-<%    if this_page = 1%>
-<img src="<%image_url%>/first_grey.gif" border="0" width="17" height="11" alt="First page">
-<img src="<%image_url%>/prev_grey.gif" border="0" width="10" height="11" alt="Previous page">
-<%    else%>
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=1;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><img src="<%image_url%>/first.gif" border="0" width="17" height="11" alt="First page"></a>
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=<%this_page - 1%>;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><img src="<%image_url%>/prev.gif" border="0" width="10" height="11" alt="Previous page"></a>
-<%    endif%>
-
-<%    loop paging%>
-<%      if is_current_page%>
-<b><%page_num%></b>
-<%      else%>
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=<%page_num%>;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><%page_num%></a>
-<%      endif%>
-<%    endloop%>
-
-<%    if dotdotdot%>
-...
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=<%top_page%>;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><%top_page%></a>
-<%    endif%>
-
-<%    if this_page = $top_page%>
-<img src="<%image_url%>/next_grey.gif" border="0" width="10" height="11" alt="Next page">
-<img src="<%image_url%>/last_grey.gif" border="0" width="17" height="11" alt="Last page">
-<%    else%>
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=<%this_page + 1%>;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><img src="<%image_url%>/next.gif" border="0" width="10" height="11" alt="Next page"></a>
-<a href="gforum.cgi?do=<%this_do%>;<%if this_do eq post_view_flat%>post=<%root_id%>;<%elsif this_do eq search_results%><%search_query%>;<%elsif forum_id%>forum=<%forum_id%>;<%endif%><%if sent_num_messages%>sent_<%endif%>page=<%top_page%>;<%if sb%>sb=<%sb%>;<%endif%><%if sent_sb%>sent_sb=<%sent_sb%>;<%endif%><%if so%>so=<%so%>;<%endif%><%if sent_so%>sent_so=<%sent_so%>;<%endif%><%if mh%>mh=<%mh%>;<%endif%><%hidden_query%>"><img src="<%image_url%>/last.gif" border="0" width="17" height="11" alt="Last page"></a>
-<%    endif%>
-<%    if this_do eq post_view_flat%>
-&nbsp;<a href="gforum.cgi?do=post_view_flat;post=<%root_id%>;page=1;<%if sb%>sb=<%sb%>;<%endif%><%if so%>so=<%so%>;<%endif%>mh=-1;<%hidden_query%>">View All</a>
-<%    endif%>
-<%  else%>&nbsp;
-<%  endunless%>
-<%endunless%>
+<%GForum::GUI::draw(
+draw => paging,
+first      => '<img src="$image_url/first.gif" border="0" width="17" height="11" alt="First page">',
+first_grey => '<img src="$image_url/first_grey.gif" border="0" width="17" height="11" alt="First page">',
+prev       => '<img src="$image_url/prev.gif" border="0" width="10" height="11" alt="Previous page">',
+prev_grey  => '<img src="$image_url/prev_grey.gif" border="0" width="10" height="11" alt="Previous page">',
+next       => '<img src="$image_url/next.gif" border="0" width="10" height="11" alt="Next page">',
+next_grey  => '<img src="$image_url/next_grey.gif" border="0" width="10" height="11" alt="Next page">',
+last       => '<img src="$image_url/last.gif" border="0" width="17" height="11" alt="Last page">',
+last_grey  => '<img src="$image_url/last_grey.gif" border="0" width="17" height="11" alt="Last page">',
+view_all   => 'View All',
+pages      => 9,
+'...'      => '...',
+'first_...' => 1,
+'last_...'  => 1,
+before_page    => '',
+after_page     => '',
+before_current => '<b>',
+after_current  => '</b>',
+)%>
Index: default/include_post_common_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_post_common_write.html,v
retrieving revision 1.24
retrieving revision 1.30
diff -b -u -r1.24 -r1.30
--- default/include_post_common_write.html      16 Dec 2001 00:17:46 -0000      1.24
+++ default/include_post_common_write.html      4 Mar 2002 03:51:06 -0000       1.30
@@ -33,11 +33,15 @@
 </script>

 <%if attachment_error%>
-<%body_font%><font color=red>Your attachment did not upload: <%attachment_error%></font><%/body_font%>
+<%body_font%><font color=red>Your attachment did not upload: <%attachment_error%></font><%/body_font%><br>
 <%endif%>

 <%if post_error_no_subject%>
-<%body_font%><font color="red">Unable to post: You must enter a subject</font><%/body_font%>
+<%body_font%><font color="red">Unable to post: You must enter a subject</font><%/body_font%><br>
+<%endif%>
+
+<%if post_error_bad_guest_username%>
+<%body_font%><font color="red">Unable to post: Invalid guest username: <%post_error_bad_guest_username%></font><%/body_font%><br>
 <%endif%>

 <input type="hidden" name="temp_id" value="<%temp_id%>">
@@ -66,6 +70,10 @@
        <option value="<%user_id%>"<%if selected%> selected<%endif%>><%nbsp user_username%></option>
 <%  endloop%>
       </select>
+<%GForum::Config::tpl_get('post_guest_custom_username')%>
+<%  if post_guest_custom_username%>
+      <input type="text" name="guest_username" class="button" tabindex=2 size=20 value="<%if guest_username%><%guest_username%><%endif%>">
+<%  endif%>
     </td>
   </tr>
   <tr>
@@ -191,7 +199,7 @@
        <input type="button" class="button" name="markup_tag_email" tabindex=30 value="email" onClick="javascript: addTag(this.value); this.value = (this.value == 'email' ? '/email' : 'email');">
        <input type="button" class="button" name="markup_tag_url"   tabindex=30 value="url"   onClick="javascript: addTag(this.value); this.value = (this.value == 'url'   ? '/url'   : 'url');">
        <br>
-        <%if forum_style >= 1%>
+        <%if forum_style % 2 and is_ie and ie_version >= 5.5%>
         <br>
         <input type="submit" class="button" name="do=<%this_do%>;advanced_editor=1;advanced_editor_switch=1" value="Switch to Advanced Editor">
         <%endif%>
@@ -229,20 +237,20 @@
       <%list_table%>
 <%  endif%>
        <tr bgcolor="<%if odd%><%light_beige%><%else%><%even_color%><%endif%>">
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <img src="<%GForum::Attachment::icon($att_content, $att_filename)%>">
          </td>
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%att_filename%>
            <%/body_font%>
          </td>
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%GForum::Attachment::friendly_size($att_size)%>
            <%/body_font%>
          </td>
-         <td style="border-top:1px solid <%darkbiege%>" align="right">
+         <td <%unless first%>style="border-top:1px solid <%dark_beige%>" <%endunless%>align="right">
            <input type="submit" class="button" tabindex=12 name="do=post_attachment_delete;att_type=<%att_type%>;att_id=<%att_id%>;redo=<%this_do%>" value="Delete attachment">
          </td>
        </tr>
Index: default/include_post_display.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_post_display.html,v
retrieving revision 1.35
retrieving revision 1.39
diff -b -u -r1.35 -r1.39
--- default/include_post_display.html   16 Dec 2001 07:08:58 -0000      1.35
+++ default/include_post_display.html   4 Mar 2002 03:50:09 -0000       1.39
@@ -23,7 +23,7 @@
       <%body_font%><small>
        <b>
         <%if user_id%>
-         <a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>">
+         <a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
            <big><%nbsp post_username%></big>
          </a>
         <%else%>
@@ -59,6 +59,10 @@
 <%  endif%>
 <%endif%>
         <br>
+<%if this_do eq post_view_threaded or this_do eq post_view_flat%><%if is_ie and ie_version >= 4%>
+        <a href="javascript: postShortcut(<%post_id%>)">Copy Shortcut</a>
+        <br>
+<%endif%><%endif%>

 <%-- Moderator/Administrator functionality --%>
 <%if user_perm_moderator and not preview and not deleteview and not hide_post_menu%>
@@ -126,31 +130,16 @@
          </td>
          <td valign="top" align="right">
            <%body_font%><b>
-<%unless preview or deleteview or hide_post_menu or post_deleted%>
-
-<%  if not post_locked or user_perm_moderator%>
-<%    if user_perm_edit or user_perm_moderator%>
-             <a href="gforum.cgi?do=post_edit;post=<%post_id%>;<%hidden_query%>">Edit</a> |
-<%    endif%>
-<%    if user_perm_delete or user_perm_moderator%>
-<%      unless post_deleted%>
-             <a href="gforum.cgi?do=post_delete_confirm;post=<%post_id%>;<%hidden_query%>">Delete</a> |
-<%      endunless%>
-<%    endif%>
-<%    if user_forum_permission < 4%>
-             Can't Post
-<%    else%>
-<%      if forum_style % 2%><%-- This is true if the forum allows markup --%>
-              <a href="gforum.cgi?do=post_reply_write;quote=1;parent_post_id=<%post_id%>;<%hidden_query%>">Quote</a> |
-<%      endif%>
-             <a href="gforum.cgi?do=post_reply_write;parent_post_id=<%post_id%>;<%hidden_query%>">Reply</a>
-<%    endif%>
-<%  else%>
-       &nbsp;
-<%  endif%>
-<%elseif post_deleted and user_perm_moderator%><%-- Show moderators the delete link so they can delete it completely --%>
-        <a href="gforum.cgi?do=post_delete_confirm;post=<%post_id%>;<%hidden_query%>">Delete</a>
-<%endunless%>
+<%GForum::GUI::draw(
+    draw      => post_display_options,
+    separator => " | ",
+    edit      => "Edit",
+    delete    => "Delete",
+    cant_post => "Can't Post",
+    quote     => "Quote",
+    reply     => "Reply",
+    a_attribs => ""
+)%>
       </b><%/body_font%>
          </td>
         </tr>
@@ -185,7 +174,7 @@
     </td>
     <td valign="top" style="border-top: 1px solid <%dark_beige%>">
       <%body_font%>
-       <a href="gforum.cgi<%unless is_iis%>/<%postatt_filename_escaped%><%endunless%>?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
+       <a href="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
          <img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
          <%postatt_filename%>
        </a>
Index: default/include_post_html_common_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_post_html_common_write.html,v
retrieving revision 1.6
retrieving revision 1.12
diff -b -u -r1.6 -r1.12
--- default/include_post_html_common_write.html 16 Dec 2001 00:17:46 -0000      1.6
+++ default/include_post_html_common_write.html 4 Mar 2002 03:51:06 -0000       1.12
@@ -12,85 +12,27 @@
 editor for writing markup posts.

 --%>
+<%if ie_version >= 6%><object id="dlg" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object><%endif%>
 <script language="Javascript">
 <!--

-var Faces = {
-    ':)'      : '<%image_url%>/smile.gif',
-    ';)'      : '<%image_url%>/wink.gif',
-    ':('      : '<%image_url%>/frown.gif',
-    ':P'      : '<%image_url%>/tongue.gif',
-    'cool'    : '<%image_url%>/cool.gif',
-    'blush'   : '<%image_url%>/blush.gif',
-    'angelic' : '<%image_url%>/angelic.gif',
-    'crazy'   : '<%image_url%>/crazy.gif',
-    'mad'     : '<%image_url%>/mad.gif',
-    'shocked' : '<%image_url%>/shocked.gif',
-    'laugh'   : '<%image_url%>/laugh.gif',
-    ':/'      : '<%image_url%>/unsure.gif',
-    ':|'      : '<%image_url%>/unimpressed.gif',
-    'sly'     : '<%image_url%>/sly.gif',
-    'pirate'  : '<%image_url%>/pirate.gif'
-};
-var Edit = false;
-var SInterval;
-function load_html () {
-    document.post.onsubmit = retrieve_html;
-    var url = window.location.protocol + '//' + window.location.hostname + window.location.pathname + '?<%hidden_query%>';
-    Edit = new iframe.Editor ({
-        debug      : 0,
-        base_url   : url,
-        image_url  : url + ';do=editor_image',
-        tb_hide    : ['Table'],
-        tb_delete  : ['Form', 'Positioning']
-    });
-    if ( document.post.post_message.value ) {
-        Edit.set_editor_html(document.post.post_message.value);
-    }
-    else {
-        Edit.set_editor_html('<HTML><body><\/body><\/html>');
-    }
-    Edit.init();
-    SInterval = setInterval("show_smilies()", 500);
-}
-function show_smilies () {
-    if ( Edit.initialized ) {
-        document.all.smilies.style.visibility = "visible";
-        clearInterval(SInterval)
-    }
-}
-function retrieve_html () {
-    document.post.post_message.value = Edit.get_editor_html();
-}
-
-function addTag (face) {
-    if ( !Edit.initialized || !Faces[face] ) return;
-    Edit.insert_html( '<img src="' + Faces[face] + '">' );
-    Edit.control.focus();
-}
-
-// This handles the tabing - if you change the post icon selection, the
-// tabIndex needs to be changed as well so that we don't have to tab through all
-// of the icons if going through the page with tab
-function updateTab (selected_val) {
-  var col = document.getElementsByName("post_icon");
-  for (i = 0; i < col.length; i++) {
-    if (selected_val == col[i].value)
-      col[i].tabIndex = 5;
-    else
-      col[i].tabIndex = 0;
-  }
-}
+var privateMessage = 0; // Needed for supporting the editor in private messages
+
+<%include editor.js%>

 // -->
 </script>

 <%if attachment_error%>
-<%body_font%><font color=red>Your attachment did not upload: <%attachment_error%></font><%/body_font%>
+<%body_font%><font color=red>Your attachment did not upload: <%attachment_error%></font><%/body_font%><br>
 <%endif%>

 <%if post_error_no_subject%>
-<%body_font%><font color="red">Unable to post: You must enter a subject</font><%/body_font%>
+<%body_font%><font color="red">Unable to post: You must enter a subject</font><%/body_font%><br>
+<%endif%>
+
+<%if post_error_bad_guest_username%>
+<%body_font%><font color="red">Unable to post: Invalid guest username: <%post_error_bad_guest_username%></font><%/body_font%><br>
 <%endif%>

 <input type="hidden" name="temp_id" value="<%temp_id%>">
@@ -118,6 +60,10 @@
        <option value="<%user_id%>"<%if selected%> selected<%endif%>><%nbsp user_username%></option>
 <%  endloop%>
       </select>
+<%GForum::Config::tpl_get('post_guest_custom_username')%>
+<%  if post_guest_custom_username%>
+      <input type="text" name="guest_username" class="button" tabindex=2 size=20 value="<%if guest_username%><%guest_username%><%endif%>">
+<%  endif%>
     </td>
   </tr>
   <tr>
@@ -182,15 +128,13 @@
       <%body_font%>
        Post:<br>
       <%/body_font%>
-<%if forum_style_selected % 2%><%-- Only show the smilies if something with markup is set --%>
-<div id=smilies style="visibility: hidden">
 <%include include_smilies_write.html%>
-</div>
-<%endif%>
     </td>
     <td>
-      <input type="hidden" name="post_message" value="<%post_message%>">
-      <iframe src="gforum.cgi?<%hidden_query%>;do=editor_iframe" id="iframe" width="100%" height="300"></iframe><br>
+      <input type="hidden" name="post_message_html" value="<%post_message%>">
+      <input type="hidden" name="post_message" value="<%orig_post_message%>">
+      <iframe name="editor_iframe" id="editor_iframe" width="100%" height="300" onLoad="initOuterIFrame()" style="visibility: hidden"></iframe>
+      <br>
        <br><br>
         <input type="submit" class="button" name="do=<%this_do%>;basic_editor=1;basic_editor_switch=1" value="Switch to Basic Editor">
 <%if current_user_id%>
@@ -227,20 +171,20 @@
       <%list_table%>
 <%  endif%>
        <tr bgcolor="<%if odd%><%light_beige%><%else%><%even_color%><%endif%>">
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <img src="<%GForum::Attachment::icon($att_content, $att_filename)%>">
          </td>
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%att_filename%>
            <%/body_font%>
          </td>
-         <td style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%darkbiege%>">
+         <td style="border-right:1px solid <%dark_beige%><%unless first%>; border-top:1px solid <%dark_beige%><%endunless%>">
            <%body_font%>
              <%GForum::Attachment::friendly_size($att_size)%>
            <%/body_font%>
          </td>
-         <td style="border-top:1px solid <%darkbiege%>" align="right">
+         <td <%unless first%>style="border-top:1px solid <%dark_beige%>" <%endunless%>align="right">
            <input type="submit" class="button" tabindex=12 name="do=post_attachment_delete;att_type=<%att_type%>;att_id=<%att_id%>;redo=<%this_do%>" value="Delete attachment">
          </td>
        </tr>
Index: default/include_thread_display.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/include_thread_display.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -u -r1.6 -r1.7
--- default/include_thread_display.html 23 Oct 2001 21:24:23 -0000      1.6
+++ default/include_thread_display.html 4 Mar 2002 04:01:20 -0000       1.7
@@ -47,10 +47,10 @@
     <td>
       <%body_font%>
 <%  if user_id%>
-       <a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>">
+       <a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
          <%if this_post%><b><%nbsp post_username%></b><%else%><%nbsp post_username%><%endif%>
        </a>
-<%    if current_user_id != $user_id%>
+<%    if current_user_id != $user_id and user_accept_privmsg and user_status%>
        <a href="gforum.cgi?do=message;username=<%escape_url post_username%>;<%hidden_query%>">
          <img src="<%image_url%>/message.gif" border=0 alt="Send a private message to <%post_username%>">
        </a>
Index: default/language.txt
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/language.txt,v
retrieving revision 1.30
retrieving revision 1.35
diff -b -u -r1.30 -r1.35
--- default/language.txt        16 Dec 2001 21:29:58 -0000      1.30
+++ default/language.txt        4 Mar 2002 03:54:43 -0000       1.35
@@ -1,3 +1,8 @@
+# This file contains a perl hash of the default language variables for the
+# 'default' template set. You should not edit this file manually, but use the
+# language editor in the admin panel instead. Changes will be saved in the
+# "local" directory.
+# vim:syn=perl
 {
   'ACTION_BAD' => 'No such action \'%s\'',
   'ACTION_MUST_LOGIN' => 'Guests are not authorized to access that page. Please login as a user',
@@ -12,6 +17,20 @@
   'ATTACHMENT_SYSTEM_ERROR' => 'A system error occured while attempting to save your attachment: %s',
   'ATTACHMENT_TOO_LARGE' => 'The attachment exceeds the maximum attachment size (%s)',
   'CATEGORY_DOES_NOT_EXIST' => 'The category you attempted to access does not exist',
+       'DATE_DAY_1' => 'Sunday',
+       'DATE_DAY_2' => 'Monday',
+       'DATE_DAY_3' => 'Tuesday',
+       'DATE_DAY_4' => 'Wednesday',
+       'DATE_DAY_5' => 'Thursday',
+       'DATE_DAY_6' => 'Friday',
+       'DATE_DAY_7' => 'Saturday',
+       'DATE_DAY_SHORT_1' => 'Sun',
+       'DATE_DAY_SHORT_2' => 'Mon',
+       'DATE_DAY_SHORT_3' => 'Tue',
+       'DATE_DAY_SHORT_4' => 'Wed',
+       'DATE_DAY_SHORT_5' => 'Thu',
+       'DATE_DAY_SHORT_6' => 'Fri',
+       'DATE_DAY_SHORT_7' => 'Sat',
   'DATE_FORMAT' => '%mmm% %d%, %yyyy%, %h%:%MM% %tt%',
   'DATE_MONTH_1' => 'January',
   'DATE_MONTH_10' => 'October',
@@ -37,20 +56,6 @@
   'DATE_MONTH_SHORT_7' => 'Jul',
   'DATE_MONTH_SHORT_8' => 'Aug',
   'DATE_MONTH_SHORT_9' => 'Sep',
-  'DATE_DAY_1' => 'Sunday',
-  'DATE_DAY_2' => 'Monday',
-  'DATE_DAY_3' => 'Tuesday',
-  'DATE_DAY_4' => 'Wednesday',
-  'DATE_DAY_5' => 'Thursday',
-  'DATE_DAY_6' => 'Friday',
-  'DATE_DAY_7' => 'Saturday',
-  'DATE_DAY_SHORT_1' => 'Sun',
-  'DATE_DAY_SHORT_2' => 'Mon',
-  'DATE_DAY_SHORT_3' => 'Tue',
-  'DATE_DAY_SHORT_4' => 'Wed',
-  'DATE_DAY_SHORT_5' => 'Thu',
-  'DATE_DAY_SHORT_6' => 'Fri',
-  'DATE_DAY_SHORT_7' => 'Sat',
   'FILESIZE_BYTES' => 'B',
   'FILESIZE_KILOBYTES' => 'KB',
   'FILESIZE_MEGABYTES' => 'MB',
@@ -60,6 +65,7 @@
   'FORUM_STYLE_MARKUP' => 'Markup',
   'FORUM_STYLE_PLAIN' => 'Plain Text Only',
   'LOGIN_DISABLED' => 'Your account is not enabled',
+       'LOGIN_FAILED' => 'You could not be logged in. Perhaps you tried to log in with cookies, but cookies are disabled?',
   'LOGIN_INVALID_USERNAME_PASSWORD' => 'Invalid username/password combination entered',
   'LOGIN_NOT_VALIDATED' => 'Your signup has not been validated',
   'MESSAGE_DOES_NOT_EXIST' => 'The message you attempted to access does not exist',
@@ -82,24 +88,26 @@
   'POST_DELETED' => '<post deleted>',
   'POST_DOES_NOT_EXIST' => 'The post you attempted to access does not exist',
   'POST_EDIT_TIME_EXPIRED' => 'The edit/delete time for the post has expired',
-  'POST_REMOVE_NOT_MODERATOR' => 'Only moderators are permitted to completely remove posts',
   'POST_IS_DELETED' => 'The post you attempted to access has been deleted',
   'POST_LOCKED' => 'That thread has been locked',
   'POST_REGARDING' => 'Re: ',
+       'POST_REMOVE_NOT_MODERATOR' => 'Only moderators are permitted to completely remove posts',
   'PROFILE_INVALID_DATA' => 'Invalid data for the %s field',
   'PROFILE_PASSWORDS_DONT_MATCH' => 'The passwords you entered do not match',
   'SEARCH_NO_FORUMS' => 'You did not select any forums to search, or there are no forums available',
   'SEARCH_NO_RESULTS' => 'Your search did not return any results',
   'SEARCH_NO_TERM' => 'No search term specified',
   'SIGNUP_EMAIL_VALIDATION_FAILED' => 'Unable to send validation email: %s',
+        'SIGNUP_EMAIL_BANNED' => 'The e-mail address \'%s\' has been restricted',
   'SIGNUP_NO_EMAIL' => 'You did not enter a valid e-mail address',
   'SIGNUP_NO_PASSWORD' => 'You did not enter a password',
   'SIGNUP_NO_USERNAME' => 'You did not enter a username',
   'SIGNUP_PASSWORDS_DONT_MATCH' => 'The passwords you entered do not match',
-  'SIGNUP_USERNAME_EXISTS' => 'The username \'%s\' already exists. Please choose another',
+       'THREAD_DOES_NOT_EXIST' => 'The thread you attempted to access does not exist',
   'URL_INVALID' => 'You entered an invalid URL: \'%s\'',
   'USERNAME_CANT_CHANGE' => 'You are not permitted to change your username',
   'USERNAME_DOES_NOT_EXIST' => 'Username \'%s\' does not exist',
+       'USERNAME_EXISTS' => 'The username \'%s\' already exists. Please choose another',
   'USERNAME_INVALID_CHARS' => 'Username contains invalid characters',
   'USERNAME_LEADING_SPACES' => 'A username may not contain leading spaces',
   'USERNAME_NOT_ENTERED' => 'No username entered',
Index: default/login.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/login.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -r1.20 -r1.21
--- default/login.html  18 Dec 2001 01:47:04 -0000      1.20
+++ default/login.html  29 Jan 2002 01:14:35 -0000      1.21
@@ -91,7 +91,7 @@
          </td>
          <td align="left">
            <%body_font%>
-              <input type="checkbox" name="dont_use_cookies" value="1" tabindex=3 onClick="document.login.remember_me.checked = false"><%-- The JavaScript near the bottom of the page will set this to 0 if cookies are viable --%>
+          <input type="checkbox" name="dont_use_cookies" value="1" tabindex=3 onClick="document.login.remember_me.checked = false">
            <%/body_font%>
          </td>
        </tr>
Index: default/lost_password_enter_username.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/lost_password_enter_username.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -r1.11 -r1.12
--- default/lost_password_enter_username.html   18 Dec 2001 01:47:04 -0000      1.11
+++ default/lost_password_enter_username.html   19 Mar 2002 20:25:36 -0000      1.12
@@ -44,7 +44,7 @@
        <tr>
          <td colspan="2">
            <%body_font%>
-             If you have lost your password, Gossamer Forum can generate a new temporary
+             If you have lost your password, <%site_title%> can generate a new temporary
              password for you to log in with. Note that after logging in the temporary
              password will be lost so you should change your password immediately upon
              logging in with the temporary password. The temporary password will be sent
Index: default/markup_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/markup_help.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -r1.11 -r1.12
--- default/markup_help.html    18 Dec 2001 02:23:14 -0000      1.11
+++ default/markup_help.html    14 Mar 2002 21:55:56 -0000      1.12
@@ -45,11 +45,12 @@

 <%GForum::Utils::new_alternation(markup)%>
 <%loop markup_loop%>
+<% unless has_args%><%-- Unfortunately, dynamically displaying markup that takes arguments cannot be easily done --%>
        <tr bgcolor="<%GForum::Utils::alternation(markup, $odd_color, $even_color)%>">
          <td style="border-right:1px solid <%dark_beige%>">
            <%body_font%>
 <%  if has_closing%>
-             [<%tag%>] <%sample_text%> [/<%tag%>]
+             [<%tag%>]<%if tag eq ul or tag eq ol%> [li]<%endif%> <%sample_text%> <%if tag eq ul or tag eq ol%>[/li] <%endif%>[/<%tag%>]
 <%  else%>
              [<%tag%>]
 <%  endif%>
@@ -57,13 +58,14 @@
          <td>
            <%body_font%>
 <%  if has_closing%>
-             <%html%> <%sample_text%> <%closing%>
+             <%html%><%if tag eq ul or tag eq ol%> <li><%endif%> <%sample_text%> <%if tag eq ul or tag eq ol%></li> <%endif%><%closing%>
 <%  else%>
              <%html%>
 <%  endif%>
            <%/body_font%>
          </td>
        </tr>
+<% endunless%>
 <%endloop%>

 <%GForum::Config::tpl_get(markup_allow_custom_color, markup_allow_image, markup_allow_url, markup_allow_font, markup_allow_size)%>
Index: default/message.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/message.html,v
retrieving revision 1.15
retrieving revision 1.17
diff -b -u -r1.15 -r1.17
--- default/message.html        18 Dec 2001 01:47:04 -0000      1.15
+++ default/message.html        5 May 2002 20:52:39 -0000       1.17
@@ -17,6 +17,13 @@
 <%include include_css.html%>
 </head>

+<%-- Figure out if we're going to use the advanced editor --%>
+<%if advanced_editor and is_ie and ie_version >= 5.5%>
+<%set user_ae = 1%>
+<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5.5%>
+<%set user_ae = 1%>
+<%endif%>
+
 <%body_tag%>
 <center>
 <%include include_header.html%>
@@ -50,7 +57,11 @@
   </tr>
   <tr>
     <td colspan="2" align="left">
+<%  if user_username%>
       <%body_font%><font color="red">No such user: <%nbsp user_username%></font><%/body_font%><br>
+<%  else%>
+      <%body_font%><font color="red">No recipient entered!</font><%/body_font%><br>
+<%  endif%>
 <%elsif user_no_privmsg%>
     </td>
   </tr>
@@ -73,7 +84,11 @@
        </tr>
        <tr>
          <td>
+<%if user_ae%>
+<%include include_message_html_common_write.html%>
+<%else%>
 <%include include_message_common_write.html%>
+<%endif%>
 <script language="JavaScript">
 <!--
 <%if ask_username%>
Index: default/message_list.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/message_list.html,v
retrieving revision 1.27
retrieving revision 1.28
diff -b -u -r1.27 -r1.28
--- default/message_list.html   18 Dec 2001 01:47:04 -0000      1.27
+++ default/message_list.html   4 Mar 2002 03:56:52 -0000       1.28
@@ -96,9 +96,9 @@
 <%else%>
        You have <b><%num_messages%></b> message<%if num_messages != 1%>s<%endunless%>:
        <small><b>
-         &nbsp;&#149;&nbsp; <%num_new%> NEW <img src="<%image_url%>/unread.gif" border=0>
-         &nbsp;&#149;&nbsp; <%num_read + $num_replied%> READ <img src="<%image_url%>/read.gif" border=0>
-         &nbsp;&#149;&nbsp; <%num_replied%> REPLIED <img src="<%image_url%>/replied.gif" border=0>
+         &nbsp;&#149;&nbsp; <%num_new%> NEW <img src="<%image_url%>/unread.gif" border=0 width="15" height="11">
+         &nbsp;&#149;&nbsp; <%num_read + $num_replied%> READ <img src="<%image_url%>/read.gif" border=0 width="15" height="11">
+         &nbsp;&#149;&nbsp; <%num_replied%> REPLIED <img src="<%image_url%>/replied.gif" border=0 width="14" height="13">
        </b></small>
                <br>&nbsp;
        <%list_table%>
@@ -123,28 +123,28 @@
            <td style="border-right: 1px solid <%dark_beige%>" width=1>
              <a href="gforum.cgi?do=<%this_do%>;sb=msg_status;so=<%if sb eq msg_status and so eq ASC%>DESC<%else%>ASC<%endif%>;mh=<%mh%>;<%hidden_query%>">
                <%top_row_font%>
-                 <%if sb eq msg_status%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>Status</nobr>
+                 <%if sb eq msg_status%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>Status</nobr>
                <%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>" width="100%"><%-- Stretch this out as much as possible --%>
              <a href="gforum.cgi?do=<%this_do%>;sb=msg_subject;so=<%if sb eq msg_subject and so eq ASC%>DESC<%else%>ASC<%endif%>;mh=<%mh%>;<%hidden_query%>">
                <%top_row_font%>
-                 <%if sb eq msg_subject%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>Subject</nobr>
+                 <%if sb eq msg_subject%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>Subject</nobr>
                <%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>" width=1>
              <a href="gforum.cgi?do=<%this_do%>;sb=msg_username;so=<%if sb eq msg_username and so eq ASC%>DESC<%else%>ASC<%endif%>;mh=<%mh%>;<%hidden_query%>">
                <%top_row_font%>
-                 <%if sb eq msg_username%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>From</nobr>
+                 <%if sb eq msg_username%><nobr><img src="<%image_url%>/<%if so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>From</nobr>
                <%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>" width=1>
              <a href="gforum.cgi?do=<%this_do%>;sb=msg_time;so=<%if sb eq msg_time and so eq DESC%>ASC<%else%>DESC<%endif%>;mh=<%mh%>;<%hidden_query%>">
                <%top_row_font%>
-                 <%if sb eq msg_time%><nobr><img src="<%image_url%>/<%if so eq 'DESC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>Received</nobr>
+                 <%if sb eq msg_time%><nobr><img src="<%image_url%>/<%if so eq 'DESC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>Received</nobr>
                <%/top_row_font%>
              </a>
            </td>
@@ -161,11 +161,11 @@
          <tr bgcolor="<%GForum::Utils::alternation(messages, $odd_color, $even_color)%>">
            <td bgcolor="white" style="border-right: 1px solid <%dark_beige%>;">
 <%  if msg_status == 0%>
-             <img src="<%image_url%>/unread.gif" border="0" alt="New">
+             <img src="<%image_url%>/unread.gif" border="0" alt="New" width="15" height="11">
 <%  elsif msg_status == 2%>
-             <img src="<%image_url%>/replied.gif" border="0" alt="Replied">
+             <img src="<%image_url%>/replied.gif" border="0" alt="Replied" width="14" height="13">
 <%  else%>
-             <img src="<%image_url%>/read.gif" border="0" alt="Read">
+             <img src="<%image_url%>/read.gif" border="0" alt="Read" width="15" height="11">
 <%  endif%>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>;">
@@ -246,17 +246,17 @@
          <%top_row%>
            <td style="border-right: 1px solid <%dark_beige%>" width="100%">
              <a href="gforum.cgi?do=<%this_do%>;sent_sb=msg_subject;sent_so=<%if sent_sb eq msg_subject and sent_so eq ASC%>DESC<%else%>ASC<%endif%>;mh=<%mh%>;<%hidden_query%>">
-               <%top_row_font%><nobr><%if sent_sb eq msg_subject%><img src="<%image_url%>/<%if sent_so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>Subject<nobr><%/top_row_font%>
+               <%top_row_font%><nobr><%if sent_sb eq msg_subject%><img src="<%image_url%>/<%if sent_so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>Subject<nobr><%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>" width=1>
              <a href="gforum.cgi?do=<%this_do%>;sent_sb=msg_username;sent_so=<%if sent_sb eq msg_username and sent_so eq ASC%>DESC<%else%>ASC<%endif%>;mh=<%mh%>;<%hidden_query%>">
-               <%top_row_font%><nobr><%if sent_sb eq msg_username%><img src="<%image_url%>/<%if sent_so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>To</nobr><%/top_row_font%>
+               <%top_row_font%><nobr><%if sent_sb eq msg_username%><img src="<%image_url%>/<%if sent_so eq 'ASC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>To</nobr><%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>" width=1>
              <a href="gforum.cgi?do=<%this_do%>;sent_sb=msg_time;sent_so=<%if sent_sb eq msg_time and sent_so eq DESC%>ASC<%else%>DESC<%endif%>;mh=<%mh%>;<%hidden_query%>">
-               <%top_row_font%><nobr><%if sent_sb eq msg_time%><img src="<%image_url%>/<%if sent_so eq 'DESC'%>down<%else%>up<%endif%>.gif" border="0">&nbsp;<%endif%>Sent</nobr><%/top_row_font%>
+               <%top_row_font%><nobr><%if sent_sb eq msg_time%><img src="<%image_url%>/<%if sent_so eq 'DESC'%>down<%else%>up<%endif%>.gif" border="0" width="14" height="11">&nbsp;<%endif%>Sent</nobr><%/top_row_font%>
              </a>
            </td>
            <td style="border-right: 1px solid <%dark_beige%>">
Index: default/message_reply_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/message_reply_write.html,v
retrieving revision 1.20
retrieving revision 1.22
diff -b -u -r1.20 -r1.22
--- default/message_reply_write.html    18 Dec 2001 01:47:04 -0000      1.20
+++ default/message_reply_write.html    11 Jan 2002 23:18:57 -0000      1.22
@@ -16,6 +16,13 @@
 <%if spellcheck%><%spellcheck_head%><%endif%>
 </head>

+<%-- Figure out if we're going to use the advanced editor --%>
+<%if advanced_editor and is_ie and ie_version >= 5.5%>
+<%set user_ae = 1%>
+<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5.5%>
+<%set user_ae = 1%>
+<%endif%>
+
 <%body_tag%>
 <%include include_header.html%>
 <center>
@@ -59,11 +66,12 @@
       <%list_table%>
        <%top_row%>
          <td align="right" width="100" valign="top">
+            <img src="<%image_url%>/clear_shim.gif" width=100 height=1><br>
            <%top_row_font%>
              Replying to:
            <%/top_row_font%>
          </td>
-         <td align="left">
+         <td align="left" width="100%">
            <%top_row_font%>
              "<%parent_msg_subject%>" by
              <a href="gforum.cgi?username=<%GT::CGI::escape($user_username)%>;<%hidden_query%>"><font color="white"><%nbsp user_username%></font></a>
@@ -71,7 +79,7 @@
          </td>
        </tr>
        <tr bgcolor="<%light_beige%>">
-         <td align="right" valign="top" width="100">
+         <td align="right" valign="top">
            <%body_font%>
              <b>Original Message:</b>
            <%/body_font%>
@@ -88,12 +96,11 @@
            <%hidden_form%>
            <input type="hidden" name="user" value="<%user_id%>">
            <input type="hidden" name="reply_to" value="<%parent_msg_id%>">
+<%if user_ae%>
+<%include include_message_html_common_write.html%>
+<%else%>
 <%include include_message_common_write.html%>
-<script language="JavaScript">
-<!--
-document.message.msg_body.focus();
--->
-</script>
+<%endif%>
          </td>
        </tr>
        <tr bgcolor="<%light_green%>">
Index: default/post_already_posted.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_already_posted.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -r1.4 -r1.5
--- default/post_already_posted.html    16 Dec 2001 00:17:46 -0000      1.4
+++ default/post_already_posted.html    7 Jan 2002 20:56:30 -0000       1.5
@@ -46,7 +46,7 @@
     <td colspan="2">
       <br>
 <%hidden_form%>
-      <select class="button" name=forum size=1>
+      <select class="button" name=jump size=1>
 <%GForum::Forum::jump_list($forum_id)%>
       </select>
       &nbsp;
Index: default/post_delete_confirm.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_delete_confirm.html,v
retrieving revision 1.11
retrieving revision 1.13
diff -b -u -r1.11 -r1.13
--- default/post_delete_confirm.html    18 Dec 2001 19:49:29 -0000      1.11
+++ default/post_delete_confirm.html    15 Mar 2002 00:47:22 -0000      1.13
@@ -12,6 +12,7 @@
 --%>
 <%GT::CGI::get_hash('GT::CGI')%>
 <%GForum::Post::View::get($post)%>
+<%unless post_id%><%set error = GForum::language(POST_DOES_NOT_EXIST)%><%include error.html%><%endparse%><%endunless%>
 <%set deleteview = 1%>
 <html>
 <head>
@@ -38,7 +39,6 @@
   <tr>
     <td colspan=2><br>
       <%hidden_form%>
-      <input type="hidden" name="post_id" value="<%post_id%>">
       <%body_font%>
        You have chosen to delete the following post:<br>
        <%include include_post_display.html%>
Index: default/post_detach_select.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_detach_select.html,v
retrieving revision 1.5
retrieving revision 1.7
diff -b -u -r1.5 -r1.7
--- default/post_detach_select.html     17 Dec 2001 00:38:48 -0000      1.5
+++ default/post_detach_select.html     15 Mar 2002 00:47:22 -0000      1.7
@@ -12,6 +12,7 @@
 --%>
 <%GT::CGI::get_hash('GT::CGI')%>
 <%GForum::Post::View::get($post_id)%>
+<%unless post_id%><%set error = GForum::language(POST_DOES_NOT_EXIST)%><%include error.html%><%endparse%><%endunless%>
 <html>
 <head>
 <title><%site_title%>: <%cat_full_name%>: <%forum_name%>: <%post_subject%>: Detach &amp; Move Thread</title>
@@ -38,7 +39,7 @@
     <td colspan=2><br>
       <%hidden_form%>
       <%body_font%>
-       You have chosen to detach the post '<a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><%post_subject%></a>' and its <%post_replies%> repl<%if post_replies == 1%>y<%else%>ies<%endif%>, started by <%if user_id%><a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%> on <%post_date%>.<br><br>
+       You have chosen to detach the post '<a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><%post_subject%></a>' and its <%post_replies%> repl<%if post_replies == 1%>y<%else%>ies<%endif%>, started by <%if user_id%><a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%> on <%post_date%>.<br><br>
         Detaching a post will turn that post into a new thread. You also have the option now to place the new thread into another forum.
        If you wish to move it to a new forum, you must select the forum to move the post to below.<br><br>
        <%GForum::Forum::moderator_tpl_options(without => $forum_id)%>
Index: default/post_detached.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_detached.html,v
retrieving revision 1.3
retrieving revision 1.5
diff -b -u -r1.3 -r1.5
--- default/post_detached.html  16 Dec 2001 00:17:46 -0000      1.3
+++ default/post_detached.html  4 Mar 2002 04:01:20 -0000       1.5
@@ -35,7 +35,7 @@
     <td colspan="2">
       <%body_font%>
        The post '<a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><%post_subject%></a>', written by
-       <%if user_id_fk%><a href="gforum.cgi?username=<%post_username%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>
+       <%if user_id_fk%><a href="gforum.cgi?<%if user_status%>username=<%post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>
        has been detached from its thread and turned into a new seperate thread.
 <%if forum_id != $old_forum_id%>
         The new thread was moved from the <a href="gforum.cgi?category=<%old_cat_id%>;<%hidden_query%>"><%old_cat_full_name%></a>: <a href="gforum.cgi?forum=<%old_forum_id%>;<%hidden_query%>"><%old_forum_name%></a> forum
@@ -52,7 +52,7 @@
     <td colspan="2">
       <br>
 <%hidden_form%>
-      <select class="button" name=forum size=1>
+      <select class="button" name=jump size=1>
 <%GForum::Forum::jump_list($old_forum_id)%>
       </select>
       &nbsp;
Index: default/post_edit.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_edit.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -u -r1.16 -r1.17
--- default/post_edit.html      17 Dec 2001 04:40:30 -0000      1.16
+++ default/post_edit.html      10 Jan 2002 09:00:31 -0000      1.17
@@ -44,9 +44,9 @@
     <td colspan="2">
       <%hidden_form%>
       <input type="hidden" name="post" value="<%post_id%>">
-<%if advanced_editor and is_ie and ie_version >= 5%>
+<%if advanced_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
-<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5%>
+<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
 <%else%>
 <%include include_post_common_write.html%>
Index: default/post_move_select.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_move_select.html,v
retrieving revision 1.11
retrieving revision 1.13
diff -b -u -r1.11 -r1.13
--- default/post_move_select.html       17 Dec 2001 00:38:48 -0000      1.11
+++ default/post_move_select.html       15 Mar 2002 00:47:22 -0000      1.13
@@ -12,6 +12,7 @@
 --%>
 <%GT::CGI::get_hash('GT::CGI')%>
 <%GForum::Post::View::get($root_id)%>
+<%unless post_id%><%set error = GForum::language(POST_DOES_NOT_EXIST)%><%include error.html%><%endparse%><%endunless%>
 <html>
 <head>
 <title><%site_title%>: <%cat_full_name%>: <%forum_name%>: <%post_subject%>: Move Thread</title>
@@ -38,7 +39,7 @@
     <td colspan=2><br>
       <%hidden_form%>
       <%body_font%>
-       You have chosen to move the thread '<a href="gforum.cgi?post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>"><%post_subject%></a>' containing <%post_replies%> repl<%if post_replies == 1%>y<%else%>ies<%endif%>, started by <%if user_id%><a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%> on <%post_date%>.<br><br>
+       You have chosen to move the thread '<a href="gforum.cgi?post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>"><%post_subject%></a>' containing <%post_replies%> repl<%if post_replies == 1%>y<%else%>ies<%endif%>, started by <%if user_id%><a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%> on <%post_date%>.<br><br>
        You must select the forum to move the post to.<br><br>
        <%GForum::Forum::moderator_tpl_options(without => $forum_id)%>
        <select name="forum_id" size=1 class=button>
Index: default/post_moved.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_moved.html,v
retrieving revision 1.9
retrieving revision 1.11
diff -b -u -r1.9 -r1.11
--- default/post_moved.html     17 Dec 2001 00:38:48 -0000      1.9
+++ default/post_moved.html     4 Mar 2002 04:01:20 -0000       1.11
@@ -34,7 +34,7 @@
     <td colspan="2">
       <%body_font%>
        The thread '<a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><%post_subject%></a>', written by
-       <%if user_id_fk%><a href="gforum.cgi?username=<%post_username%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>
+       <%if user_id_fk%><a href="gforum.cgi?<%if user_status%>username=<%post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>
        has been moved from the <%GForum::Category::full_name_linked($old_cat_id, ': ', '', '', 'gforum.cgi?', $hidden_query)%>: <a href="gforum.cgi?forum=<%old_forum_id%>;<%hidden_query%>"><%old_forum_name%></a> forum
        to the <%GForum::Category::full_name_linked($cat_id, ': ', '', '', 'gforum.cgi?', $hidden_query)%>: <a href="gforum.cgi?forum=<%forum_id%>;<%hidden_query%>"><%forum_name%></a> forum.
        You will be automatically redirected to <%old_cat_full_name%>: <%old_forum_name%> shortly.
@@ -48,7 +48,7 @@
     <td colspan="2">
       <br>
 <%hidden_form%>
-      <select class="button" name=forum size=1>
+      <select class="button" name=jump size=1>
 <%GForum::Forum::jump_list($old_forum_id)%>
       </select>
       &nbsp;
Index: default/post_post.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_post.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -u -r1.16 -r1.17
--- default/post_post.html      16 Dec 2001 00:17:46 -0000      1.16
+++ default/post_post.html      7 Jan 2002 20:56:30 -0000       1.17
@@ -50,7 +50,7 @@
     <td colspan="2">
       <br>
 <%hidden_form%>
-      <select class="button" name=forum size=1>
+      <select class="button" name=jump size=1>
 <%GForum::Forum::jump_list($forum_id)%>
       </select>
       &nbsp;
Index: default/post_reply_post.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_reply_post.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -u -r1.16 -r1.17
--- default/post_reply_post.html        16 Dec 2001 00:17:46 -0000      1.16
+++ default/post_reply_post.html        7 Jan 2002 20:56:30 -0000       1.17
@@ -50,7 +50,7 @@
     <td colspan="2">
       <br>
       <%hidden_form%>
-      <select class="button" name=forum size=1>
+      <select class="button" name=jump size=1>
 <%GForum::Forum::jump_list($forum_id)%>
       </select>
       <input class="submit" type=submit value="Jump to forum">
Index: default/post_reply_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_reply_write.html,v
retrieving revision 1.24
retrieving revision 1.26
diff -b -u -r1.24 -r1.26
--- default/post_reply_write.html       17 Dec 2001 04:40:30 -0000      1.24
+++ default/post_reply_write.html       7 May 2002 00:52:26 -0000       1.26
@@ -25,8 +25,8 @@
     <td valign="bottom">
       <%hidden_form%>
       <%title_font%>
-        <%include include_title_cat_forum.html%>
-        Reply to post
+        <%include include_title_cat_forum.html%><br>
+        Reply to: <a href="gforum.cgi?post=<%parent_post_id%>"><%title_font%><%parent_post_subject%><%/title_font%></a>
       <%/title_font%>
     </td>
     <td align="right">
@@ -52,9 +52,9 @@
   </tr>
   <tr bgcolor="<%odd_color%>">
     <td colspan="2">
-<%if advanced_editor and is_ie and ie_version >= 5%>
+<%if advanced_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
-<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5%>
+<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
 <%else%>
 <%include include_post_common_write.html%>
Index: default/post_view_flat.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_view_flat.html,v
retrieving revision 1.21
retrieving revision 1.28
diff -b -u -r1.21 -r1.28
--- default/post_view_flat.html 16 Dec 2001 00:17:46 -0000      1.21
+++ default/post_view_flat.html 16 May 2002 00:49:09 -0000      1.28
@@ -23,6 +23,13 @@
       "toolbar=no,menubar=yes,scrollbars=yes,location=no,status=no,resizable=1"
   );
 }
+
+<%if is_ie and ie_version >= 4%>
+function postShortcut(post_id) {
+  document.all.post_shortcut.value = '<%cgi_root_url%>/gforum.cgi?post=' + post_id + '#' + post_id;
+  document.all.post_shortcut.createTextRange().execCommand("Copy");
+}
+<%endif%>
 // -->
 </script>
 </head>
@@ -30,6 +37,7 @@
 <%body_tag%>
 <%include include_header.html%>
 <center>
+<%if is_ie and ie_version >= 4%><input type="hidden" id="post_shortcut" value=""><%endif%>
 <%body_table%>
 <form method="get" action="gforum.cgi">
   <tr>
@@ -67,6 +75,9 @@
 <%if next%>
            <input type="submit" value="Next Thread" name="do=post_view_flat;sb=<%sb%>;so=<%so%>;post=<%next%>;" class="button">
 <%endif%>
+<%if current_user_id%>
+            <input type="submit" value="Watch Thread" name="do=watch_thread;thread=<%root_post_id%>;<%hidden_query%>" class="submit">
+<%endif%>
 <script><!--
   document.write('<input type="button" value="Print Thread" onClick="openWindow(\'gforum.cgi?do=post_view_printable;post=<%root_post_id%>;<%hidden_query%>\')" class="submit">');
 //--></script>
@@ -89,6 +100,9 @@
 <%  if last%>
        <a name="last"></a>
 <%  endif%>
+<%  if first_new%>
+        <a name="unread"></a>
+<%  endif%>
 <%  include include_post_display.html%>
        <br>
       <%/body_font%>
@@ -113,7 +127,15 @@
 <%if next%>
            <input type="submit" value="Next Thread" name="do=post_view_flat;sb=<%sb%>;so=<%so%>;post=<%next%>;" class="button">
 <%endif%>
-           <input type="submit" value="Print Thread" name="do=post_view_printable;post=<%root_post_id%>" class="submit" >
+<%if current_user_id%>
+            <input type="submit" value="Watch Thread" name="do=watch_thread;thread=<%root_post_id%>;<%hidden_query%>" class="submit">
+<%endif%>
+<script><!--
+  document.write('<input type="button" value="Print Thread" onClick="openWindow(\'gforum.cgi?do=post_view_printable;post=<%root_post_id%>;<%hidden_query%>\')" class="submit">');
+//--></script>
+<noscript>
+  <a href="gforum.cgi?do=post_view_printable;post=<%root_post_id%>;<%hidden_query%>" target="_blank"><%title_font%>Print Thread<%/title_font%></a>
+</noscript>
            <input type="submit" value="View Threaded" name="do=post_view_threaded;<%sb%>;so=<%so%>;post=<%root_post_id%>" class="submit">
          </td>
        </tr>
@@ -133,7 +155,7 @@
        <tr bgcolor="<%light_green%>">
          <td align="right">
 <%hidden_form%>
-           <select class="button" name="forum" size="1">
+           <select class="button" name="jump" size="1">
 <%GForum::Forum::jump_list($forum_id)%>
            </select>
            &nbsp;
Index: default/post_view_threaded.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_view_threaded.html,v
retrieving revision 1.22
retrieving revision 1.29
diff -b -u -r1.22 -r1.29
--- default/post_view_threaded.html     16 Dec 2001 00:17:46 -0000      1.22
+++ default/post_view_threaded.html     16 May 2002 00:49:09 -0000      1.29
@@ -23,12 +23,20 @@
       "toolbar=no,menubar=yes,scrollbars=yes,location=no,status=no,resizable=1"
   );
 }
+
+<%if is_ie and ie_version >= 4%>
+function postShortcut(post_id) {
+  document.all.post_shortcut.value = '<%cgi_root_url%>/gforum.cgi?post=' + post_id + '#' + post_id;
+  document.all.post_shortcut.createTextRange().execCommand("Copy");
+}
+<%endif%>
 // -->
 </script>
 </head>
 <%body_tag%>
 <%include include_header.html%>
 <center>
+<%if is_ie and ie_version >= 4%><input type="hidden" id="post_shortcut" value=""><%endif%>
 <%body_table%>
 <form method="get" action="gforum.cgi#<%post_id%>">
   <tr>
@@ -56,6 +64,9 @@
 <%if next%>
            <input type="submit" value="Next Thread" name="do=post_view_threaded;sb=<%sb%>;so=<%so%>;post=<%next%>;" class="button">
 <%endif%>
+<%if current_user_id%>
+            <input type="submit" value="Watch Thread" name="do=watch_thread;thread=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>" class="submit">
+<%endif%>
 <script><!--
   document.write('<input type="button" value="Print Thread" onClick="openWindow(\'gforum.cgi?do=post_view_printable;post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>\')" class="submit">');
 //--></script>
@@ -102,12 +113,20 @@
          </td>
          <td align=right>
 <%if prev%>
-           <input type="submit" value="Previous Thread" name="do=post_view_flat;sb=<%sb%>;so=<%so%>;post=<%prev%>;" class="button">
+           <input type="submit" value="Previous Thread" name="do=post_view_threaded;sb=<%sb%>;so=<%so%>;post=<%prev%>;" class="button">
 <%endif%>
 <%if next%>
-           <input type="submit" value="Next Thread" name="do=post_view_flat;sb=<%sb%>;so=<%so%>;post=<%next%>;" class="button">
+           <input type="submit" value="Next Thread" name="do=post_view_threaded;sb=<%sb%>;so=<%so%>;post=<%next%>;" class="button">
+<%endif%>
+<%if current_user_id%>
+            <input type="submit" value="Watch Thread" name="do=watch_thread;thread=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>" class="submit">
 <%endif%>
-           <input type="submit" class="submit" value="Print Thread" name="do=post_view_printable;post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>">
+<script><!--
+  document.write('<input type="button" value="Print Thread" onClick="openWindow(\'gforum.cgi?do=post_view_printable;post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>\')" class="submit">');
+//--></script>
+<noscript>
+  <a href="gforum.cgi?do=post_view_printable;post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;<%hidden_query%>" target="_blank"><%title_font%>Print Thread<%/title_font%></a>
+</noscript>
            <input type="submit" class="submit" value="View Flat Mode" name="do=post_view_flat;sb=<%sb%>;so=<%so%>;post=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>">
          </td>
        </tr>
@@ -127,7 +146,7 @@
        <tr bgcolor="<%light_green%>">
          <td align="right">
 <%hidden_form%>
-           <select class="button" name="forum" size="1">
+           <select class="button" name="jump" size="1">
 <%GForum::Forum::jump_list($forum_id)%>
            </select>
            &nbsp;
Index: default/post_write.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/post_write.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -b -u -r1.19 -r1.20
--- default/post_write.html     16 Dec 2001 00:17:46 -0000      1.19
+++ default/post_write.html     10 Jan 2002 09:00:31 -0000      1.20
@@ -47,9 +47,9 @@
       <input type="hidden" name="forum" value="<%forum_id%>">
       <br>
       <%body_font%>
-<%if advanced_editor and is_ie and ie_version >= 5%>
+<%if advanced_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
-<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5%>
+<%elsif current_user_advanced_editor and not basic_editor and is_ie and ie_version >= 5.5%>
 <%include include_post_html_common_write.html%>
 <%else%>
 <%include include_post_common_write.html%>
Index: default/resend_validation_enter_username.html
===================================================================
RCS file: default/resend_validation_enter_username.html
diff -N default/resend_validation_enter_username.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/resend_validation_enter_username.html       19 Mar 2002 20:25:36 -0000      1.2
@@ -0,0 +1,82 @@
+<%--
+
+File
+====
+resend_validation_enter_username.html
+
+Description
+===========
+If you never received the validation e-mail, you can come
+to this page to have the validation be resent. It requires
+you to enter the username.
+
+--%>
+<html>
+<head>
+<title><%site_title%>: Resend Validation</title>
+<%include include_css.html%>
+</head>
+<%body_tag%>
+<center>
+<%include include_header.html%>
+<%body_table%>
+  <tr>
+    <td valign="bottom"> 
+      <a href="gforum.cgi?<%hidden_query%>">
+       <%title_font%><%site_home%>: <%/title_font%>
+      </a>
+      <%title_font%>Resend Validation<%/title_font%>
+    </td>
+    <td align="right">
+      <%include include_logo.html%>
+    </td>
+  </tr>
+<form method="post" action="gforum.cgi">
+  <tr>
+    <td colspan="2">
+      <br>
+      <%hidden_form%>
+      <%list_table%>
+       <%top_row%>
+         <td colspan="2" height="3">
+           <img src="<%image_url%>/clear_shim.gif" height=1 width=100><br>
+         </td>
+       </tr>
+       <tr>
+         <td colspan="2">
+           <%body_font%>
+             If you recently signed up for an account, but never received the validation e-mail,
+              <%site_title%> can resend the validation e-mail to you. The e-mail will be resent
+              to the e-mail address you entered when signing up.
+           <%/body_font%>
+         </td>
+       </tr>
+       <tr>
+         <td align="right">
+           <%body_font%>
+             Enter your username:
+           <%/body_font%>
+         </td>
+         <td>
+           <input class="button" type="text" name="user_username">
+         </td>
+       </tr>
+       <tr bgcolor="<%light_green%>">
+         <td colspan="2" align="right" style="border-top:1px solid <%dark_beige%>">
+           <input class="submit" type="submit" value="Resend validation">
+         </td>
+       </tr>
+      </table>
+    </td>
+    <td>
+      &nbsp;
+      <input type="hidden" name="do" value="resend_validation">
+    </td>
+  </tr>
+</form>
+<%/body_table%>
+<br><br>
+<%include include_footer.html%>
+</center>
+</body>
+</html>
Index: default/search_results.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/search_results.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -u -r1.25 -r1.26
--- default/search_results.html 18 Dec 2001 01:47:04 -0000      1.25
+++ default/search_results.html 4 Mar 2002 04:01:20 -0000       1.26
@@ -71,7 +71,7 @@
          <td valign="top" style="border-right:1px solid <%dark_beige%>">
            <%body_font%>
 <%  if user_id%>
-             <a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>">
+             <a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
                <%nbsp post_username%>
              </a>
 <%  else%>
Index: default/thread_notify.eml
===================================================================
RCS file: default/thread_notify.eml
diff -N default/thread_notify.eml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/thread_notify.eml   15 Mar 2002 01:37:44 -0000      1.3
@@ -0,0 +1,13 @@
+Subject: <%site_title%> - Reply to watched thread
+From: <%site_title%> <<%admin_email%>>
+
+<%site_title%>: Watched Thread reply.
+
+The '<%root_post_subject%>' thread in the <%cat_full_name%>: <%forum_name%> forum has been replied to.
+
+You can view the thread here: <%cgi_root_url%>/gforum.cgi?post=<%root_post_id%>;page=unread#unread
+
+You specified that the thread should be watched for any replies. To stop watching this and any other
+watched threads, visit the Watched Threads section of your profile, available here:
+<%cgi_root_url%>/gforum.cgi?do=user_profile_threads
+
Index: default/user_list.html
===================================================================
RCS file: default/user_list.html
diff -N default/user_list.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/user_list.html      20 Mar 2002 19:49:27 -0000      1.3
@@ -0,0 +1,162 @@
+<%--
+
+File
+====
+user_list.html
+
+Description
+===========
+This is the member directory, called up by default from the
+message writing page, however you could link to it from
+anywhere. It could even replace Who's Online since it
+includes online information.
+
+--%>
+<html>
+<head>
+<title><%site_title%>: Member Directory<%if this_do eq 'user_search'%>: Search Results<%endif%></title>
+<%include include_css.html%>
+</head>
+<%body_tag%>
+<%include include_header.html%>
+<center>
+<%body_table%>
+  <tr>
+    <td valign=bottom>
+      <a href="gforum.cgi?<%hidden_query%>">
+       <%title_font%><%site_home%>:<%/title_font%>
+      </a>
+<%if this_do eq 'user_search'%>
+      <a href="gforum.cgi?do=user_list;<%hidden_query%>">
+        <%title_font%>Member Directory:<%/title_font%>
+      </a>
+      <%title_font%>Search Results<%/title_font%>
+<%else%>
+      <%title_font%>Member Directory<%/title_font%>
+<%endif%>
+    </td>
+    <td align=right>
+      <%include include_logo.html%>
+    </td>
+  </tr>
+
+  <tr>
+    <td colspan=2>
+      <br>
+      <%body_font%>
+        <%num_users%> registered users.
+        <%users_online%> users online in the past <%online_timeout%> minutes.<br><br>
+<%if this_do eq 'user_list' and sb eq 'user_username'%>
+        <p>
+        <%if first eq 'A'%><b>A</b><%elsif has_a%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=A;<%hidden_query%>">A</a><%else%>A<%endif%>
+        <%if first eq 'B'%><b>B</b><%elsif has_b%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=B;<%hidden_query%>">B</a><%else%>B<%endif%>
+        <%if first eq 'C'%><b>C</b><%elsif has_c%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=C;<%hidden_query%>">C</a><%else%>C<%endif%>
+        <%if first eq 'D'%><b>D</b><%elsif has_d%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=D;<%hidden_query%>">D</a><%else%>D<%endif%>
+        <%if first eq 'E'%><b>E</b><%elsif has_e%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=E;<%hidden_query%>">E</a><%else%>E<%endif%>
+        <%if first eq 'F'%><b>F</b><%elsif has_f%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=F;<%hidden_query%>">F</a><%else%>F<%endif%>
+        <%if first eq 'G'%><b>G</b><%elsif has_g%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=G;<%hidden_query%>">G</a><%else%>G<%endif%>
+        <%if first eq 'H'%><b>H</b><%elsif has_h%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=H;<%hidden_query%>">H</a><%else%>H<%endif%>
+        <%if first eq 'I'%><b>I</b><%elsif has_i%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=I;<%hidden_query%>">I</a><%else%>I<%endif%>
+        <%if first eq 'J'%><b>J</b><%elsif has_j%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=J;<%hidden_query%>">J</a><%else%>J<%endif%>
+        <%if first eq 'K'%><b>K</b><%elsif has_k%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=K;<%hidden_query%>">K</a><%else%>K<%endif%>
+        <%if first eq 'L'%><b>L</b><%elsif has_l%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=L;<%hidden_query%>">L</a><%else%>L<%endif%>
+        <%if first eq 'M'%><b>M</b><%elsif has_m%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=M;<%hidden_query%>">M</a><%else%>M<%endif%>
+        <%if first eq 'N'%><b>N</b><%elsif has_n%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=N;<%hidden_query%>">N</a><%else%>N<%endif%>
+        <%if first eq 'O'%><b>O</b><%elsif has_o%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=O;<%hidden_query%>">O</a><%else%>O<%endif%>
+        <%if first eq 'P'%><b>P</b><%elsif has_p%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=P;<%hidden_query%>">P</a><%else%>P<%endif%>
+        <%if first eq 'Q'%><b>Q</b><%elsif has_q%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=Q;<%hidden_query%>">Q</a><%else%>Q<%endif%>
+        <%if first eq 'R'%><b>R</b><%elsif has_r%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=R;<%hidden_query%>">R</a><%else%>R<%endif%>
+        <%if first eq 'S'%><b>S</b><%elsif has_s%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=S;<%hidden_query%>">S</a><%else%>S<%endif%>
+        <%if first eq 'T'%><b>T</b><%elsif has_t%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=T;<%hidden_query%>">T</a><%else%>T<%endif%>
+        <%if first eq 'U'%><b>U</b><%elsif has_u%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=U;<%hidden_query%>">U</a><%else%>U<%endif%>
+        <%if first eq 'V'%><b>V</b><%elsif has_v%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=V;<%hidden_query%>">V</a><%else%>V<%endif%>
+        <%if first eq 'W'%><b>W</b><%elsif has_w%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=W;<%hidden_query%>">W</a><%else%>W<%endif%>
+        <%if first eq 'X'%><b>X</b><%elsif has_x%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=X;<%hidden_query%>">X</a><%else%>X<%endif%>
+        <%if first eq 'Y'%><b>Y</b><%elsif has_y%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=Y;<%hidden_query%>">Y</a><%else%>Y<%endif%>
+        <%if first eq 'Z'%><b>Z</b><%elsif has_z%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=Z;<%hidden_query%>">Z</a><%else%>Z<%endif%>
+        <%if first eq 'NUM'%><b>0-9</b><%elsif has_num%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=NUM;<%hidden_query%>">0-9</a><%else%>0-9<%endif%>
+        <%if first eq 'OTHER'%><b>Other</b><%elsif has_other%><a href="gforum.cgi?do=user_list;sb=user_username;so=<%if so%><%so%><%else%>ASC<%endif%>;first=OTHER;<%hidden_query%>">Other</a><%endif%>
+<%endif%>
+        <br>
+<%if this_do eq 'user_search'%>
+        Your search returned <%num_page_items%> results.<br>
+<%endif%>
+        <%include include_paging.html%><br><br>
+<%if this_do eq 'user_list' and sb eq 'user_username'%>
+        </p>
+        <%if first%><%num_page_items%> users found starting with <%if first eq 'NUM'%>0 - 9<%elsif first eq 'OTHER'%>Other<%else%>'<%first%>'<%endif%>.<%endif%>
+<%endif%>
+<form method="GET" action="gforum.cgi"><%hidden_form%>Search for a user: <input type="text" name="search_field" value="<%if search_field%><%search_field%><%endif%>" class="button"> <select name="search_column" size="1" class="button"><option value="user_username"<%if search_column eq 'user_username'%> selected<%endif%>>Username</option><option value="user_disp_email"<%if search_column eq 'user_disp_email'%> selected<%endif%>>E-Mail Address</option><option value="user_real_name"<%if search_column eq 'user_real_name'%> selected<%endif%>>Real Name</option></select> <input type="hidden" name="do" value="user_search"><input type="submit" value="Search Users" class="submit"></form>
+      <%list_table%>
+       <%top_row%>
+         <td style="border-right:1px solid <%dark_beige%>" width="30%">
+           <a href="gforum.cgi?do=<%this_do%>;sb=user_username;so=<%if sb eq 'user_username' and so eq 'ASC'%>DESC<%else%>ASC<%endif%>;<%if first%>first=<%first%>;<%endif%><%if this_do eq 'user_search'%>search_column=<%search_column%>;search_field=<%search_field%>;<%endif%><%hidden_query%>"><%top_row_font%><nobr><%if sb eq 'user_username'%><img src="<%image_url%>/<%if so eq 'ASC'%>up<%else%>down<%endif%>.gif" border="0" alt="Sort Direction" width="14" height="11">&nbsp;<%endif%>Username</nobr><%/top_row_font%></a>
+         </td>
+          <td style="border-right:1px solid <%dark_beige%>" width="10%">
+            <a href="gforum.cgi?do=<%this_do%>;sb=user_last_seen;so=<%if sb eq 'user_last_seen' and so eq 'DESC'%>ASC<%else%>DESC<%endif%>;<%if this_do eq 'user_search'%>search_column=<%search_column%>;search_field=<%search_field%>;<%endif%><%hidden_query%>"><%top_row_font%><nobr><%if sb eq 'user_last_seen'%><img src="<%image_url%>/<%if so eq 'ASC'%>up<%else%>down<%endif%>.gif" border="0" alt="Sort Direction" width="14" height="11">&nbsp;<%endif%>Online</nobr><%/top_row_font%></a>
+          </td>
+         <td style="border-right:1px solid <%dark_beige%>" width="15%">
+           <%top_row_font%>Title<%/top_row_font%>
+         </td>
+         <td style="border-right:1px solid <%dark_beige%>" width="10%">
+            <a href="gforum.cgi?do=<%this_do%>;sb=user_posts;so=<%if sb eq 'user_posts' and so eq 'DESC'%>ASC<%else%>DESC<%endif%>;<%if this_do eq 'user_search'%>search_column=<%search_column%>;search_field=<%search_field%>;<%endif%><%hidden_query%>"><%top_row_font%><nobr><%if sb eq 'user_posts'%><img src="<%image_url%>/<%if so eq 'ASC'%>up<%else%>down<%endif%>.gif" border="0" alt="Sort Direction" width="14" height="11">&nbsp;<%endif%>Posts</nobr><%/top_row_font%></a>
+         </td>
+         <td>
+            <a href="gforum.cgi?do=<%this_do%>;sb=user_last_seen;so=<%if sb eq 'user_last_seen' and so eq 'DESC'%>ASC<%else%>DESC<%endif%>;<%if this_do eq 'user_search'%>search_column=<%search_column%>;search_field=<%search_field%>;<%endif%><%hidden_query%>"><%top_row_font%><nobr><%if sb eq 'user_last_seen'%><img src="<%image_url%>/<%if so eq 'ASC'%>up<%else%>down<%endif%>.gif" border="0" alt="Sort Direction" width="14" height="11">&nbsp;<%endif%>Last Seen</nobr><%/top_row_font%></a>
+         </td>
+       </tr>
+<%GForum::Utils::new_alternation('user_list')%>
+<%  loop users%>
+       <tr bgcolor="<%GForum::Utils::alternation('user_list', $odd_color, $even_color)%>">
+         <td style="border-right:1px solid <%dark_beige%>">
+           <%body_font%>
+             <a href="gforum.cgi?username=<%GT::CGI::escape($user_username)%>;<%hidden_query%>"><%nbsp user_username%></a>
+              <%if current_user_id and user_accept_privmsg and user_status%>(<a href="gforum.cgi?do=message;user=<%user_id%>;<%hidden_query%>">Message</a>)<%endif%>
+<%      if current_user_status = 3%><%-- An administrator --%>
+             <small>(<a href="gforum.cgi?do=disable_user;redo=<%this_do%>;user_id=<%user_id%>;<%hidden_query%>">Disable User</a>)</small>
+<%      endif%>
+           <%/body_font%>
+         </td>
+         <td style="border-right:1px solid <%dark_beige%>">
+            <%body_font%>
+            <%if user_invisible and current_user_status < 3%>
+              <i>(Invisible)</i>
+            <%else%>
+              <%if user_online%><font color="green">Yes</font><%else%><font color="red">No</font><%endif%>
+            <%endif%>
+            <%/body_font%>
+         </td>
+         <td style="border-right:1px solid <%dark_beige%>">
+           <%body_font%><%nbsp user_title%><%/body_font%>
+         </td>
+         <td style="border-right:1px solid <%dark_beige%>">
+           <%body_font%><%user_posts%><%/body_font%>
+         </td>
+         <td>
+           <%body_font%>
+            <%if user_invisible and current_user_status < 3%>
+              <i>(Invisible)</i>
+            <%else%>
+              <%nbsp user_last_seen_date%>
+            <%endif%>
+            <%/body_font%>
+         </td>
+       </tr>
+<%  endloop%>
+       <tr bgcolor="<%light_green%>">
+         <td colspan="5" height="3">
+           <img src="<%image_url%>/clear_shim.gif" width=100 height=1 border=0><br>
+         </td>
+       </tr>
+      </table>
+      <br><br>
+      <%include include_paging.html%><br><br>
+      <%/body_font%>
+    </td>
+  </tr>
+<%/body_table%>
+<br><br>
+<%include include_footer.html%>
+</center>
+</body>
+</html>
Index: default/user_profile.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_profile.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -u -r1.12 -r1.13
--- default/user_profile.html   18 Dec 2001 01:47:04 -0000      1.12
+++ default/user_profile.html   2 Mar 2002 02:32:13 -0000       1.13
@@ -14,7 +14,7 @@
 --%>
 <html>
 <head>
-<title><%site_title%>: Edit profile <%user_username%></title>
+<title><%site_title%>: Edit profile: <%user_username%></title>
 <%include include_css.html%>
 </head>
 <%body_tag%>
@@ -43,7 +43,7 @@
       <%/body_font%>
       <table border=0 cellpadding=10>
        <tr>
-         <td align=center style="border-bottom:3px solid <%odd_color%>">
+         <td align=center style="border-bottom:3px solid <%odd_color%>" width="20%">
            <%body_font%>
              <br><br>
              <a href="gforum.cgi?do=user_profile_basic;<%hidden_query%>">
@@ -53,46 +53,63 @@
              </a>
            <%/body_font%>
          </td>
-         <td width=250>
+         <td width="30%">
            <%body_font%>
              <br>
              From here you can change your username, password, email addresses, user icon, signature, and cookie settings.
            <%/body_font%>
          </td>
+
+         <td align=center style="border-bottom:3px solid <%odd_color%>" width="20%">
+           <%body_font%>
+             <br><br>
+             <a href="gforum.cgi?do=user_profile_email;<%hidden_query%>">
+               <img src="<%image_url%>/email_subscriptions.gif" border=0 width=64 height=64>
+               <br>
+               <b>Subscriptions</b>
+             </a>
+           <%/body_font%>
+         </td>
+         <td width="30%">
+           <%body_font%>
+             <br>
+             If you subscribe to any of the forums listed here, you will receive daily email notifications of all the posts made in the last day.
+           <%/body_font%>
+         </td>
        </tr>
+
        <tr>
-         <td align=center style="border-bottom:3px solid <%odd_color%>">
+         <td align=center style="border-bottom:3px solid <%odd_color%>" width="20%">
           <%body_font%>
              <br><br>
              <a href="gforum.cgi?do=user_profile_display;<%hidden_query%>">
                <img src="<%image_url%>/display_profile.gif" border=0 width=64 height=64>
                <br>
-               <b>Display Profile</b>
+               <b>Display Settings</b>
              </a>
            <%/body_font%>
          </td>
-         <td width=250>
+         <td width="30%">
            <%body_font%>
              <br>
              Change all your default display settings, here, including text area sizes and post styles.
            <%/body_font%>
          </td>
-       </tr>
-       <tr>
-         <td align=center style="border-bottom:3px solid <%odd_color%>">
+
+         <td align=center style="border-bottom:3px solid <%odd_color%>" width="20%">
            <%body_font%>
              <br><br>
-             <a href="gforum.cgi?do=user_profile_email;<%hidden_query%>">
-               <img src="<%image_url%>/email_subscriptions.gif" border=0 width=64 height=64>
+             <a href="gforum.cgi?do=user_profile_threads;<%hidden_query%>">
+               <img src="<%image_url%>/watched_threads.gif" border=0 width=64 height=64>
                <br>
-               <b>Email Subscriptions</b>
+               <b>Watched Threads</b>
              </a>
            <%/body_font%>
          </td>
-         <td width=250>
+         <td width="30%">
            <%body_font%>
              <br>
-             If you subscribe to any of the forums listed here, you will receive daily email notifications of all the posts made in the last day.
+             If you have watched any threads, and no longer wish to receive updates when threads are updated, come to this page to stop watching any or all of your watched threads.
            <%/body_font%>
          </td>
        </tr>
Index: default/user_profile_basic.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_profile_basic.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -b -u -r1.31 -r1.32
--- default/user_profile_basic.html     18 Dec 2001 01:47:04 -0000      1.31
+++ default/user_profile_basic.html     7 May 2002 00:52:40 -0000       1.32
@@ -167,7 +167,7 @@
            </select>
          </td>
        </tr>
-<%-- The following section of code should be uncommented if you want users to be able to select icons. Be sure to delete the ending comment if you delete this one, 42 lines down
+<%-- The following section of code should be uncommented if you want users to be able to select icons. Be sure to delete the ending comment if you delete this one, 41 lines down
 <%GForum::User::icons('with blank')%>
        <tr>
          <td align=right valign=top>
@@ -177,7 +177,6 @@
            <table border=0 cellspacing=0 cellpadding=5 width="100%">
              <tr valign=middle align=center>
 <%set icon_cols = 4%>
-<%-- The first iteration of this loop is empty - it is used for a "none" option --%>
 <%loop icons%>
                <td>
                  <table border=0 cellspacing=0 cellpadding=0>
Index: default/user_profile_display.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_profile_display.html,v
retrieving revision 1.19
retrieving revision 1.24
diff -b -u -r1.19 -r1.24
--- default/user_profile_display.html   18 Dec 2001 01:47:04 -0000      1.19
+++ default/user_profile_display.html   4 Mar 2002 04:00:59 -0000       1.24
@@ -60,26 +60,6 @@
            <img src="<%image_url%>/clear_shim.gif" width=100 height=1><br>
          </td>
        </tr>
-<%--
-  The following option is disabled by default since Gossamer Forum only ships
-  with one template set.
-
-  You can use this to specify alternate template sets that users may choose.
-  If a user has an alternate template set specified, whenever they use the forum
-  they will see the template set they have chosen. This makes using an interface
-  with multiple languages very easy - one template set for English users, one
-  for French users, one for German users, etc.
-
-  To use, replace the 3 occurances of "new_template_set" in the HTML <option>
-  tag with the appropriate value. For example, if you were to add two new
-  template sets called "french" and "german", in addition to "default", you
-  might do something like this:
-             <option value="default"<%if user_template eq default%> selected<%endif%>>English</option>
-             <option value="francais"<%if user_template eq new_template_set%> selected<%endif%>>Fran&ccedil;ais</option>
-             <option value="deutsche"<%if user_template eq deutsche%> selected<%endif%>>Deutsche</option>
-  
-  Also be sure to change the same thing in the signup page.
---%>
        <tr>
          <td width="30%" align=right>
            <%body_font%>Default Template Set:<%/body_font%>
@@ -129,6 +109,17 @@
          </td>
        </tr>
         <tr>
+         <td align=right>
+           <%body_font%>In flat view, when viewing thread:<%/body_font%>
+         </td>
+         <td>
+           <select class="button" name=user_jump_to_unread size=1>
+             <option value=1<%if user_jump_to_unread%> selected<%endif%>>Jump to first unread post</option>
+             <option value=0<%ifnot user_jump_to_unread%> selected<%endifnot%>>View root post</option>
+           </select>
+         </td>
+       </tr>
+        <tr>
           <td align=right valign=top>
             <%body_font%>Post writer/editor:<%/body_font%>
           </td>
@@ -137,7 +128,7 @@
               <option value=0<%if user_advanced_editor = 0%> selected<%endif%>>Basic Editor</option>
               <option value=1<%if user_advanced_editor = 1%> selected<%endif%>>Advanced Editor</option>
             </select><br>
-            <%body_font%><small><i><u>Note</u>: The advanced editor required Internet Explorer version 5.0 or greater</i></small><%/body_font%>
+            <%body_font%><small><i><u>Note</u>: The advanced editor required Internet Explorer version 5.5 or greater</i></small><%/body_font%>
           </td>
         </tr>
         <tr>
@@ -196,6 +187,14 @@
            <input class="button" type=text name=user_default_mh_search value="<%user_default_mh_search%>" size=5>
          </td>
        </tr>
+        <tr>
+          <td align=right>
+            <%body_font%>Member Directory hits / page:<%/body_font%>
+          </td>
+          <td>
+            <input class="button" type=text name=user_default_mh_user value="<%user_default_mh_user%>" size=5>
+          </td>
+        </tr>
        <tr>
          <td align=right>
            <%body_font%>Textbox width (in characters):<%/body_font%>
Index: default/user_profile_email.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_profile_email.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -u -r1.12 -r1.13
--- default/user_profile_email.html     18 Dec 2001 01:47:04 -0000      1.12
+++ default/user_profile_email.html     2 Mar 2002 02:32:13 -0000       1.13
@@ -47,21 +47,21 @@
 <%loop everything%>
 <%  unless forum_id%><%-- A category --%>
          <%header_row%>
-            <td width="2%">&nbsp;</td>
-           <td width="98%">
+            <td width="2%" style="border-top: 1px solid <%dark_beige%>">&nbsp;</td>
+           <td width="98%" style="border-top: 1px solid <%dark_beige%>">
              <%header_font%><%if cat_depth%><img src="<%image_url%>/clear_shim.gif" height=1 width="<%cat_depth * 25%>"><%endif%><%cat_name%><%/header_font%>
            </td>
          </tr>
 <%  else%><%-- A forum --%>
          <tr bgcolor="<%GForum::Utils::alternation(everything, $odd_color, $even_color)%>">
-           <td align=center valign=center>
+           <td align=center valign=center style="border-top: 1px solid <%dark_beige%>; border-right: 1px solid <%dark_beige%>">
 <%    if forum_permission >= 2%>
              <input type=checkbox name=subscribe value=<%forum_id%><%if forum_subscribed%> checked<%endif%>>
 <%    else%>
               &nbsp;
 <%    endif%>
            </td>
-            <td>
+            <td style="border-top: 1px solid <%dark_beige%>">
               <%body_font%><%if cat_depth%><img src="<%image_url%>/clear_shim.gif" height=1 width="<%cat_depth * 25%>"><%endif%><%forum_name%><%/body_font%>
             </td>
          </tr>
Index: default/user_profile_threads.html
===================================================================
RCS file: default/user_profile_threads.html
diff -N default/user_profile_threads.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/user_profile_threads.html   4 Mar 2002 03:53:40 -0000       1.1
@@ -0,0 +1,124 @@
+<%--
+
+File
+====
+user_profile_threads.html
+
+Description
+===========
+This page is used to unsubscribe from watched threads. You
+click the "Watch Thread" button on the post view page to
+watch a thread.
+
+--%>
+<html>
+<head>
+<title><%site_title%>: Edit profile: Watched Threads: <%current_user_username%></title>
+<%include include_css.html%>
+<script language="JavaScript">
+<!--
+function checkAll(all) {
+  for (var i = document.threads.elements.length - 1; i >= 0; i--) {
+    if (document.threads.elements[i].name != 'stop_watching')
+      continue;
+    document.threads.elements[i].checked = all.checked;
+  }
+}
+
+/* When you check a checkbox, it checks to see if all
+ * the checkboxes are clicked, and if so checks the
+ * 'check_all' box. If you are unchecking, the 'check_all'
+ * box will be cleared.
+ */
+function checkCheckBoxes () {
+  var allChecked = true;
+  for (var i = document.threads.elements.length - 1; i >= 0; i--) {
+    if (document.threads.elements[i].name != 'stop_watching')
+      continue;
+    if (document.threads.elements[i].checked == false) {
+      allChecked = false;
+      break;
+    }
+  }
+  if (allChecked)
+    document.threads.check_all.checked = true;
+  else
+    document.threads.check_all.checked = false;
+}
+// -->
+</script>
+</head>
+<%body_tag%>
+<%include include_header.html%>
+<center>
+<%body_table%>
+  <tr>
+    <td valign=bottom>
+      <%title_font%>
+       <a href="gforum.cgi?<%hidden_query%>"><%title_font%><%site_home%><%/title_font%></a>:
+       <a href="gforum.cgi?do=user_profile;<%hidden_query%>"><%title_font%>Edit Profile<%/title_font%></a>:
+       Watched Threads
+      <%/title_font%>
+    </td>
+    <td align=right>
+      <%include include_logo.html%>
+    </td>
+  </tr> 
+<form action="gforum.cgi" method="get" name="threads">
+  <tr>
+    <td colspan=2 valign=bottom>
+      <%hidden_form%>
+      <%body_font%>
+       Welcome, <%nbsp current_user_username%>.<br>
+        From this page you can unsubscribe from watched threads. To start watching
+        a thread, click the "Watch Thread" button shown when viewing a thread. When
+        a thread is watched, you will receive e-mail notifications when someone posts
+        a reply to the thread.
+<%if watched_threads%>
+        <br><br>You are currently watching <b><%watched_threads%></b> threads:
+       <%list_table%>
+         <%top_row%>
+           <td colspan=3>
+             <img src="<%image_url%>/clear_shim.gif" width=100 height=1><br>
+           </td>
+         </tr>
+<%set indent = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'%>
+<%GForum::Utils::new_alternation(threads)%>
+<%loop threads%>
+         <tr bgcolor="<%GForum::Utils::alternation(threads => $odd_color, $even_color)%>">
+           <td align=center valign=center style="border-top: 1px solid <%dark_beige%>">
+              <%body_font%><input type="checkbox" name="stop_watching" value="<%post_id%>" onClick="javascript: checkCheckBoxes()"><%/body_font%>
+            </td>
+            <td style="border-top: 1px solid <%dark_beige%>">
+              <%body_font%>
+                <%GForum::Category::full_name_linked($cat_id, ": ", "", "", "gforum.cgi?", $hidden_query)%>:
+                <a href="gforum.cgi?forum=<%forum_id%>;<%hidden_query%>"><%forum_name%></a>:
+                <a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><b><%post_subject%></b></a> <i>(started by <%if user_id%><a href="gforum.cgi?<%if user_status%>username=<%post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>)</i>
+              <%/body_font%>
+            </td>
+         </tr>
+<%endloop%>
+         <tr>
+            <td bgcolor="<%light_green%>" align=center style="border-top: 1px solid <%dark_beige%>">
+              <input type="checkbox" name="check_all" onClick="checkAll(this)">
+            </td>
+           <td bgcolor="<%light_green%>" align=right style="border-top: 1px solid <%dark_beige%>">
+             <input type=hidden name=do value=user_profile_threads_change>
+             <input type=hidden name=next_do value=user_profile>
+             <input class="submit" type=submit value="Stop watching selected threads">
+           </td>
+         </tr>
+       </table>
+<%else%>
+        <br><br><b>You are not currently watching any threads. To watch a thread, click the "Watch Thread" button on the thread display page.</b>
+<%endif%>
+      <%/body_font%>
+    </td>
+  </tr>
+</form>
+<%/body_table%>
+<br><br>
+<%include include_footer.html%>
+</center>
+</body>
+</html>
Index: default/user_signup.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_signup.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -r1.15 -r1.16
--- default/user_signup.html    18 Dec 2001 01:47:04 -0000      1.15
+++ default/user_signup.html    14 Mar 2002 22:19:20 -0000      1.16
@@ -53,7 +53,11 @@
        <tr>
          <td colspan=2>
            <%body_font%>
-             You can sign up to the forum by entering your information here:
+             You can sign up to the forum by entering your information here.
+<%GForum::Config::tpl_get(require_signup_email_validation)%>
+              <%if require_signup_email_validation%>
+              If you have already filled out the signup form but still have not received a validation e-mail, <a href="gforum.cgi?do=resend_validation;<%hidden_query%>">click here</a> to have the validation e-mail resent.
+              <%endif%>
            <%/body_font%>
          </td>
        </tr>
Index: default/user_view.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/user_view.html,v
retrieving revision 1.28
retrieving revision 1.33
diff -b -u -r1.28 -r1.33
--- default/user_view.html      18 Dec 2001 01:47:04 -0000      1.28
+++ default/user_view.html      17 May 2002 19:53:19 -0000      1.33
@@ -106,7 +106,7 @@
            <%body_font%><b>Real Name:</b><%/body_font%>
          </td>
          <td valign=top bgcolor="<%odd_color%>" style="border-top:1px solid <%dark_beige%>">
-           <%body_font%><%user_real_name%><%/body_font%>
+           <%body_font%><%if user_real_name%><%user_real_name%><%else%>No name entered.<%endif%><%/body_font%>
          </td>
        </tr>

@@ -115,10 +115,21 @@
            <%body_font%><b>Location:</b><%/body_font%>
          </td>
          <td bgcolor="<%odd_color%>" valign=top>
-           <%body_font%><%if user_location%><%user_location%><%else%>No location entered.<%endif%>
+           <%body_font%><%if user_location%><%user_location%><%else%>No location entered.<%endif%><%/body_font%>
          </td>
        </tr>

+<%if not user_invisible or current_user_status == 3%>
+       <tr>
+         <td width="20%" align=right valign=top bgcolor="<%light_beige%>" style="border-right:1px solid <%dark_beige%>">
+           <%body_font%><b>Local Time:</b><%/body_font%>
+         </td>
+         <td bgcolor="<%odd_color%>" valign=top>
+           <%body_font%><%user_localdate%><%/body_font%>
+         </td>
+       </tr>
+<%endif%>
+
 <%if user_occupation%>
        <tr>
          <td width="20%" align=right valign=top bgcolor="<%light_beige%>" style="border-right:1px solid <%dark_beige%>;">
@@ -167,13 +178,37 @@
          </td>
        </tr>

+<%if current_user_id and current_user_status >= 3%>
+       <tr>
+         <td width="20%" align=right valign=top bgcolor="<%light_beige%>" style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%dark_beige%>">
+           <%body_font%><b>Email:</b><%/body_font%>
+         </td>
+         <td valign=top bgcolor="<%odd_color%>" style="border-top:1px solid <%dark_beige%>">
+           <%body_font%>
+             <a href="mailto:<%user_email%>"><%user_email%></a>
+           <%/body_font%>
+         </td>
+       </tr>
+
+       <tr>
+         <td width="20%" align=right valign=top bgcolor="<%light_beige%>" style="border-right:1px solid <%dark_beige%>; border-top:1px solid <%dark_beige%>">
+           <%body_font%><b>Admin options:</b><%/body_font%>
+         </td>
+         <td valign=top bgcolor="<%odd_color%>" style="border-top:1px solid <%dark_beige%>">
+           <%body_font%>
+             <a href="admin/db.cgi?db=User;do=search_results;user_id=<%user_id%>;user_id-opt=%3D;display=details">Details</a> | <a href="admin/db.cgi?db=User;do=modify_search_results;user_id=<%user_id%>;user_id-opt=%3D">Modify</a> | <a href="admin/db.cgi?db=User;do=delete_search_results;user_id=<%user_id%>;user_id-opt=%3D">Delete</a>
+           <%/body_font%>
+         </td>
+       </tr>
+<%endif%>
+
 <%if user_icq%>
        <tr>
          <td width="20%" align=right valign=top bgcolor="<%light_beige%>" style="border-right:1px solid <%dark_beige%>;">
            <%body_font%><b>ICQ number:</b><%/body_font%>
          </td>
          <td valign=top bgcolor="<%odd_color%>">
-           <%body_font%><%user_icq%><%/body_font%>
+           <%body_font%><a href="http://web.icq.com/whitepages/message_me/1,,,00.icq?uin=<%user_icq%>&action=message"><%user_icq%></a><%/body_font%>
          </td>
        </tr>
 <%endif%>
@@ -184,7 +219,7 @@
            <%body_font%><b>AOL Instant Message name:</b><%/body_font%>
          </td>
          <td valign=top bgcolor="<%odd_color%>">
-           <%body_font%><%user_aim%><%/body_font%>
+           <%body_font%><a href="aim:goim?screenname=<%user_aim%>"><%user_aim%></a><%/body_font%>
          </td>
        </tr>
 <%endif%>
@@ -195,7 +230,7 @@
            <%body_font%><b>Yahoo Identity:</b><%/body_font%>
          </td>
          <td valign=top bgcolor="<%odd_color%>">
-           <%body_font%><%user_yahoo%><%/body_font%>
+           <%body_font%><a href="http://edit.yahoo.com/config/send_webmesg?.target=<%user_yahoo%>&.src=pg" target="_blank"><%user_yahoo%></a><%/body_font%>
          </td>
        </tr>
 <%endif%>
Index: default/validation.eml
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/validation.eml,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- default/validation.eml      8 Oct 2001 02:03:30 -0000       1.2
+++ default/validation.eml      12 Jan 2002 20:05:57 -0000      1.3
@@ -6,7 +6,7 @@

 This e-mail has been sent to confirm that this is a valid e-mail address.  You will be unable to login until you have visited the following URL:

-<%cgi_root_url%>/gforum.cgi?do=user_validate;validate=<%validate_code%>
+<%cgi_root_url%>/gforum.cgi?do=user_validate&validate=<%validate_code%>

 Your real e-mail address will only be used to send you notification of replies
 and forum archives (if you request them). Your real e-mail address will not be
Index: default/validation_resent.html
===================================================================
RCS file: default/validation_resent.html
diff -N default/validation_resent.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/validation_resent.html      14 Mar 2002 22:19:20 -0000      1.1
@@ -0,0 +1,49 @@
+<%--
+
+File
+====
+validation_resent.html
+
+Description
+===========
+After entering your username for the validation resend, this
+is the page you will see that confirms that the validation
+e-mail has been sent to you again.
+
+--%>
+<html>
+<head>
+<title><%site_title%>: Validation resent!</title>
+<%include include_css.html%>
+</head>
+<%body_tag%>
+<center>
+<%include include_header.html%>
+<%body_table%>
+  <tr>
+    <td valign="bottom">
+      <a href="gforum.cgi?<%hidden_query%>">
+       <%title_font%><%site_home%>: <%/title_font%>
+      </a>
+      <%title_font%>
+       Validation Sent
+      <%/title_font%>
+    </td>
+    <td align="right">
+      <%include include_logo.html%>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2">
+      <%body_font%>
+       Your validation code has been e-mailed to you again. The e-mail you
+        receive will contain a link to click on to validation your account.
+      <%/body_font%>
+    </td>
+  </tr>
+<%/body_table%>
+<br><br>
+<%include include_footer.html%>
+</center>
+</body>
+</html>
Index: default/watch_thread.html
===================================================================
RCS file: default/watch_thread.html
diff -N default/watch_thread.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ default/watch_thread.html   4 Mar 2002 03:54:02 -0000       1.1
@@ -0,0 +1,67 @@
+<%--
+
+File
+====
+watch_thread.html
+
+Description
+===========
+When you click the "Watch Thread" button on the thread
+display page, you will start "watching" the thread and you
+will see this page.
+
+--%>
+<html>
+<head>
+<title><%site_title%>: <%cat_full_name%>: <%forum_name%>: <%post_subject%>: Thread Watched!</title>
+<meta http-equiv="refresh" content="5;url=gforum.cgi?post=<%post_id%>&<%hidden_query%>">
+<%include include_css.html%>
+</head>
+<%body_tag%>
+<%include include_header.html%>
+<center>
+<%body_table%>
+  <tr>
+    <td>
+      <%title_font%>
+        <%include include_title_cat_forum.html%>
+        <a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><%title_font%><%post_subject%><%/title_font%></a>:
+        Thread Watched
+      <%/title_font%>
+    </td>
+    <td align="right">
+      <%include include_logo.html%>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2">
+      <%body_font%>
+       The thread <%GForum::Category::full_name_linked($cat_id, ": ", "", "", "gforum.cgi?", $hidden_query)%>:
+        <a href="gforum.cgi?forum=<%forum_id%>;<%hidden_query%>"><%forum_name%></a>:
+        <a href="gforum.cgi?post=<%post_id%>;<%hidden_query%>"><b><%post_subject%></b></a>
+        <i>(started by <%if user_id%><a href="gforum.cgi?<%if user_status%>username=<%post_username%><%else%>user=<%user_id%><%endif%>"><%nbsp post_username%></a><%else%><%nbsp post_username%><%endif%>)</i>
+        has been added to your watched threads list.
+        <a href="gforum.cgi?do=user_profile_threads;<%hidden_query%>">Click here</a> to see a summary of all threads you have watched.<br><br>
+        You will be automatically returned to the thread shortly, or choose the forum you wish to visit:
+      <%/body_font%>
+    </td>
+  </tr>
+<form method="GET" action="gforum.cgi">
+  <tr>
+    <td colspan="2">
+      <br>
+<%hidden_form%>
+      <select class="button" name=jump size=1>
+<%GForum::Forum::jump_list($forum_id)%>
+      </select>
+      &nbsp;
+      <input class="submit" type=submit value="Jump to forum">
+    </td>
+  </tr>
+</form>
+<%/body_table%>
+<br><br>
+<%include include_footer.html%>
+</center>
+</body>
+</html>
Index: default/whos_online.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default/whos_online.html,v
retrieving revision 1.16
retrieving revision 1.20
diff -b -u -r1.16 -r1.20
--- default/whos_online.html    18 Dec 2001 01:47:04 -0000      1.16
+++ default/whos_online.html    17 May 2002 01:50:20 -0000      1.20
@@ -25,12 +25,12 @@
        <%title_font%><%site_home%>:<%/title_font%>
       </a>
       <%title_font%>Who's Online<%/title_font%>
+      <%body_font%>(<a href="gforum.cgi?do=user_list;<%hidden_query%>">View Member Directory</a>)<%/body_font%>
     </td>
     <td align=right>
       <%include include_logo.html%>
     </td>
   </tr>
-
   <tr>
     <td colspan=2>
 <%if has_online_users%>
@@ -88,7 +88,7 @@
          </td>
 <%    endif%>
          <td>
-           <%body_font%><%online_date%><%/body_font%>
+           <%body_font%><%online_date%><%if user_time_offset != $current_user_time_offset%> (<%GT::Date::date_get($user_localtime, '%h%:%MM% %tt%')%>)<%endif%><%/body_font%>
          </td>
        </tr>
 <%  endloop%>
Index: default_top/include_post_display.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/default_top/include_post_display.html,v
retrieving revision 1.6
retrieving revision 1.11
diff -b -u -r1.6 -r1.11
--- default_top/include_post_display.html       16 Dec 2001 07:08:58 -0000      1.6
+++ default_top/include_post_display.html       23 Apr 2002 15:28:53 -0000      1.11
@@ -19,7 +19,7 @@
       <%body_font%><small>
        <b>
         <%if user_id%>
-         <a href="gforum.cgi?username=<%escape_url post_username%>;<%hidden_query%>">
+         <a href="gforum.cgi?<%if user_status%>username=<%escape_url post_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
            <big><%nbsp post_username%></big>
          </a>
         <%else%>
@@ -46,6 +46,10 @@
 <%else%>
       &nbsp;
 <%endif%>
+<%if this_do eq post_view_threaded or this_do eq post_view_flat%><%if is_ie and ie_version >= 4%>
+        <%body_font%><small><a href="javascript: postShortcut(<%post_id%>)">Copy Shortcut</a></small><%/body_font%>
+<%endif%><%endif%>
+
     </td>
     <td align="right" width="33%"<%unless printing%> bgcolor="<%light_beige%>"<%endif%>>
       <%body_font%><small>
@@ -72,7 +76,7 @@
           <a href="gforum.cgi?do=forum_ban_write;forum=<%forum_id%>;ban_type=ban_ip;ban_value=<%post_ip%>;<%hidden_query%>">IP</a>
   <%if current_user_status = 3%><%-- An administrator --%>
             |
-            <a href="gforum.cgi?do=ban_ip;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;ip=<%post_ip%>;<%hidden_query%>">Site IP</a>
+            <a href="gforum.cgi?do=ban_ip;redo=<%this_do%>;post=<%post_id%>;so=<%so%>;sb=<%sb%>;ip=<%post_ip%>;<%hidden_query%>">Site IP</a>


         <big><b>|</b></big>
@@ -144,31 +148,16 @@
          </td>
          <td valign="top" align="right">
            <%body_font%><b>
-<%unless preview or deleteview or hide_post_menu or post_deleted%>
-
-<%  if not post_locked or user_perm_moderator%>
-<%    if user_perm_edit or user_perm_moderator%>
-             <a href="gforum.cgi?do=post_edit;post=<%post_id%>;<%hidden_query%>">Edit</a> |
-<%    endif%>
-<%    if user_perm_delete or user_perm_moderator%>
-<%      unless post_deleted%>
-             <a href="gforum.cgi?do=post_delete_confirm;post=<%post_id%>;<%hidden_query%>">Delete</a> |
-<%      endunless%>
-<%    endif%>
-<%    if user_forum_permission < 4%>
-             Can't Post
-<%    else%>
-<%      if forum_style % 2%><%-- This is true if the forum allows markup --%>
-              <a href="gforum.cgi?do=post_reply_write;quote=1;parent_post_id=<%post_id%>;<%hidden_query%>">Quote</a> |
-<%      endif%>
-             <a href="gforum.cgi?do=post_reply_write;parent_post_id=<%post_id%>;<%hidden_query%>">Reply</a>
-<%    endif%>
-<%  else%>
-       &nbsp;
-<%  endif%>
-<%elseif post_deleted and user_perm_moderator%><%-- Show moderators the delete link so they can delete it completely --%>
-        <a href="gforum.cgi?do=post_delete_confirm;post=<%post_id%>;<%hidden_query%>">Delete</a>
-<%endunless%>
+<%GForum::GUI::draw(
+    draw      => post_display_options,
+    separator => " | ",
+    edit      => "Edit",
+    delete    => "Delete",
+    cant_post => "Can't Post",
+    quote     => "Quote",
+    reply     => "Reply",
+    a_attribs => ""
+)%>
       </b><%/body_font%>
          </td>
         </tr>
@@ -203,7 +192,7 @@
     </td>
     <td valign="top" width="90%" colspan="3" style="border-top: 1px solid <%dark_beige%>">
       <%body_font%>
-      <a href="gforum.cgi<%unless is_iis%>/<%postatt_filename_escaped%><%endunless%>?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
+      <a href="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
          <img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
          <%postatt_filename%>
        </a>
Index: admin/copyright.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/copyright.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/copyright.html        27 Aug 2001 20:37:51 -0000      1.2
+++ admin/copyright.html        4 Mar 2002 19:00:15 -0000       1.3
@@ -1 +1 @@
-<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Copyright 2001 <a href="http://gossamer-threads.com/">Gossamer Threads Inc.</a></b>&nbsp;</font></p>^M
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Copyright 2002 <a href="http://gossamer-threads.com/">Gossamer Threads Inc.</a></b>&nbsp;</font></p>
Index: admin/email_contents.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/email_contents.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/email_default.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/email_default.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/forums_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/forums_help.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/forums_help.html      27 Aug 2001 03:01:53 -0000      1.1
+++ admin/forums_help.html      4 Mar 2002 19:00:15 -0000       1.3
@@ -19,10 +19,7 @@
       to create and manage forums, as well as the categories those forums are^M
       sorted in.</font></p>^M
 ^M
-      <p><font face="Tahoma,Arial,Helvetica" size="2">Simply click on the commands^M
-      ("Add", "Modify", "Delete", etc.) beneath the "Forums" or "Categories"^M
-      headings, and forms will be displayed allowing you to perform the action.^M
-      Note that all forums must be assigned to a category</font></p>^M
+      <p><font face="Tahoma,Arial,Helvetica" size="2">The "Add Forum" or "Add Category" links allow you to define all aspects of new forums and categories.  The "List All" link displays detailed records of all forums and categories and allows you to modify and delete them.  The "Sort Order" link allows you to configure the order in which forums and categories will be displayed.</font></p>
 ^M
     </td>^M
   </tr>^M
Index: admin/home.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/home.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/home_body.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/home_body.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/home_left.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/home_left.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/home_nav.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/home_nav.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -u -r1.10 -r1.11
Index: admin/home_right.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/home_right.html,v
retrieving revision 1.8
retrieving revision 1.10
diff -b -u -r1.8 -r1.10
--- admin/home_right.html       24 Nov 2001 06:50:36 -0000      1.8
+++ admin/home_right.html       4 Mar 2002 19:00:15 -0000       1.10
@@ -25,7 +25,7 @@
 <p><font face="Tahoma,Arial,Helvetica" size="2"><font color="red"><b>You are currently using a 30-day evaluation^M
 version of Gossamer Forum. </b></font> Your forum administration panel will expire in^M
 <%if gforum_expiry_days <= 5%><font color=red><%endif%>^M
-<%if gforum_expiry_days%><%gforum_expiry_days%> day<%unless gforum_expiry_days = 1%>s<%endunless%>^M
+<%if gforum_expiry_days%><%gforum_expiry_days%> day<%unless gforum_expiry_days = 1%>s<%endunless%>.
 <%elsif gforum_expiry_hours%><%gforum_expiry_hours%> hour<%unless gforum_expiry_hours = 1%>s<%endunless%>.^M
 <%elsif gforum_expiry_minutes%><%gforum_expiry_minutes%> minute<%unless gforum_expiry_minutes = 1%>s<%endunless%>.^M
 <%elsif gforum_expiry_seconds%><%gforum_expiry_seconds%> second<%unless gforum_expiry_seconds = 1%>s<%endunless%>.^M
Index: admin/language.txt
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/language.txt,v
retrieving revision 1.2
retrieving revision 1.5
diff -b -u -r1.2 -r1.5
--- admin/language.txt  28 Nov 2001 01:00:41 -0000      1.2
+++ admin/language.txt  20 Apr 2002 09:29:49 -0000      1.5
@@ -38,12 +38,85 @@
   'DATE_MONTH_SHORT_7' => 'Jul',
   'DATE_MONTH_SHORT_8' => 'Aug',
   'DATE_MONTH_SHORT_9' => 'Sep',
-  'SIGNUP_USERNAME_EXISTS' => 'The username \'%s\' already exists. Please choose another',
+       'USERNAME_EXISTS' => 'The username \'%s\' already exists. Please choose another',
   'USERNAME_INVALID_CHARS' => 'Username contains invalid characters',
   'USERNAME_LEADING_SPACES' => 'A username may not contain leading spaces',
   'USERNAME_NOT_ENTERED' => 'No username entered',
   'USERNAME_RESERVED' => 'Username is reserved for future use',
   'USERNAME_TOO_LONG' => 'Username too long. The maximum length of a username is %d characters',
   'USERNAME_TOO_SHORT' => 'Username too short. A username must be at least %d characters long',
-  'USERNAME_TRAILING_SPACES' => 'A username may not contain trailing spaces'
+       'USERNAME_TRAILING_SPACES' => 'A username may not contain trailing spaces',
+       'cat_depth' => 'Depth',
+       'cat_desc' => 'Description',
+       'cat_id' => 'ID',
+       'cat_id_fk' => 'Subcategory of',
+       'cat_name' => 'Name',
+       'cat_root' => 'Root',
+       'cat_show_forums' => 'Show forums in main forum list',
+       'cat_sort_rank' => 'Sort Rank',
+       'forum_allow_attachments' => 'Allow attachments',
+       'forum_allow_guest_attachments' => 'Allow guest attachments',
+       'forum_allow_user_edit' => 'Allow post edit/delete',
+       'forum_attachments' => 'Maximum number of attachments / post',
+       'forum_desc' => 'Description',
+       'forum_edit_timeout' => 'Post edit/delete timeout',
+       'forum_hard_delete' => 'Delete method',
+       'forum_id' => 'ID',
+       'forum_last' => 'Last Post',
+       'forum_last_id' => 'Last Post ID',
+       'forum_last_poster' => 'Last Poster',
+       'forum_name' => 'Name',
+       'forum_new_timeout' => 'Days to save new post data',
+       'forum_sort_rank' => 'Sort Rank',
+       'forum_style' => 'Style',
+       'forum_total' => 'Total Posts',
+       'forum_total_threads' => 'Total Threads',
+       'group_id' => 'ID',
+       'group_name' => 'Name',
+       'user_accept_privmsg' => 'Accept Private Messages',
+       'user_admin_validated' => 'Validated by Admin',
+       'user_advanced_editor' => 'Use advanced editor',
+       'user_aim' => 'AIM Name',
+       'user_cols' => 'Default textarea cols',
+       'user_default_message_style' => 'Default Message Style',
+       'user_default_mh_flatpost' => 'Default Post hits / page',
+       'user_default_mh_forum' => 'Default Forum hits / page',
+       'user_default_mh_message' => 'Default Message hits / page',
+       'user_default_mh_search' => 'Default Search hits / page',
+       'user_default_post_display' => 'Default Post Display',
+       'user_default_post_style' => 'Default Post Style',
+       'user_default_reply_notify' => 'Default Reply Notification',
+       'user_disp_email' => 'Display Email',
+       'user_do_after_post' => 'After posting action',
+       'user_email' => 'Email',
+       'user_enabled' => 'Enabled',
+       'user_forum_view' => 'Default forum display',
+       'user_hidden_cats' => 'Hidden categories',
+       'user_homepage' => 'Home page',
+       'user_icon' => 'User Icon',
+       'user_icq' => 'ICQ #',
+       'user_id' => 'ID',
+       'user_interests' => 'Interests',
+       'user_invisible' => 'Invisible',
+       'user_jump_to_unread' => 'Jump to first unread post',
+       'user_last_logon' => 'Last Logon',
+       'user_last_seen' => 'Last seen',
+       'user_location' => 'Location',
+       'user_message_notify' => 'Private message notification',
+       'user_msn' => 'MSN Identity',
+       'user_occupation' => 'Occupation',
+       'user_password' => 'Password',
+       'user_posts' => 'Num. Posts',
+       'user_real_name' => 'Real Name',
+       'user_registered' => 'Date Registered',
+       'user_rows' => 'Default textarea rows',
+       'user_signature' => 'Signature',
+       'user_status' => 'Status',
+       'user_temp_pass' => 'Temp. Password',
+       'user_template' => 'Template Set',
+       'user_time_offset' => 'Time Offset',
+       'user_title' => 'Title',
+       'user_username' => 'Username',
+       'user_val_code' => 'Validation Code',
+       'user_yahoo' => 'Yahoo Identity'
 };
Index: admin/markup.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/markup.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/markup_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/markup_help.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/markup_tags_add.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/markup_tags_add.html,v
retrieving revision 1.8
retrieving revision 1.10
diff -b -u -r1.8 -r1.10
--- admin/markup_tags_add.html  9 Nov 2001 20:56:04 -0000       1.8
+++ admin/markup_tags_add.html  2 Mar 2002 02:32:13 -0000       1.10
@@ -5,7 +5,7 @@
 <%      set error_message_2 = $markup_tag%>
 <%      set error_message_3 = "': a tag cannot start with '.'"%>
 <%    else%>
-<%      GForum::Markup::add_tag(tag => $markup_tag, html => $markup_html, closing => $closing_markup_html, markup_type => $markup_type)%>
+<%      GForum::Markup::add_tag(tag => $markup_tag, html => $markup_html, closing => $closing_markup_html, markup_type => $markup_type, clear_newlines => $clear_newlines)%>
 <%      if added_closing%>
 <%        set success_message   = "Markup tags '"%>
 <%        set success_message_2 = $markup_tag%>
@@ -29,7 +29,7 @@

 <body>
 <%set header_title = "Add Tag"%>
-<%set header_description = "From this page you can add and remove available markup tags"%>
+<%set header_description = "From this page you can add and remove available markup tags. Note - by adding a tag such as <i>foo()</i> you can create a tag that will take arguments. For example, [foo bar] would use the foo() tag, substituting %1% with &quot;bar&quot; You can use %2%, %3%, etc. for additional arguments."%>
 <%include admin_header.html%>

 <%set font_tag = '<font face="Tahoma,Arial,Helvetica" size=2>'%>
@@ -63,7 +63,7 @@
        <tr>
          <td><%font_tag%>Markup Type:<br><small>(Used for sorting)</small></font></td>
          <td>
-           <input type=text name=markup_type<%if error_message and markup_type%>value="<%markup_type%>"<%endif%>><br>
+           <input type=text name=markup_type<%if error_message and markup_type%> value="<%markup_type%>"<%endif%>><br>
          <%font_tag%><small>Existing types:<%GForum::Markup::list_types%>
 <%loop types%>
            <a href="javascript: document.markup_add.markup_type.value = '<%escape_js type%>'; void(0)"><%type%></a> (<%type_num%>)
@@ -72,6 +72,10 @@
            </small></font>
          </td>
        </tr>
+        <tr>
+          <td><%font_tag%>Clear spaces:<br><small>(Clears extra space before and after the markup tag)</small></font></td>
+          <td><input type=checkbox name=clear_newlines<%if error_message and clear_newlines%> checked<%endif%>></td>
+        </tr>
        <tr>
          <td align=center colspan=2><%font_tag%><input type=submit value="Add Tag"></font></td>
        </tr>
Index: admin/markup_tags_list.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/markup_tags_list.html,v
retrieving revision 1.7
retrieving revision 1.9
diff -b -u -r1.7 -r1.9
--- admin/markup_tags_list.html 18 Dec 2001 21:27:58 -0000      1.7
+++ admin/markup_tags_list.html 2 Mar 2002 02:32:13 -0000       1.9
@@ -23,7 +23,7 @@
       <table bgcolor=white border=0 cellpadding=3 cellspacing=3 width=500 valign=top>
        <tr>
          <td valign=top width="15%"><%font_tag%><b>Tag</b>:</font></td>
-         <td valign=top width="85%"><%font_tag%>[<%tag%>]<%if has_closing%> ... [/<%tag%>]<%endif%></font></td>
+         <td valign=top width="85%"><%font_tag%>[<%tag%>]<%if has_closing%> ... [<%closing_tag%>]<%endif%></font></td>
        </tr>
        <tr>
          <td valign=top><%font_tag%>HTML:</td>
@@ -33,6 +33,10 @@
          <td valign=top><%font_tag%>Type:</font></td>
          <td valign=top><%font_tag%><%type%></font></td>
        </tr>
+        <tr>
+          <td valign=top><%font_tag%>Clear spaces:</font></td>
+          <td valign=top><%font_tag%><%if clear_newlines%>Yes<%else%>No<%endif%></font></td>
+        </tr>
        <tr>
          <td valign=top><%font_tag%>Sample:</font></td>
          <td valign=top><%font_tag%><%html%><%if has_closing%><%sample_text%><%closing%><%endif%></font></td>
Index: admin/markup_tags_modify_2.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/markup_tags_modify_2.html,v
retrieving revision 1.7
retrieving revision 1.9
diff -b -u -r1.7 -r1.9
--- admin/markup_tags_modify_2.html     7 Dec 2001 23:42:27 -0000       1.7
+++ admin/markup_tags_modify_2.html     2 Mar 2002 02:32:13 -0000       1.9
@@ -1,7 +1,7 @@
 <%ifnot markup_tag%><%set error_message = "No markup tag selected"%><%include markup_tags_modify.html%><%endparse%><%endifnot%>
 <% -- The line above takes us back to the tag selection page with an error if no tag was selected -- %>
 <%if markup_tag and modify_tag%>
-  <%GForum::Markup::modify_tag(tag => $markup_tag, html => $markup_html, closing => $closing_markup_html, markup_type => $markup_type)%>
+  <%GForum::Markup::modify_tag(tag => $markup_tag, html => $markup_html, closing => $closing_markup_html, markup_type => $markup_type, clear_newlines => $clear_newlines)%>
   <%if has_closing%>
     <%set success_message   = "Changes to tags '["%>
     <%set success_message_2 = $markup_tag%>
@@ -34,7 +34,7 @@

 <body>
 <%set header_title = "Modify Tag"%>
-<%set header_description = "From this page you can modify the available markup tags"%>
+<%set header_description = "From this page you can modify a markup tag. Note - tags with names such as <i>foo()</i> can take arguments. For example, [foo bar] would use the foo() tag, substituting %1% with &quot;bar&quot; You can use %2%, %3%, etc. for additional arguments."%>
 <%include admin_header.html%>

 <%set font_tag = '<font face="Tahoma,Arial,Helvetica" size=2>'%>
@@ -77,6 +77,10 @@
            </small></font>
          </td>
        </tr>
+        <tr>
+          <td><%font_tag%>Clear spaces:<br><small>(Clears extra spaces immediately before and after the markup tag)</small></font></td>
+          <td><input type=checkbox name=clear_newlines<%if clear_newlines%> checked<%endif%>></td>
+        </tr>
        <tr>
          <td align=center colspan=2><%font_tag%><input type=submit value="Modify Tag"></font></td>
        </tr>
Index: admin/plugin.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_help.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/plugin_manager.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -r1.4 -r1.5
Index: admin/plugin_manager_delete.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_delete.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_download.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_download.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_edit.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_edit.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_edit_files.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_edit_files.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_list.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_list.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_pre_install.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_pre_install.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_manager_pre_uninstall.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_manager_pre_uninstall.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/plugin_nav.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_nav.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -r1.4 -r1.5
Index: admin/plugin_wizard_step1.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step1.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard_step2.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step2.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard_step3.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step3.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard_step4.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step4.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/plugin_wizard_step5.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step5.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard_step6.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step6.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/plugin_wizard_step7.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step7.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/plugin_wizard_step8.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/plugin_wizard_step8.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/posts.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/posts.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/posts_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/posts_help.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/setup.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/setup_admin.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_admin.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -r1.5 -r1.6
--- admin/setup_admin.html      1 Nov 2001 21:22:41 -0000       1.5
+++ admin/setup_admin.html      20 Feb 2002 05:29:23 -0000      1.6
@@ -121,12 +121,12 @@
          <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">default_guest_permission</font></b></td>
          <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
             <select name="default_guest_permission" size=1>
-              <option value="0"<%if cfg_default_guest_permission = 0%> selected<%endif%>>No access</option>
-              <option value="1"<%if cfg_default_guest_permission = 1%> selected<%endif%>>Viewable in forum list</option>
-              <option value="2"<%if cfg_default_guest_permission = 2%> selected<%endif%>>Posts viewable but not readable</option>
-              <option value="3"<%if cfg_default_guest_permission = 3%> selected<%endif%>>Read access</option>
-              <option value="4"<%if cfg_default_guest_permission = 4%> selected<%endif%>>Read/Reply access</option>
-              <option value="5"<%if cfg_default_guest_permission = 5%> selected<%endif%>>Read/Reply/Post access</option>
+              <option value="0"<%if cfg_default_guest_permission = 0%> selected<%endif%>><%cfg_forum_group_levels[0]%></option>
+              <option value="1"<%if cfg_default_guest_permission = 1%> selected<%endif%>><%cfg_forum_group_levels[1]%></option>
+              <option value="2"<%if cfg_default_guest_permission = 2%> selected<%endif%>><%cfg_forum_group_levels[2]%></option>
+              <option value="3"<%if cfg_default_guest_permission = 3%> selected<%endif%>><%cfg_forum_group_levels[3]%></option>
+              <option value="4"<%if cfg_default_guest_permission = 4%> selected<%endif%>><%cfg_forum_group_levels[4]%></option>
+              <option value="5"<%if cfg_default_guest_permission = 5%> selected<%endif%>><%cfg_forum_group_levels[5]%></option>
             </select>
          </font></td>
        </tr>
@@ -137,12 +137,12 @@
          <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">default_not_validated_permission</font></b></td>
          <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
             <select name="default_not_validated_permission" size=1>
-              <option value="0"<%if cfg_default_not_validated_permission = 0%> selected<%endif%>>No access</option>
-              <option value="1"<%if cfg_default_not_validated_permission = 1%> selected<%endif%>>Viewable in forum list</option>
-              <option value="2"<%if cfg_default_not_validated_permission = 2%> selected<%endif%>>Posts viewable but not readable</option>
-              <option value="3"<%if cfg_default_not_validated_permission = 3%> selected<%endif%>>Read access</option>
-              <option value="4"<%if cfg_default_not_validated_permission = 4%> selected<%endif%>>Read/Reply access</option>
-              <option value="5"<%if cfg_default_not_validated_permission = 5%> selected<%endif%>>Read/Reply/Post access</option>
+              <option value="0"<%if cfg_default_not_validated_permission = 0%> selected<%endif%>><%cfg_forum_group_levels[0]%></option>
+              <option value="1"<%if cfg_default_not_validated_permission = 1%> selected<%endif%>><%cfg_forum_group_levels[1]%></option>
+              <option value="2"<%if cfg_default_not_validated_permission = 2%> selected<%endif%>><%cfg_forum_group_levels[2]%></option>
+              <option value="3"<%if cfg_default_not_validated_permission = 3%> selected<%endif%>><%cfg_forum_group_levels[3]%></option>
+              <option value="4"<%if cfg_default_not_validated_permission = 4%> selected<%endif%>><%cfg_forum_group_levels[4]%></option>
+              <option value="5"<%if cfg_default_not_validated_permission = 5%> selected<%endif%>><%cfg_forum_group_levels[5]%></option>
             </select>
          </font></td>
        </tr>
@@ -153,12 +153,12 @@
          <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">default_registered_permission</font></b></td>
          <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
             <select name="default_registered_permission" size=1>
-              <option value="0"<%if cfg_default_registered_permission = 0%> selected<%endif%>>No access</option>
-              <option value="1"<%if cfg_default_registered_permission = 1%> selected<%endif%>>Viewable in forum list</option>
-              <option value="2"<%if cfg_default_registered_permission = 2%> selected<%endif%>>Posts viewable but not readable</option>
-              <option value="3"<%if cfg_default_registered_permission = 3%> selected<%endif%>>Read access</option>
-              <option value="4"<%if cfg_default_registered_permission = 4%> selected<%endif%>>Read/Reply access</option>
-              <option value="5"<%if cfg_default_registered_permission = 5%> selected<%endif%>>Read/Reply/Post access</option>
+              <option value="0"<%if cfg_default_registered_permission = 0%> selected<%endif%>><%cfg_forum_group_levels[0]%></option>
+              <option value="1"<%if cfg_default_registered_permission = 1%> selected<%endif%>><%cfg_forum_group_levels[1]%></option>
+              <option value="2"<%if cfg_default_registered_permission = 2%> selected<%endif%>><%cfg_forum_group_levels[2]%></option>
+              <option value="3"<%if cfg_default_registered_permission = 3%> selected<%endif%>><%cfg_forum_group_levels[3]%></option>
+              <option value="4"<%if cfg_default_registered_permission = 4%> selected<%endif%>><%cfg_forum_group_levels[4]%></option>
+              <option value="5"<%if cfg_default_registered_permission = 5%> selected<%endif%>><%cfg_forum_group_levels[5]%></option>
             </select>
          </font></td>
        </tr>
@@ -169,12 +169,12 @@
          <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">default_moderator_permission</font></b></td>
          <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
             <select name="default_moderator_permission" size=1>
-              <option value="0"<%if cfg_default_moderator_permission = 0%> selected<%endif%>>No access</option>
-              <option value="1"<%if cfg_default_moderator_permission = 1%> selected<%endif%>>Viewable in forum list</option>
-              <option value="2"<%if cfg_default_moderator_permission = 2%> selected<%endif%>>Posts viewable but not readable</option>
-              <option value="3"<%if cfg_default_moderator_permission = 3%> selected<%endif%>>Read access</option>
-              <option value="4"<%if cfg_default_moderator_permission = 4%> selected<%endif%>>Read/Reply access</option>
-              <option value="5"<%if cfg_default_moderator_permission = 5%> selected<%endif%>>Read/Reply/Post access</option>
+              <option value="0"<%if cfg_default_moderator_permission = 0%> selected<%endif%>><%cfg_forum_group_levels[0]%></option>
+              <option value="1"<%if cfg_default_moderator_permission = 1%> selected<%endif%>><%cfg_forum_group_levels[1]%></option>
+              <option value="2"<%if cfg_default_moderator_permission = 2%> selected<%endif%>><%cfg_forum_group_levels[2]%></option>
+              <option value="3"<%if cfg_default_moderator_permission = 3%> selected<%endif%>><%cfg_forum_group_levels[3]%></option>
+              <option value="4"<%if cfg_default_moderator_permission = 4%> selected<%endif%>><%cfg_forum_group_levels[4]%></option>
+              <option value="5"<%if cfg_default_moderator_permission = 5%> selected<%endif%>><%cfg_forum_group_levels[5]%></option>
             </select>
          </font></td>
        </tr>
Index: admin/setup_defaults.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_defaults.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/setup_defaults.html   26 Sep 2001 22:11:43 -0000      1.2
+++ admin/setup_defaults.html   4 Mar 2002 04:03:02 -0000       1.3
@@ -58,6 +58,13 @@
       <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="default_mh_search" value="<%cfg_default_mh_search%>" size="40"></font></td>
     </tr>
     <tr>
+      <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">This is the default number of users to show per page of the Member Directory.</font></td>
+    </tr>
+    <tr>
+      <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">default_mh_user</font></b></td>
+      <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="default_mh_user" value="<%cfg_default_mh_user%>" size="40"></font></td>
+    </tr>
+    <tr>
       <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">The default post display method.</font></td>
     </tr>
     <tr>
Index: admin/setup_disabled.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_disabled.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -r1.5 -r1.6
--- admin/setup_disabled.html   9 Nov 2001 20:56:04 -0000       1.5
+++ admin/setup_disabled.html   11 Apr 2002 20:09:25 -0000      1.6
@@ -8,23 +8,23 @@
 <%set font_tag = '<font face="Tahoma,Arial,Helvetica" size=2>'%>

 <%if disable_forum%>
-<%GForum::Utils::disable_forum($disabled_message)%>
-<%elsif enable_forum%>
-<%GForum::Utils::enable_forum%>
-<%elsif disabled_message%>
-<%GForum::Utils::disabled_message($disabled_message)%>
+<%GForum::Utils::disable_forum($forum_disabled, $disabled_message)%>
 <%endif%>

 <%GForum::Config::tpl_get(disabled, disabled_message)%>
 <%if disabled%>
-<%set header_title = 'Enable Forum'%>
-<%set header_description = 'You can enable or change the disabled reason from this page'%>
-<%set error_message = 'The forum is currently disabled:<br>'%>
-<%set error_message_2 = $disabled_message%>
+  <%set header_title = 'Enable Forum'%>
+  <%set header_description = 'You can enable or change the disabled reason from this page'%>
+  <%if disabled == 2%>
+    <%set error_message = 'The forum is currently disabled for all users except admins:<br>'%>
+  <%else%>
+    <%set error_message = 'The forum is currently disabled for all users:<br>'%>
+  <%endif%>
+  <%set error_message_2 = $disabled_message%>
 <%else%>
-<%set header_title = 'Disable Forum'%>
-<%set header_description = 'You can disable the forum from this page'%>
-<%set success_message = 'The forum is currently enabled'%>
+  <%set header_title = 'Disable Forum'%>
+  <%set header_description = 'You can disable the forum from this page'%>
+  <%set success_message = 'The forum is currently enabled'%>
 <%endif%>

 <%include admin_header.html%>
@@ -49,10 +49,20 @@
        <tr>
          <td colspan=2 align=center>
            <%font_tag%>
-<%if disabled%>              <input type=submit name="enable_forum=1" value="Enable forum">
-             <input type=submit name="disable_forum=1" value="Change message">
-<%else%>              <input type=submit name="disable_forum=1" value="Disable forum">
-<%endif%>            </font>
+             <select name="forum_disabled" size="1">
+<%if disabled%>
+               <option value="0">Enable All</option>
+<%endif%>
+<%if disabled != 1%>
+               <option value="1">Disable All</option>
+<%endif%>
+<%if disabled != 2%>
+               <option value="2">Allow Admins</option>
+<%endif%>
+               <option value="<%disabled%>">Save Message</option>
+             </select>
+             <input type="submit" name="disable_forum" value="Submit">
+           </font>
          </td>
        </tr>
       </table>
@@ -60,4 +70,3 @@
   </tr>
 </table>
 </form>
-
Index: admin/setup_first.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_first.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -r1.4 -r1.5
Index: admin/setup_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_help.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/setup_nav.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_nav.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -u -r1.8 -r1.9
Index: admin/setup_pass.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_pass.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -r1.5 -r1.6
Index: admin/setup_path.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_path.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -r1.9 -r1.10
Index: admin/setup_posts.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_posts.html,v
retrieving revision 1.5
retrieving revision 1.7
diff -b -u -r1.5 -r1.7
--- admin/setup_posts.html      7 Dec 2001 23:42:27 -0000       1.5
+++ admin/setup_posts.html      11 Apr 2002 02:14:40 -0000      1.7
@@ -43,6 +43,21 @@
          <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="hot_minutes" value="<%cfg_hot_minutes%>" size="4"></font></td>
        </tr>
        <tr>
+          <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">If enabled,
+          this will allow guest poster to enter their own username, provide no user with the
+          same username exists. Note that anonymous posting also requires that a user with status
+          'Guest' exists and is enabled.</font></td>
+       </tr>
+       <tr>
+          <td width="16%"><font face="Tahoma,Arial,Helvetica" size="2"><b>post_guest_custom_username</b></font></td>
+         <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
+            <select name="post_guest_custom_username" size=1>
+              <option value="1"<%if cfg_post_guest_custom_username%> selected<%endif%>>Yes</option>
+              <option value="0"<%unless cfg_post_guest_custom_username%> selected<%endunless%>>No</option>
+           </select>
+         </td>
+       </tr>
+       <tr>
          <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">This option
          controls whether or not the username of the poster being replies to will be added to
          the posts. It can be added either at the beginning ('[username] Re: some subject'),
@@ -57,6 +72,22 @@
              <option value="after_re"<% if cfg_post_reply_subject_username eq after_re %> selected<%set prsu_selected = 1%><%endif%>>After Re:</option>
              <option value="end"<%      if cfg_post_reply_subject_username eq end      %> selected<%set prsu_selected = 1%><%endif%>>End</option>
              <option value=""<%ifnot prsu_selected%> selected<%endif%>>None</option>
+           </select>
+         </td>
+       </tr>
+       <tr>
+         <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">This option
+         controls the position of the 'Re:' text. You can specify either that 'Re:' (set in the
+         language variables) show up at the beginning (eg. Re: subject) or at the end of the subject
+         (eg. subject - Re). Note that setting this to "End" will alter the behaviour of the "After Re:"
+         setting above to make it come between the subject and the "Re:"</font></td>
+       </tr>
+       <tr>
+         <td width="16%"><font face="Tahoma,Arial,Helvetica" size="2"><b>post_reply_position</b></font></td>
+         <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
+           <select name="post_reply_position" size=1>
+             <option value="beginning"<%if cfg_post_reply_position ne end%> selected<%endif%>>Beginning</option>
+             <option value="end"<%      if cfg_post_reply_position eq end%> selected<%endif%>>End</option>
            </select>
          </td>
        </tr>
Index: admin/setup_reset.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_reset.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/setup_second.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_second.html,v
retrieving revision 1.5
retrieving revision 1.7
diff -b -u -r1.5 -r1.7
--- admin/setup_second.html     11 Oct 2001 17:33:02 -0000      1.5
+++ admin/setup_second.html     13 Mar 2002 01:12:34 -0000      1.7
@@ -86,3 +86,8 @@
 </form>^M
 </body>^M
 </html>^M
+
+<!-- 
+       For windows installer
+       GTERR: [<%error%>]
+-->
Index: admin/setup_sql.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_sql.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -r1.7 -r1.8
Index: admin/setup_third.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_third.html,v
retrieving revision 1.4
retrieving revision 1.6
diff -b -u -r1.4 -r1.6
--- admin/setup_third.html      19 Oct 2001 20:07:29 -0000      1.4
+++ admin/setup_third.html      13 Mar 2002 01:12:34 -0000      1.6
@@ -36,3 +36,8 @@
   </table>^M
 </body>^M
 </html>^M
+
+<!-- 
+  For Windows Installer
+  GTINST: done
+-->
Index: admin/setup_users.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/setup_users.html,v
retrieving revision 1.8
retrieving revision 1.15
diff -b -u -r1.8 -r1.15
--- admin/setup_users.html      10 Oct 2001 00:37:26 -0000      1.8
+++ admin/setup_users.html      27 May 2002 19:42:31 -0000      1.15
@@ -19,7 +19,7 @@
       <td width="100%">
   <table border="0" cellpadding="2" cellspacing="3" width="100%">
     <tr>
-      <td width="100%" colspan="2" bgcolor="#DDDDDD"><b><font size="2" face="Verdana,Arial,Helvetica">Misc
+      <td width="100%" colspan="2" bgcolor="#DDDDDD"><b><font size="2" face="Verdana,Arial,Helvetica">User
        Options:</font></b></td>
     </tr>
     <tr>
@@ -53,6 +53,18 @@
       </td>
     </tr>
     <tr>
+      <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">The following is used to restrict
+      e-mail addresses. You should enter one pattern per line. Users will not be able to sign up with any matching
+      e-mail addresss. Use a ? to match any single character and * to match any number of characters.</font></td>
+    </tr>
+    <tr>
+      <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">banned_email</font></b></td>
+      <td width="84%">
+       <textarea name="banned_email" cols="39" rows="8">
+<%GForum::Config::textarea(banned_email)%></textarea>
+      </td>
+    </tr>
+    <tr>
       <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">The title given to a user after making a certain number of posts.</font></td>
     </tr>
     <tr>
@@ -63,6 +75,24 @@
       </td>
     </tr>
     <tr>
+      <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">The User table columns listed below cannot be changed via the profile. Note that you should not delete any value from this list unless you are absolutely sure of what doing so would allow.</font></td>
+    </tr>
+    <tr>
+      <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">user_private_fields</font></b></td>
+      <td width="84%">
+        <input type="text" name="user_private_fields" size="40" value="<%cfg_user_private_fields%>">
+      </td>
+    </tr>
+    <tr>
+      <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">Only fields entered here may be searched on using the member directory search. If you wish to add new search options (or sort options) you should enter the column names here.</font></td>
+    </tr>
+    <tr>
+      <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">user_search_allowed</font></b></td>
+      <td width="84%">
+        <input type="text" name="user_search_allowed" size="40" value="<%cfg_user_search_allowed%>">
+      </td>
+    </tr>
+    <tr>
       <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">A list (may contain ranges using a dash) or characters (In hexidecimal notation using \xXX where XX is the hexidecimal number) which are not allowed in usernames. If you wish to disallow usernames with -'s in them, you must put the - at the end.</font></td>
     </tr>
     <tr>
@@ -82,6 +112,21 @@
     <tr>
       <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">username_min_length</font></b></td>
       <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="username_min_length" value="<%cfg_username_min_length%>" size="40"></font></td>
+    </tr>
+    <tr>
+      <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">By default, new users will be taken to the main page the first time they log in. You can, optionally, take them directly into one of the profile pages using this option.</font></td>
+    </tr>
+    <tr>
+      <td width="16%"><b><font size="2" face="Tahoma,Arial,Helvetica">user_first_action</font></b></td>
+      <td width="84%"><font face="Tahoma,Arial,Helvetica" size="2">
+        <select name="user_first_action" size="1">
+          <option value="cat_list"<%if cfg_user_first_action eq 'cat_list' or not cfg_user_first_action%> selected<%endif%>>Main category list page</option>
+          <option value="user_profile"<%        if cfg_user_first_action eq 'user_profile'%> selected<%endif%>>Edit profile</option>
+          <option value="user_profile_basic"<%  if cfg_user_first_action eq 'user_profile_basic'%> selected<%endif%>>Profile: User Profile</option>
+          <option value="user_profile_display"<%if cfg_user_first_action eq 'user_profile_display'%> selected<%endif%>>Profile: Display Settings</option>
+          <option value="user_profile_email"<%  if cfg_user_first_action eq 'user_profile_email'%> selected<%endif%>>Profile: Subscriptions</option>
+        </select>
+      </font></td>
     </tr>
     <tr>
       <td width="100%" colspan="2"><font face="Tahoma,Arial,Helvetica" size="2">This option, if enabled, allows users to change their username.</font></td>
Index: admin/templates.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/templates_email.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_email.html,v
retrieving revision 1.6
retrieving revision 1.10
diff -b -u -r1.6 -r1.10
--- admin/templates_email.html  17 Dec 2001 19:30:19 -0000      1.6
+++ admin/templates_email.html  3 Apr 2002 00:35:23 -0000       1.10
@@ -12,6 +12,17 @@
   <%else%>^M
     <%set template_file = $tpl_file%>^M
   <%endif%>^M
+  <%if template_file eq 'thread_notify.eml'%>
+  <%GT::Mail::Editor::tpl_save(
+      dir      => $template_root,
+      template => $tpl_dir,
+      file     => $template_file,
+      header   => Subject => $header_Subject,
+      header   => From    => $header_From,
+      extra_headers => $extra_headers,
+      body     => $body
+  )%>
+  <%else%>
   <%GT::Mail::Editor::tpl_save(^M
       dir      => $template_root,^M
       template => $tpl_dir,^M
@@ -22,6 +33,7 @@
       extra_headers => $extra_headers,^M
       body     => $body^M
   )%>^M
+  <%endif%>
   <%if error%>^M
     <%set error_message = "Unable to save template:<br>"%>^M
     <%set error_message_2 = $error%>^M
@@ -87,6 +99,7 @@
           <%loop dir_select%>^M
             <option value="<%directory%>"<%if dir_selected%> selected<%endif%>><%directory%></option>^M
           <%endloop%>^M
+          </select>
           <input type=submit value=Change name=load_template>^M
         </font></p>^M
 ^M
@@ -104,7 +117,11 @@
         <table border=0 cellpadding=0 cellspacing=2 width="100%">^M
           <tr>^M
             <td><font size=2 face="Tahoma,Arial,Helvetica">To:</font></td>^M
+<%if tpl_file eq 'thread_notify.eml'%>
+            <td><font size=2 face="Tahoma,Arial,Helvetica">Undisclosed Recipients</font></td>
+<%else%>
             <td><input type="text" size="<%editor_cols%>" name="header_To" value="<%if displaying_template%><%escape_html header_To%><%endif%>"></td>^M
+<%endunless%>
           </tr>^M
           <tr>^M
             <td><font size=2 face="Tahoma,Arial,Helvetica">Subject:</font></td>^M
Index: admin/templates_globals.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_globals.html,v
retrieving revision 1.5
retrieving revision 1.7
diff -b -u -r1.5 -r1.7
--- admin/templates_globals.html        18 Dec 2001 02:23:14 -0000      1.5
+++ admin/templates_globals.html        12 May 2002 01:07:03 -0000      1.7
@@ -44,6 +44,7 @@
         <%loop dir_select%>^M
           <option value="<%directory%>"<%if dir_selected%> selected<%endif%>><%directory%></option>^M
         <%endloop%>^M
+        </select>
         <input type="submit" value="Change" name="change"></font></p>^M
 ^M
        <p><%global_table%></p>^M
Index: admin/templates_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_help.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/templates_help.html   19 Oct 2001 20:07:29 -0000      1.2
+++ admin/templates_help.html   2 Mar 2002 02:32:13 -0000       1.3
@@ -19,6 +19,9 @@
       menu allows you to view and edit the templates from which your
       database's HTML pages will be built.</font></p>

+<p><font face="Tahoma,Arial,Helvetica" size="2">The "Email Templates" 
+      menu allows you to view and edit the templates from which emails that are automatically sent to your users will be built.</font></p>
+
       <p><font face="Tahoma,Arial,Helvetica" size="2">The "Language Variables"
       menu allows you to edit the language that Gossamer Forum will
       display in prompts, warnings and error messages.</font></p>
Index: admin/templates_language.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_language.html,v
retrieving revision 1.6
retrieving revision 1.8
diff -b -u -r1.6 -r1.8
--- admin/templates_language.html       18 Dec 2001 02:23:14 -0000      1.6
+++ admin/templates_language.html       12 Apr 2002 23:19:25 -0000      1.8
@@ -41,7 +41,7 @@
 ^M
 <p><font size="2" face="Tahoma,Arial,Helvetica">^M
 <%loop prefix_list%>^M
-<a href="admin.cgi?do=page;page=templates_language.html;prefix=<%prefix%>"><%prefix%> (<%num_vars%>)</a>^M
+<a href="admin.cgi?do=page;page=templates_language.html;prefix=<%prefix%>;tpl_dir=<%tpl_dir%>"><%prefix%> (<%num_vars%>)</a>
 <%endloop%>^M
 </font></p>^M
 ^M
Index: admin/templates_nav.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_nav.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -r1.3 -r1.4
Index: admin/templates_tpl.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/templates_tpl.html,v
retrieving revision 1.9
retrieving revision 1.11
diff -b -u -r1.9 -r1.11
--- admin/templates_tpl.html    17 Dec 2001 19:30:19 -0000      1.9
+++ admin/templates_tpl.html    4 Mar 2002 19:00:15 -0000       1.11
@@ -113,7 +113,7 @@
                   </tr>^M
                   <tr>^M
                     <td bgcolor="#AAAAAA"><%font_tag%>File&nbsp;size:</font></td>^M
-                    <td bgcolor="white" id="size"><%font_tag%><%if tpl_file%><%file_size%> bytes<%else%><%if tpl_file%><%font_tag%><%file_size%> bytes</font><%else%>&nbsp;<%endif%>&nbsp;<%endif%></font></td>^M
+                    <td bgcolor="white" id="size"><%font_tag%><%if tpl_file%><%file_size%> bytes<%else%>&nbsp;<%endif%></font></td>
                   </tr>^M
                   <tr>^M
                     <td bgcolor="#AAAAAA"><%font_tag%>Status:</font></td>^M
Index: admin/tools.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/tools.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/tools_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/tools_help.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/tools_mysqlman.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/tools_mysqlman.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -r1.5 -r1.6
Index: admin/tools_nav.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/tools_nav.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -r1.4 -r1.5
--- admin/tools_nav.html        9 Nov 2001 20:56:04 -0000       1.4
+++ admin/tools_nav.html        5 Jan 2002 21:55:48 -0000       1.5
@@ -25,6 +25,7 @@
       &nbsp; <a href="db.cgi?db=Forum;do=editor_table_form">Forum</a><br>
       &nbsp; <a href="db.cgi?db=Post;do=editor_table_form">Post</a><br>
       &nbsp; <a href="db.cgi?db=Message;do=editor_table_form">Message</a><br>
+      &nbsp; <a href="db.cgi?db=SentMessage;do=editor_table_form">SentMessage</a><br>
       &nbsp; <a href="db.cgi?db=Grouping;do=editor_table_form">Grouping</a><br>
       &nbsp; <br>
       &nbsp; <a href="admin.cgi?do=page;page=tools_reindex.stream.html">Reindex</a><br>
Index: admin/tools_sql_monitor.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/tools_sql_monitor.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -r1.5 -r1.6
Index: admin/users.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/users.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/users_help.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/users_help.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_admin.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_admin.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_email.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_email.html,v
retrieving revision 1.2
retrieving revision 1.4
diff -b -u -r1.2 -r1.4
--- admin/help/help_email.html  19 Oct 2001 20:07:29 -0000      1.2
+++ admin/help/help_email.html  4 Mar 2002 19:00:15 -0000       1.4
@@ -2,7 +2,7 @@

 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<title>Gossamer Forum Help: Email</title>
+<title>Gossamer Forum Help: Markup</title>
 </head>

 <body>
@@ -20,98 +20,54 @@
 </TABLE>
 <TABLE width=100% cellpadding=20>
 <TR><TD>
-    <p><u><font face="Tahoma, Arial, Helvetica" size="4">User Templates</font></u></p>
+    <p><u><font size="4" face="Tahoma,Arial,Helvetica">Mass Mail</font></u></p>
     <blockquote>
-      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking &quot;User
-      Templates&quot; brings up a menu allowing you to view and modify all of
-      your database's templates.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Select
-      a template set from the &quot;Currently working on template set&quot;
-      drop-down menu and click the &#8220;Change&#8221; button.<span style="mso-spacerun: yes">&nbsp;
-      </span>If you want changes to your templates to be visible when you
-      rebuild your directory, you should modify the template set selected in the
-      &#8220;default_template_set&#8221; field in the &quot;Default Options&#8221; section
-      of the &quot;Setup&#8221; menu.&nbsp;</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Select
-      a specific template from the &quot;Available templates&quot; drop-down
-      menu.&nbsp; Click &#8220;Load&#8221; to see the template displayed in the main
-      text area in the centre of the page.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">You
-      have the option of viewing and editing the template in an HTML editor
-      (click the link below the main text area to switch between the HTML editor
-      and the plain text editor).&nbsp; Note that certain tags may not be
-      accurately transferred from the plain text editor to the HTML editor.&nbsp;
-      Additionally, the HTML editor only functions on Microsoft IE browsers.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">The
-      size of the main text area can also be edited (enter values for the
-      columns and rows in the &#8220;Resize Textarea&#8221; fields).<span style="mso-spacerun: yes">&nbsp;</span></font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Insert
-      changes to the template in the main text area.<span style="mso-spacerun: yes">&nbsp;</span><br style="mso-special-character: line-break">
-      <br style="mso-special-character: line-break">
-      Click &#8220;Save&#8221; to confirm your changes to the template (you can alter
-      the name of the template in the field beside the &#8220;Save&#8221; button).<span style="mso-spacerun: yes">&nbsp;</span></font></p>
-    </blockquote>
+      <p><font size="2" face="Tahoma, Arial, Helvetica">Gossamer Forum provides you with a Mass Mailer, allowing you to send mail to all users or to select groups.  Detailed search forms allow you to refine your mailings' recipients. The Mass Mail options allow you to write and send email to whichever users you choose.  Mass mails can be composed using "All Users" or "Selected Users" options.<br><br>

-<p><u><font face="Tahoma, Arial, Helvetica" size="4">Email Templates</font></u></p>
-    <blockquote>
-      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking "Email Templates" brings up a menu allowing you to edit the templates from that will be used to build emails automatically sent to your forum's users.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Select the template set you wish to modify from the first drop-down menu and click "Change".  Next, select the specific template you wish to modify from the drop-down menu (see below for descriptions of these templates) and click "Load".<span style="mso-spacerun: yes">&nbsp;
-      </span>The email template will be displayed in the "To", "Subject", "From" and "E-mail body" fields.  Clicking the "Show Extra Headers" button opens a field allowing extra headers to be added to the template or modified.  Make changes to the text and tags included in the desired fields.  You can save the template under a different name by entering one in the &#8220;Save template as:&#8221; field and clicking the &#8220;Save&#8221; button, or resize the template&#8217;s textarea by entering values in the row and column fields and clicking the &#8220;Change&#8221; button.&nbsp;</font></p>
-      <span style="mso-spacerun: yes">&nbsp;</span></font></p>
-    </blockquote>
+To personalize mailings being sent to more than one recipient, you can insert any of the fields in the Users Table into the mailing by using tags.  For example: typing &lt;%user_username%&gt; or &lt;%user_email%&gt; in the body of the mailing will insert each user's username or email address into their individual copy of the mailing.  Ensure that the field actually does exist in the database and that you've properly copied the spelling and casing, or an unknown tag error will appear.<br><br>
+
+To send an email, fill in the relevant fields (Name, Email, Subject, Message Format, Message) and click the "Send Emails" button.  You will be brought to the "View Mailings" menu, which displays all current and recently completed mailings.  To send the email you just created, click the "Start Mailing" link next to it.  Click the "Details" link to review the recipients and content of the email.<br><br>
+
+Click the "Cancel mailing" link if you wish to cancel the email.  You will be presented with the option of either confirming or aborting the cancellation of the mailing, as well as the details of the mailing. You can also delete all completed mailings and cancel/delete all current mailings from the "View Mailings" menu by clicking on the appropriate links at the bottom of the menu.  You will be prompted to either confirm or abort all deletions and cancellations.<br><br>

+You also have the option of creating, editing and loading custom-made email templates from the Mass Mail menus.  To create an email template, fill in the relevant fields as you would a regular email, but don't click the "Send Emails" button.  Ensure that the "Template" drop-down menu reads "New Template", and click the "Save" button just below it.  You will be prompted to give your new template a name.  After doing so, you will be returned to the appropriate Mass Mail menu, with the name of your new template displayed in the "Template" drop-down menu. 
+To load a pre-existing email template, select the template you want from the "Template" drop-down menu and click the "Load" button.<br><br> 

-    <p class="Directions">&nbsp;</p>
-    <p class="Directions"><u><font face="Tahoma, Arial, Helvetica" size="4">Language
-    Variables</font></u></p>
+You can edit a template by loading it, editing its fields and clicking the "Save" button, or you can create a new, separate template by clicking "Save as~E" after making your changes. 
+You can delete a template by clicking "Delete" after loading it.  
+
+         </font></p>
+    </blockquote>
+    <ul>
+      <li><b><u><font size="2" face="Tahoma, Arial, Helvetica">All Users</font></u></b></li>
+    </ul>
     <blockquote>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Clicking
-      &quot;Language Variables&quot; displays a menu allowing you to view and
-      modify the text that will be displayed to your database's users in
-      prompts, warnings and error messages.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Select
-      a template set from the drop-down menu.<span style="mso-spacerun: yes">&nbsp;
-      </span>If you want changes to your language settings to be visible when
-      you rebuild your directory, you should modify the template set selected in
-      the &#8220;default_template_set&#8221; option in the &quot;Default Options&#8221;
-      section of the &quot;Setup&#8221; menu.<br style="mso-special-character: line-break">
-      <br style="mso-special-character: line-break">
-      <span style="mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-CA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Click
-      on a language category (ACTION, CATEGORY, LOGIN, etc.) to bring up a list
-      of all messages in that category.</span></font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Re-type
-      the message in the &#8220;Description&#8221; field in the language you want, and
-      click the &#8220;Save Changes&#8221; button.<span style="mso-spacerun: yes">&nbsp;
-      </span>Changes to the messages will be applied throughout the program
-      wherever the corresponding language code (displayed to the left of the
-      &#8220;Description&#8221; field) is found.<span style="mso-spacerun: yes">&nbsp;</span></font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">You
-      can also add or delete codes and descriptions in the User Language menu.<span style="mso-spacerun: yes">&nbsp;
-      </span>Enter new codes and descriptions in the blank fields at the bottom
-      of the page, or check the &#8220;Delete&#8221; boxes beside the messages and click
-      the &#8220;Save Changes&#8221; button.</font></p>
+      <p><font size="2" face="Tahoma, Arial, Helvetica">Clicking "All Users" allows you to send email to all users who have agreed to accept email from your database.  You can see the complete list of these users by clicking the link displaying the number of email recipients at the top of the email composition form. </font></p>
     </blockquote>
-    <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">&nbsp;</font></p>
-    <p class="Directions"><u><font face="Tahoma, Arial, Helvetica" size="4">Global
-    Variables</font></u></p>
+    <ul>
+      <li><b><u><font size="2" face="Tahoma, Arial, Helvetica">Selected Users</font></u></b></li>
+    </ul>
     <blockquote>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Clicking
-      &quot;Global Variables&quot; displays a menu allowing you to view and edit
-      your databases' globals.&nbsp; Globals are HTML tags that can be used in
-      all templates.</font></p>
-      <p class="Directions"><font face="Tahoma, Arial, Helvetica" size="2">Select
-      a template set from the first drop-down menu.<span style="mso-spacerun: yes">&nbsp;
-      </span>If you want changes to your globals to be visible when you rebuild
-      your directory, you should modify the template set selected in the
-      &#8220;default_template_set&#8221; option in the &quot;Default Options&#8221; section
-      of the &quot;Setup&#8221; menu.&nbsp; Make changes to the global in the
-      &#8220;Description&#8221; field, and click the &#8220;Save Changes&#8221; button.</font></p>
-      <p class="Directions"><font size="2"><font face="Tahoma, Arial, Helvetica">To
-      create a new global, enter it&#8217;s name in the Code field.&nbsp; </font><span style="mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-CA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><font face="Tahoma, Arial, Helvetica">Enter
-      the new global&#8217;s content in the Description field at the bottom of the
-      page (globals can be written in HTML or regular text), and click the
-      &#8220;Save Changes&#8221; button</font></span></font><span style="font-size: 12pt; mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-CA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">.</span></p>
+      <p><font size="2" face="Tahoma, Arial, Helvetica">Clicking "Selected Users" allows you to send email to users who fit the results of a search.  Enter search terms in the form provided, and click the "Search For Users" button.  You will be brought to the email composition form.  To confirm that you have selected the users you wish to email, click the link displaying the number of email recipients at the top of the email composition form.</font></p>
     </blockquote>
+ 
+    <p><u><font size="4" face="Tahoma,Arial,Helvetica">Current Mailings: View</font></u></p>
+    
+    <blockquote>
+      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking "View" displays the "View Mailings" menu, which displays current and recently completed mailings, and allows you to manage them in several ways:<br><br>
+
+Click the "Start Mailing" link next to an unsent mailing to send it. <br><br>
+
+Click the "Details" link next to a mailing to review its recipients and content. <br><br>
+
+Click the "Cancel mailing" link next to an unsent mailing if you wish to cancel the mailing.  You will be presented with the option of either confirming or aborting the cancellation of the mailing, as well as the details of the mailing. <br><br>
+
+Click the "Delete mailing" link next to a completed mailing if you wish to permanently delete it from the "View Mailings" menu.<br><br>
+
+You can also delete all completed mailings and cancel/delete all current mailings from the "View Mailings" menu by clicking on the appropriate links at the bottom of the menu.  You will be prompted to either confirm or abort all deletions and cancellations.
+</font></p>
+    </blockquote>
+    

 </TD>
 </TR>
Index: admin/help/help_forums.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_forums.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/help/help_forums.html 19 Oct 2001 20:07:29 -0000      1.2
+++ admin/help/help_forums.html 10 Jan 2002 09:02:19 -0000      1.3
@@ -22,45 +22,27 @@
 <TR><TD>
     <p><font size="4" face="Tahoma,Arial,Helvetica"><u> Forums</u></font></p>
     <ul>
-      <li><u><b><font size="2" face="Tahoma,Arial,Helvetica">Add</font><a name="add"></a></b></u></li>
+      <li><u><b><font size="2" face="Tahoma,Arial,Helvetica">Add Forum</font><a name="add"></a></b></u></li>
     </ul>
     <blockquote>
-    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the Forums "Add" link brings up a form allowing you to define all aspects of a forum before creating it.  Note that you must assign the forum to a category by selecting one from the drop-down "Category" menu.  The "Description" field cannot be left
-    blank.</font></p>
+    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the "Add Forum" link brings up a form allowing you to define all aspects of a forum before creating it. Note that you must assign the forum to a category by selecting one from the drop-down "Category" menu. The "Name" field cannot be left blank.</font></p>
     </blockquote>
-    <ul><li><b><u><font size="2" face="Tahoma,Arial,Helvetica">List</font><a name="list"></a></u></b></li>
+    <ul><li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Add Category</font><a name="list"></a></u></b></li>
     </ul>
     <blockquote>
-    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the "List" link displays a detailed record of all categories and forums in your database.</font></p>
+    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the "Add Category" link brings up a form allowing you to define all aspects of a category before creating it.  The "Name" field cannot be left blank.</font></p>
     </blockquote>
     <ul>
-      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Sort Order</font><a name="sort_order"></a></u></b></li>
+      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">List All</font><a name="sort_order"></a></u></b></li>
     </ul>
     <blockquote>
-    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the"Sort Order" link displays a form allowing you to set the order in which your forums and categories will be displayed to users. Forums and categories will be sorted by the values entered in the fields beside them, with the forums with the highest values being displayed at the top of the category, and the categories with the highest values being displayed at the top of the page.</font></p>
+    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the "List All" link displays a hierarchical list of all categories and forums in your database.  Categories will be underlined.  Individual categories and forums can be viewed in detail, modified or deleted by clicking the "Details", "Modify" and "Delete" links beside each category or forum name.  To see detailed records of all forums or categories, click the "Forums" or "Categories" links at the top of the page.</font></p>
     </blockquote>
-
-    <p>&nbsp;</p>
-    <p><font size="4" face="Tahoma, Arial, Helvetica"><u>Categories</u></font></p>
     <ul>
-      <li><u><b><font face="Tahoma, Arial, Helvetica" size="2">Add<a name="cat_add"></a></font></b></u></li>
-    </ul>
-    <blockquote>
-      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking the Categories "Add" link brings up a form allowing you to define all aspects of a category before creating it.  The "Name" field cannot be left blank.</font></p>
-    </blockquote>
-    <ul><li><b><u><font face="Tahoma, Arial, Helvetica" size="2">List<a name="cat_list"></a></font></u></b></li>
-    </ul>
-    <blockquote>
-    <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking Clicking the "List" link displays a detailed record of all categories and forums in your database.</font></p>
-    </blockquote>
-    <ul>
-      <li><font face="Tahoma, Arial, Helvetica" size="2"><b><u>Sort Order</u></b></font><b><u><font face="Tahoma, Arial, Helvetica" size="2"><a name="cat_sort_order"></a></font></u></b></li>
+      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Sort Order</font><a name="sort_order"></a></u></b></li>
     </ul>
     <blockquote>
-    <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking the"Sort Order" link displays a form allowing you to set the order in which your forums and categories will be displayed to users. Forums and categories will be sorted by the values entered in the fields beside them, with the forums with the highest values being displayed at the top of the category, and the categories with the highest values being displayed at the top of the page.</font></p>
-    </blockquote>
-    <blockquote>
-    <p>&nbsp;</p>
+    <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the "Sort Order" link displays a form allowing you to set the order in which your forums and categories will be displayed to users. Forums and categories will be sorted by the values entered in the fields beside them in ascending order, with the forums with the lowest values being displayed at the top of the category, and the categories with the lowest values being displayed at the top of the page.</font></p>
     </blockquote>

 </TD>
Index: admin/help/help_guide.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_guide_enhance.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide_enhance.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/help/help_guide_libs.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide_libs.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_guide_libs_top.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide_libs_top.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_guide_mailarc.html
===================================================================
RCS file: admin/help/help_guide_mailarc.html
diff -N admin/help/help_guide_mailarc.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ admin/help/help_guide_mailarc.html  4 Mar 2002 19:00:15 -0000       1.3
@@ -0,0 +1,864 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>Gossamer Forum Help: Plug Ins</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+
+<H1><font face="Verdana, Arial, Helvetica">Gossamer Forum Help</font></H1>
+
+<TABLE width=100%>
+<TR>
+<TD align="right" valign="top">
+<HR>
+<B><a href="admin.cgi?do=help&topic=help_toc.html"><font face="Verdana, Arial, Helvetica" size="2">Table
+of Contents</font></a></B>
+</TD>
+</TR>
+</TABLE>
+
+<table width="100%" cellpadding="20">
+  <tr>
+    <td>
+
+    <p><font face="Verdana, Arial, Helvetica" size="4"><a href="admin.cgi?do=help&amp;topic=help_guide.html">Gossamer Forum Developers Guide</a>:
+    Sample Plugin</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Sample Plugin - MailArc<br>
+    </b>In this sample, we will develop a sample plugin so you can see the full
+    process from Start to End. It's recommended you open a new browser window
+    with the <a href="admin.cgi?do=page&page=plugin_wizard.html" target="_blank">plugin
+    wizard</a> and follow along. The plugin wizard will create a template for
+    you to use to start your plugin.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">We are going to create MailArc plugin which allows you to use Gossamer Forum as an archive for mailing lists.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 1: Naming your
+    plugin</b><br>
+    You will be prompted to give your plugin a name. The name of your plugin
+    corresponds to the package space it will run under, so it must conform to
+    perls syntax. It should be only letters and numbers, and must not contain
+    spaces. Our sample plugin is called 'MailArc'. Convention dictates that
+    you start with a capital letter. All code will run under the package
+    Plugins::GForum::MailArc. Enter in MailArc in the name of the plugin and hit
+    Create.</font></p>
+<div align="center">
+  <center>
+  <table cellPadding="3" width="500" border="0">
+    <tr>
+      <td vAlign="top" width="50%"><font face="Tahoma,Arial,Helvetica" size="2">Create
+        new plugin named:</font></td>
+      <td vAlign="top" width="50%">
+        <form>
+                       <font face="Tahoma,Arial,Helvetica" size="2"><input value="MailArc" name="plugin_name" size="20">
+          <input type="button" value="Next  &gt;&gt;" name="next"></font>
+        </form>
+      </td>
+    </tr>
+  </table>
+  </center>
+</div>
+    
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 2: Meta Information</b><br>
+        The next step is to edit meta information about your plugin. This contains 
+        information about your plugin that will be used by Gossamer Forum when 
+        users install it. You must enter at minimum a Version Number, however, you 
+        should fill out all the fields completely.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">It's very important to
+    update the version number when you make changes. When users download plugins,
+    they are presented with the version number, and from that can decide if they
+    want to upgrade an existing installation.</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">To start, enter the following information and  
+        hit next. This information will now be saved with your plugin.</font></p>
+    <form>      
+      <div align="center">
+        <center>
+  <table cellPadding="3" width="500" border="0">
+      <tr>
+        <td>
+          <table borderColor="#c0c0c0" cellSpacing="0" cellPadding="3" width="100%" border="1">
+            <tbody>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Version:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input value="1.0.0" name="version" size="20"></font></p>
+                </td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Author:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input size="40" value="Alex Krohn" name="author"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">URL:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input size="40" value="http://www.gossamer-threads.com" name="url"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">License:</font></td>
+                <td><select size="1" name="license">
+                    <option selected>Freeware</option>
+                    <option>GPL</option>
+                    <option>Shareware</option>
+                    <option>Commercial</option>
+                    <option>Other</option>
+                  </select></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Gossamer Forum Version Required:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input value="1.0.0" name="prog_ver" size="20"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Description:</font></td>
+                <td>
+                        <textarea name="description" rows="5" cols="40">Plugin to give your GForum installation the ability to act as a mailing-list archiver/browser</textarea>
+                      </td>
+              </tr>
+            </tbody>
+          </table>
+        </td>
+      </tr>
+  </table>
+        </center>
+      </div>
+    </form>
+      <p>&nbsp;</p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step3: Hooking into Gossamer Forum</b><br>
+      No hooks are required for this plugin, so this step will be skipped. 
+      <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 4: Admin Menu<br>
+        </b>Since there will be one menu item that will call up the help screen, 
+        add a new menu item with the following values.</font></p>
+<center>
+       <table cellPadding="3" width="500" border="0">
+      <tr>
+        <td>
+          <table borderColor="#c0c0c0" cellSpacing="0" cellPadding="3" width="100%" border="1">
+            <tbody>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Name:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="name" size="40" value="About"></font></p>
+                </td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">URL:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="url" size="40" value="admin.cgi?do=plugin&plugin=MailArc&func=about"></font></p>
+                </td>
+              </tr>
+                </table>
+               </td>
+         </tr>
+       </table>
+</center>
+<p><font face="Tahoma,Arial,Helvetica" size="2">Hit next to continue</font></p><font face="Tahoma,Arial,Helvetica" size="2">
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 5: User Options</b>&nbsp;<br>
+        User options are variables you can have the plugin user fill out and access 
+        in your plugin. In this plugin, none are required, but in a future version, 
+        you may wish to add an option that determines the number of days before 
+        a posting is removed from your archive.</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 6: Included Files<br>
+        </b>Every plugin needs at least an Install.pm and a ModuleName.pm (in 
+        this case, MailArc.pm). The plugin wizard will automatically generate 
+        these two files for you. It is quite common to need to bundle other files 
+        though, from images, to a user cgi. From here you can upload and add files 
+        required by the plugin and the wizard will bundle it into your plugin 
+        and create the necessary install functions for you.</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">The MailArc plugin does 
+        not require any support files so this step is skipped.</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 7: Install Messages<br>
+</b>The last step is too add an install and uninstall message. This should
+explain to the user what the plugin will do exactly during the install and
+uninstall: i.e. what column it will add, what files it will install,
+etc.&nbsp;</font></p>
+      <p>You <font face="Tahoma,Arial,Helvetica" size="2">also need to add any 
+        custom install and uninstall code. The Wizard takes care of hooking into 
+        Gossamer Forum, but the MailArc install needs to do two custom tasks. 
+        For the install to be complete, the MailArc plugin needs to add the &quot;post_message_id&quot; 
+        column to the Post table and generate the archive.pl script  that intercepts the incoming mailing-list emails. The code to do this is simple:</font></p>
+               
+               <center>
+               <table bgcolor="#dddddd" border=0 cellpadding=3 cellspacing=0>
+               <tr><td>
+               <pre>
+               
+# add new column to Post table
+    my $editor = $DB-&gt;editor ('Post');
+    $editor-&gt;add_col (&quot;post_email_id&quot;, 
+                                        { size      =&gt; 50, 
+                                          type      =&gt; 'varchar', 
+                                          form_type =&gt; 'TEXT'}
+                    ) or Plugins::GForum::MailArc-&gt;error(&quot;Warning: $GT::SQL::error&quot;, 'WARN');
+    my $content =  &lt;&lt;'END_ARCHIVE';
+#!/usr/bin/perl
+
+    use lib '..';
+    use strict;
+    
+    main();
+
+sub main {
+#----------------------------------------------------------
+#
+    require Plugins::GForum::MailArc;
+    my $mail_arc = new Plugins::GForum::MailArc;
+    $mail_arc-&gt;process();
+}  
+END_ARCHIVE
+
+    $content =~ s,\.\.,$CFG-&gt;{admin_root_path},;
+    open (FILE,&quot;&gt; $CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl&quot;) or 
+             Plugins::GForum::MailArc-&gt;error(&quot;Cannot create archive.pl: $!&quot;,&quot;FATAL&quot;);
+    print FILE $content;    
+    close FILE;
+    chmod (0755,&quot;$CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl&quot;);
+               </pre></td></tr></table></center>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">To integrate this code, add the code to the Install Code field. In the form below, it has already been done for you. So you can simply cut and paste the following data into your wizard.:</font></p>
+    <form method="POST" action="--WEBBOT-SELF--">
+      <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
+      S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
+      <div align="center">
+        <center>
+            <table borderColor="#C0C0C0" cellSpacing="0" cellPadding="3" width="500" border="1">
+              <tr> 
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Install 
+                  Message</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"> 
+                  <textarea name="install" rows="5" wrap="on" cols="40">&lt;table border=1 cellpadding=0 cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;
+&lt;table cellpadding=3 cellspacing=3 width=500&gt;&lt;tr&gt;&lt;td&gt;&lt;font face=&quot;Tahoma,Arial,Helvetica&quot; size=2&gt;
+
+&lt;p&gt;Welcome to the MailArc plugin install.
+
+&lt;p&gt;This will integrate the MailArc plugin with your Gossamer Forum. This plugin will enhance the capability of your GForum allowing it to be used as a mailing-list archiver. 
+
+&lt;p&gt;With this plugin, emails exchanged in your mailing-list will be treated like posts on the forum and allow you to peruse and search their history.
+
+&lt;p&gt;The install will add the &quot;post_email_id&quot; column to the Post table. This new column will be used to determine threading of a mailing-list conversation.
+
+&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</textarea>
+                  </font></td>
+              </tr>
+              <tr> 
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">UnInstall 
+                  Message</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2">
+                  <textarea name="uninstall" rows="5" wrap="on" cols="40">&lt;table border=1 cellpadding=0 cellspacing=0&gt;&lt;tr&gt;&lt;td&gt;
+&lt;table border=0 cellpadding=3 cellspacing=3 width=500&gt;&lt;tr&gt;&lt;td&gt;&lt;font face=&quot;Tahoma,Arial,Helvetica&quot; size=2&gt;
+This will remove MailArc Plugin.
+&lt;/font&gt;</textarea>
+                  </font></td>
+              </tr>
+              <tr> 
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Install 
+                  Code</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2">
+                  <textarea name="install_code" rows="5" wrap="off" cols="40">my ($mgr, $tar) = @_;
+    $mgr-&gt;install_menu ( 'MailArc', [ ['About', 'admin.cgi?do=plugin&plugin=MailArc&func=about'] ] );
+
+# add new column to Post table
+    my $editor = $DB-&gt;editor ('Post');
+    $editor-&gt;add_col (&quot;post_email_id&quot;, 
+                                        { size      =&gt; 50, 
+                                          type      =&gt; 'varchar', 
+                                          form_type =&gt; 'TEXT'}
+                    ) or Plugins::GForum::MailArc-&gt;error(&quot;Warning: $GT::SQL::error&quot;, 'WARN');
+    my $content =  &lt;&lt;'END_ARCHIVE';
+#!/usr/bin/perl
+
+    use lib '..';
+    use strict;
+    
+    main();
+
+sub main {
+#----------------------------------------------------------
+#
+    require Plugins::GForum::MailArc;
+    my $mail_arc = new Plugins::GForum::MailArc;
+    $mail_arc-&gt;process();
+}  
+END_ARCHIVE
+
+    $content =~ s,\.\.,$CFG-&gt;{admin_root_path},;
+    open (FILE,&quot;&gt; $CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl&quot;) or 
+              Plugins::GForum::MailArc-&gt;error(&quot;Cannot create archive.pl: $!&quot;,&quot;FATAL&quot;);
+    print FILE $content;    
+    close FILE;
+    chmod (0755,&quot;$CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl&quot;);
+    
+    return &quot;The MailArc plugin has been successfully installed!&quot;;</textarea>
+                  </font></td>
+              </tr>
+              <tr> 
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Uninstall 
+                  code</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2">
+                  <textarea name="uninstall_code" rows="5" wrap="off" cols="40">my $mgr = shift;
+    unlink (&quot;$CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl&quot;);
+    $mgr-&gt;uninstall_menu ( 'MailArc', [ ['About', 'admin.cgi?do=plugin&plugin=MailArc&func=about'] ] );
+
+# Drop post_email_id coulmn
+    my $editor = $DB-&gt;editor ('Post');                                                                   
+    $editor-&gt;drop_col (&quot;post_email_id&quot;) or Plugins::GForum::MailArc-&gt;error(&quot;Unable to drop column post_email_id ($GT::SQL::error)&quot;, 'WARN');                                                                  
+    return &quot;The MailArc plugin has been successfully removed!&quot;;
+                       </textarea>
+                  </font></td>
+              </tr>
+            </table>
+          </center></div></form></font></font></td></tr></table>
+<p><font face="Tahoma,Arial,Helvetica" size="2">You are now all done! Hit
+      Next and the plugin wizard will create the plugin template for you. It has
+      automatically generated an Install.pm file and a MailArc.pm file for
+      you. The Install file should be pretty much complete, so all you have left
+      to do is edit the MailArc.pm file.</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">Click on the Plugin Editor
+      to finish the job!</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 9: Insert your
+      code<br>
+      </b>Now you should see a screen that looks something like:</font></p>
+      <div align="center">
+        <center>
+        <table cellSpacing="0" cellPadding="0" border="1">
+          <tbody>
+            <tr>
+              <td>
+                <table width="500" border="0">
+                  <tbody>
+                    <tr>
+                      <td align="middle" bgColor="#dddddd" colSpan="2"><font face="Tahoma,Arial,Helvetica" size="3"><b>Plugin
+                        Details</b></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Plugin:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">MailArc</font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Version:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">1.0.0</font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Author:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Alex Krohn</font></td>
+                    </tr>
+                    <tr>
+                      <td vAlign="top"><font face="Tahoma,Arial,Helvetica" size="2">License:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Freeware</font></td>
+                    </tr>
+                    <tr>
+                      <td vAlign="top"><font face="Tahoma,Arial,Helvetica" size="2">Description:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Plugin to give your GForum installation the ability to act as a mailing-list archiver/browser</font></td>
+                    </tr>
+                    <tr>
+                      <td>&nbsp;</td>
+                    </tr>
+                    <tr>
+                      <td align="middle" bgColor="#dddddd" colSpan="2"><font face="Tahoma,Arial,Helvetica" size="3"><b>Plugin
+                        Files</b></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Install.pm
+                        (4123 bytes)</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2"><font color="#0000FF"><u>Edit</u></font>
+                        | <font color="#0000FF"><u>Perl Check</u></font></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">MailArc.pm
+                        (12474 bytes)</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2"><font color="#0000FF"><u>Edit</u></font>
+                        | <font color="#0000FF"><u>Perl Check</u></font></font></td>
+                    </tr>
+                  </tbody>
+                </table>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        </center>
+      </div>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">Now we need to add our
+      code for the Mail Archive . Click on Edit for MailArc.pm and enter:</font></p>
+      <p align="center">
+  <textarea rows="8" name="code" wrap="off" cols="50"># ==================================================================
+# Plugins::GForum::MailArc - use GT as an archive for mailing list
+#
+#   Plugins::GForum::MailArc
+#   Author  : Gossamer Threads Inc
+#   Version : 1.0.0
+#   Updated : Tue Dec 18 16:50:12 2001
+#
+# ==================================================================
+#
+
+package Plugins::GForum::MailArc;
+# ==================================================================
+
+    use strict;
+    use vars qw/@ISA $ERRORS $VERSION $DEBUG $error/;
+    use GForum qw/$DB $CFG $IN/;
+
+    use GT::Mail::Parse;
+    use GT::Date qw/timelocal parse_format/;
+    use GT::Base qw/:all/;  # Imports $MOD_PERL $SPEEDY $PERSIST
+
+    # System modules
+    use Getopt::Long;
+    $VERSION = '1.0';
+    $DEBUG   = 0;
+    $ERRORS  = {
+                'BADFORUMID'   =&gt; &quot;Forum id missing. Use perl archive.pl --forum=xx&quot;,
+                'BADINPUT'     =&gt; &quot;No data to parse&quot;,
+                'BADUSERNAME'  =&gt; &quot;Could not parse the user name.&quot;,
+                'WARNING'      =&gt; &quot;Error: %s&quot;,
+                };
+    @ISA = qw/GT::Base/;
+
+sub process () {
+#----------------------------------------------------------
+    my ($self) = @_;
+
+    GetOptions('forum=s' =&gt; \$self-&gt;{input}-&gt;{forum_id}); # get forum ID 
+    ($self-&gt;{input}-&gt;{forum_id}) or return $self-&gt;error(&quot;BADFORUMID&quot;,&quot;FATAL&quot;);
+    my $mail;
+    {
+        local $/;
+        $mail = &lt;STDIN&gt;;
+    } 
+    $mail =~ s/\r?\n/\n/g;
+    $mail or return $self-&gt;error(&quot;BADINPUT&quot;,&quot;WARN&quot;);
+
+    my $parser = new GT::Mail::Parse (
+        debug     =&gt; $CFG-&gt;{debug_level},
+        in_string =&gt; $mail,
+        crlf      =&gt; &quot;\n&quot;
+    ) or return $self-&gt;error(&quot;WARNING&quot;,&quot;WARN&quot;,$GT::Mail::error);
+
+    $self-&gt;{input}-&gt;{head}     = $parser-&gt;parse or return $self-&gt;error(&quot;BADINPUT&quot;,&quot;WARN&quot;);   
+    $self-&gt;{input}-&gt;{parts}    = $parser-&gt;parts;
+    $self-&gt;{user}-&gt;{user_name} = parse_email($self-&gt;{input}-&gt;{head}-&gt;get('From'));
+    ($self-&gt;{user}-&gt;{user_name}) or return $self-&gt;error(&quot;BADUSERNAME&quot;,&quot;WARN&quot;);
+
+# Create new disabled user
+    $self-&gt;create_disabled_user();
+
+#add message
+    $self-&gt;insert_message();
+}
+
+sub create_disabled_user {
+#-------------------------------------------------------
+# create new disabled user
+#
+    my $self = shift;
+    my $table = $DB-&gt;table('User');
+    my $rs = $table-&gt;select({user_username =&gt; $self-&gt;{user}-&gt;{user_name}})-&gt;fetchrow_hashref;
+    if ($rs-&gt;{user_username}) {
+        $self-&gt;{user}-&gt;{user_id} = $rs-&gt;{user_id};
+    }
+    else {
+        my $cols = $table-&gt;{schema}-&gt;{cols};
+        my $fields;
+        $fields-&gt;{user_username}    = $self-&gt;{user}-&gt;{user_name};
+        $fields-&gt;{user_email}       = $self-&gt;{user}-&gt;{user_name};
+        $fields-&gt;{user_disp_email}  = $self-&gt;{user}-&gt;{user_name};
+        $fields-&gt;{user_enabled}     = 0;
+        local $CFG-&gt;{username_max_length} = 50;
+        my $sth = $table-&gt;insert($fields) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$GT::SQL::error);
+        $self-&gt;{user}-&gt;{user_id} = $sth-&gt;insert_id;
+    }
+}
+
+sub insert_message {
+#----------------------------------------------------------
+# Insert a message
+#
+    my $self = shift;
+    my $post_time;
+
+    my $head = $self-&gt;{input}-&gt;{head};
+    my $date = $head-&gt;get('Date');
+    ($date) and $post_time = parse_date($date);
+
+    my $table  = $DB-&gt;table('Post');
+    my $fields;    
+    my $body   = $self-&gt;get_body();
+
+    my $msgid = $head-&gt;get('message-id');
+    $msgid =~ s,[&lt; &gt;],,g;
+
+    $fields-&gt;{post_username} = $self-&gt;{user}-&gt;{user_name};
+    $fields-&gt;{user_id_fk}    = $self-&gt;{user}-&gt;{user_id};
+    $fields-&gt;{forum_id_fk}   = $self-&gt;{input}-&gt;{forum_id};
+    $fields-&gt;{post_root_id}  = 0;
+    $fields-&gt;{post_father_id}= 0;
+    $fields-&gt;{post_depth}    = 0;
+    $fields-&gt;{post_time}     = $post_time || time;
+    $fields-&gt;{post_subject}  = $head-&gt;get('Subject');
+    $fields-&gt;{post_style}    = ($head-&gt;effective_type eq 'text/plain') ? 0 : 2;
+    $fields-&gt;{post_message}  = $body-&gt;{body};
+    $fields-&gt;{post_email_id} = $msgid;
+    $fields-&gt;{post_ip}       = ($head-&gt;get('received'))? $self-&gt;get_ip() : '0.0.0.0';        
+    
+    my ($found, $refid);
+    my $table = $DB-&gt;table('Post');
+    my @reply_to = map { /&lt;([^&gt; ]+)&gt;/ ? $1 : () } split(' ' =&gt; join(' ' =&gt; $head-&gt;get('References'), $head-&gt;get('In-Reply-To') ));
+    if (@reply_to) { $refid = pop @reply_to; }
+    if ($refid) { #this is a reply to an existing message        
+        my $parent = $table-&gt;select(['post_id', 'post_root_id', 'post_depth'], { post_email_id =&gt; $refid, forum_id_fk =&gt; $self-&gt;{input}-&gt;{forum_id} })-&gt;fetchrow_hashref;
+        if ($parent) {
+            $fields-&gt;{post_root_id}   = $parent-&gt;{post_root_id} || $parent-&gt;{post_id};
+            $fields-&gt;{post_father_id} = $parent-&gt;{post_id};
+            $fields-&gt;{post_depth}     = $parent-&gt;{post_depth} + 1;
+            $found = 1;
+        }
+    }      
+    if (!$found and $fields-&gt;{post_subject} =~ /^(?:re\S*|aw\S*)\s(.+)/i) {
+        my $parent = $table-&gt;select (['post_id', 'post_root_id', 'post_depth', 'post_subject'], { post_subject =&gt; $1, forum_id_fk =&gt; $self-&gt;{input}-&gt;{forum_id} })-&gt;fetchrow_hashref;
+        if ($parent) {
+            $fields-&gt;{post_root_id}   = $parent-&gt;{post_root_id} || $parent-&gt;{post_id};
+            $fields-&gt;{post_father_id} = $parent-&gt;{post_id};
+            $fields-&gt;{post_depth}     = $parent-&gt;{post_depth} + 1;
+        }
+    }
+    my $sth   = $table-&gt;insert($fields) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$GT::SQL::error);    
+    my $post_id = $sth-&gt;insert_id;
+
+# update the user posts count
+    $DB-&gt;table('User')-&gt;update({ user_posts =&gt; \'user_posts + 1' }, { user_id =&gt; $self-&gt;{user}-&gt;{user_id} }) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$GT::SQL::error);
+
+# add the attachments
+    require GT::TempFile;
+    my $name = new GT::TempFile;    
+    my $path = $$name.'tmp';
+    my $attachments = $body-&gt;{attachments}; 
+    if ($#$attachments &gt;=0) {
+        mkdir ($path,0777) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$!);
+        foreach (@$attachments) {
+            if ($_-&gt;{name}) {
+                open (FILE, &quot;&gt; $path/$_-&gt;{name}&quot;) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$!);;
+                print FILE $_-&gt;{content};
+                close FILE;
+                $table-&gt;attach($post_id, &quot;$path/$_-&gt;{name}&quot;);
+                unlink &quot;$path/$_-&gt;{name}&quot;;
+            }
+        }
+        rmdir ($path) or return $self-&gt;error(&quot;WARNING&quot;,&quot;FATAL&quot;,$!);;
+    }
+}
+
+sub get_ip {
+# -------------------------------------------------------------------
+# get IP address
+    my $self = shift;
+    my $received = $self-&gt;{input}-&gt;{head}-&gt;{header_lines}-&gt;{received};
+    if (ref $received eq 'ARRAY'){
+        my $line = pop @{$received};
+        $line =~ m/([^\(]*?\d)\)/; 
+        return ($1)?$1:'0.0.0.0';
+    }
+    else {
+        return '0.0.0.0';
+    }
+}
+
+sub get_body {
+#--------------------------------------------------------------------
+# Parse the body
+#
+    my $self = shift;
+
+    my $head  = $self-&gt;{input}-&gt;{head};
+    my $parts = $self-&gt;{input}-&gt;{parts};
+
+    my $type = lc($head-&gt;mime_attr('content-type'));
+    $type  ||= 'text/plain';
+    my ($body, @attachments);
+
+    if ($type eq 'text/plain' or $type eq 'text/html') {
+        $body = $head-&gt;body_as_string;
+    }
+    else {
+        for (@$parts) {
+            my $attach = $_-&gt;mime_attr('content-disposition') and uc($_-&gt;mime_attr('content-disposition')) eq 'ATTACHMENT';
+            if ($attach) {
+                my $in = $_-&gt;body_in;
+                my $body;
+                if ($in eq 'MEMORY') {
+                    $body = $_-&gt;body_data;
+                }
+                elsif ($in eq 'HANDLE') {
+                    $body = $_-&gt;body_handle;
+                }
+                elsif ($in eq 'FILE') {
+                    $body = $_-&gt;body_path;
+                }
+                ($body) and push @attachments, { name =&gt; $_-&gt;mime_attr('content-disposition.filename'), content =&gt; $body };
+            }
+            elsif (uc($_-&gt;mime_attr('content-type')) eq 'TEXT/PLAIN') {
+                $body = $_-&gt;body_as_string;
+            }
+            elsif (uc($_-&gt;mime_attr('content-type')) ne 'TEXT/HTML') {
+            #    push @attachments, $_;
+            }
+        }
+        if ( !$body ) {
+            for (@$parts) {
+                next if $_-&gt;mime_attr('content-disposition') and uc($_-&gt;mime_attr('content-disposition')) eq 'ATTACHMENT';
+                if ( uc($_-&gt;mime_attr('content-type')) eq 'TEXT/HTML') {
+                    $body = $_-&gt;body_as_string;
+                    last;
+                }
+             }
+         }
+         $body ||= '';                 
+    }
+    return { body =&gt; $body, attachments =&gt; \@attachments};
+}
+
+sub about {
+# -------------------------------------------------------------------
+# Called from the admin, displays a simple help screen.
+#
+    print $IN-&gt;header;
+    print &lt;&lt;END_OF_HTML;
+&lt;html&gt;
+    &lt;head&gt;&lt;title&gt;MailArc Plugin&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body bgcolor=&quot;#FFFFFF&quot;&gt;    
+    &lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;
+
+
+      &lt;table bgColor=&quot;#ffffff&quot; border=&quot;0&quot; cellPadding=&quot;3&quot; cellSpacing=&quot;3&quot; width=&quot;600&quot; valign=&quot;top&quot;&gt;
+        &lt;tr&gt;
+          &lt;td align=&quot;left&quot; bgColor=&quot;navy&quot;&gt;&lt;b&gt;&lt;font color=&quot;#ffffff&quot; size=&quot;2&quot; face=&quot;Tahoma,Arial,Helvetica&quot;&gt;MailArc Plugin&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
+        &lt;/tr&gt;
+        
+  &lt;tr&gt; 
+    &lt;td&gt; 
+      &lt;p align=&quot;center&quot;&gt;&lt;b&gt;&lt;font color=&quot;#000000&quot; size=&quot;2&quot; face=&quot;Tahoma,Arial,Helvetica&quot;&gt;MailArc 
+        Plugin&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
+      &lt;p&gt; &lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;This plugin will allow 
+        you to use Gossamer Forum as an archive for mailing list.&lt;BR&gt;
+        &lt;/font&gt;&lt;/p&gt;
+      &lt;p&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;&lt;b&gt;+ Mail gateway configuration:&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;
+      &lt;blockquote&gt;
+        &lt;p&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;The following instructions 
+          are for the configuration of a system using Unix/Linux and sendmail.&lt;/font&gt;&lt;/p&gt;
+      &lt;/blockquote&gt;
+      &lt;ul&gt;
+        &lt;li&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;We will create a new 
+          email address that will become a non-participating member of your mailing-list 
+          and will collect emails for your GForum mailing-list archiver.&lt;br&gt;
+          &lt;br&gt;
+          First, create a new forum for the mailing-list using the &lt;a href=&quot;db.cgi?db=Forum;do=add_form&quot;&gt;add 
+          forum&lt;/a&gt; command. Get the ID number from the &quot;successfully added&quot; 
+          screen. If you already have a forum, &lt;a href=&quot;admin/admin.cgi?do=page;page=forums_list.html&quot;&gt;list 
+          all&lt;/a&gt; the forums and you can get the ID number looking at the details 
+          of the forum your want to use.&lt;br&gt;
+          &lt;br&gt;
+          We must then edit the sendmail aliases file. Often, it is located at 
+          &quot;/etc/aliases&quot;. We will take advantage of the facility to 
+          associate a program with any arbitrary email address. For example. If 
+          we want to create a special listener on the &lt;a href=&quot;http://www.ucalgary.ca/%7Edkbrown/strytell.html&quot; target=&quot;_blank&quot;&gt;Storytel&lt;/a&gt; 
+          mailing list with the email address storytel_arc\@somehost.com (where 
+          somehost.com is your server's domain name) we can enter the following 
+          line into your aliases file. You will probably have to be root to make 
+          this change.&lt;br&gt;
+          &lt;br&gt;
+          &lt;font color=&quot;blue&quot;&gt;storytel_arc: &quot;|$CFG-&gt;{admin_root_path}/Plugins/GForum/archive.pl 
+          --forum=n&quot; &lt;/font&gt;&lt;br&gt;
+          &lt;i&gt;(n - is the forum ID)&lt;/i&gt;&lt;/font&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;&lt;br&gt;
+          &lt;br&gt;
+          Up to the &quot;:&quot; is the the username for the new email address. 
+          The rest of the configuration string tells sendmail to invoke the script 
+          &quot;archive.pl&quot; every time an email comes in for that user.&lt;br&gt;
+          &lt;br&gt;
+          To make sure that your mail server is able to use this change, you must 
+          convert the &quot;aliases&quot; configuration file into a format that 
+          sendmail can understand. To do so, run the command &quot;sendmail -bi&quot; 
+          as root or as the mail system administrator. &lt;br&gt;
+          &lt;br&gt;
+          &lt;font color=blue&gt;[root\@penguin GForum]# sendmail -bi&lt;br&gt;
+          /etc/aliases: 20 aliases, longest 70 bytes, 307 bytes total&lt;br&gt;
+          Jan 17 09:50:49 192 sendmail[9398]: alias database /etc/aliases rebuilt 
+          by root &lt;/font&gt;&lt;br&gt;
+          &lt;br&gt;
+          Don't forget sign up this new email address to your mailing-list.&lt;br&gt;
+          &lt;/font&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;If 
+          you do not have the level of control to make changes to the &quot;aliases&quot; 
+          file or, are under a different system, the &quot;archive.pl&quot; script 
+          runs as a mail pipe accepting emails from STDIN and places emails 
+          into the forum indicated by the --forum=id value. Contact your system administrator 
+          to find out the best option.&lt;br&gt;
+          &lt;/font&gt;&lt;br&gt;
+          &lt;/font&gt; &lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt; &lt;/font&gt;&lt;/li&gt;
+      &lt;/ul&gt;
+      &lt;p&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt;&lt;b&gt;+ MailArc Developers 
+        Guide :&lt;/b&gt; &lt;/font&gt; &lt;/p&gt;
+      &lt;ul&gt;
+          &lt;p&gt;&lt;font face=&quot;Tahoma, Arial, Helvetica&quot; size=&quot;2&quot;&gt; 
+          
+          This MailArc plugin is one of a suite of examples that come with guides 
+          describing its construction to developers. These guides are intended for 
+          developers wishing to get more detailed information on Gossamer Forum plugin 
+          construction. Go to the &lt;a href=&quot;admin.cgi?do=help;topic=help_guide_mailarc.html&quot; target=&quot;plugin_guide&quot;&gt;MailArc Plugin developers' guide&lt;/a&gt;.
+        &lt;/font&gt;&lt;/p&gt;
+      &lt;/ul&gt;
+      &lt;/td&gt;
+        &lt;/tr&gt;
+      &lt;/table&gt;
+
+    &lt;/body&gt;
+&lt;/html&gt;
+END_OF_HTML
+
+}
+
+sub parse_email {
+# -------------------------------------------------------------------
+# Return a hash contains name and email from email header if applicable
+    my $value = shift;
+
+    my $result;
+    if ($value =~ /&quot;?([^&lt;&quot;]+)&quot;?\s*&lt;([^&gt;]+)&gt;/) {
+        $result = $2;
+    }
+    elsif ($value =~ /&lt;([^&gt;]+)&gt;/) {
+        $result = $1;
+    }
+    else {
+        $result = $value || '';
+        $result =~ s/\([^)]+\)//g;
+    }
+    $result =~ s/\s//g;
+
+    chomp $result;
+    return $result;
+}
+
+sub parse_date {
+# -------------------------------------------------------------------
+# Internal use, not usfull from a template.
+# Parse an RFC 822 5.1 compliant date into one understood by mysql.
+# Formats expected:
+#    Sat, 28 Jul 2001 08:44:00 -0700
+#    Sat, 28 Jul 2001 08:44:00 EST
+#    Sat, 28 Jul 2001 08:44:00 &quot;EST&quot;
+#    Sat, 21 Jul 01 19:07:20
+#    28 Jul 2001 14:57:07 -0000
+#    28 Jul 2001 14:57:07 GMT
+#    28 Jul 2001 14:57:07 &quot;GMT&quot;
+#    20 May 01 6:33:30 PM
+#
+# Only the first date is an RFC date, but it appears lots of clients don't
+# use the RFC.
+#
+    my $date = shift;
+    $date || return;
+    my $format;
+    $date =~ s/\s\s/ /g;
+
+    CASE: for ($date) {
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/    and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d &quot;(?:[+-]\d+|\w+)&quot;/  and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% &quot;%o%&quot;'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d/                    and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss%'; last CASE };
+        /\w+, \d\d? \w+ \d{2} \d?\d:\d?\d:\d\d/                    and do { $format = '%ddd%, %dd% %mmm% %yy% %HH%:%MM%:%ss%'; last CASE };
+        
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/   and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d &quot;(?:[+-]\d+|\w+)&quot;/ and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% &quot;%o%&quot;'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d/                   and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss%'; last CASE };
+        /\w+, \d\d? \w+ \d{2} \d?\d:\d?\d:\d\d/                   and do { $format = '%ddd%, %dd% %mmm% %yy% %HH%:%MM%:%ss%'; last CASE };
+
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/         and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d &quot;(?:[+-]\d+|\w+)&quot;/       and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss% &quot;%o%&quot;'; last CASE };
+        /\d\d? \w+ \d{2} \d?\d:\d?\d:\d\d [AaPpMm]{2}/             and do { $format = '%dd% %mmm% %yy% %hh%:%MM%:%ss% %tt%'; last CASE };
+    } 
+    $format or return;        
+    my $parts    = [split /\s/, $date];
+    my $str_date = fill_zero($parts);
+    my $time     = [split /:/, @$parts[4]];
+    my $str_time = fill_zero($time,&quot;:&quot;);
+    $str_date =~ s/\Q@$parts[4]\E/$str_time/;
+    return timelocal(parse_format($str_date, $format));
+}
+
+sub fill_zero {
+#-------------------------------------------------------
+    my ($value,$delim) = @_;
+    $delim ||= ' ';
+    my $result;
+    (ref $value eq 'ARRAY') or return $value;
+    foreach (@$value) {
+        (/\d\d?/ and length($_) == 1) and $_ = &quot;0$_&quot;;
+        $result .= $_.$delim;
+    }
+    chop $result;
+    return $result;
+}
+
+1;
+
+</textarea>
+<p></p>
+    
+    <p><font face="Tahoma,Arial,Helvetica" size="2">Simply cut and paste the
+    above code into the edit box, and hit update. To make sure everything is
+    correct, you can click on Perl Check to run a syntax check on it. Try it and
+    you should see
+    'MailArc.pm syntax ok'.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">A couple things to note about
+    the code:</font></p>
+    <table border="0" cellpadding="2" width="80%">
+      <tr>
+        <td valign="top">
+          <pre>package Plugins::GForum::MailArc;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Don't forget to put
+          your code inside the proper package or it will never work.</font></td>
+      </tr>
+      <tr>
+        <td valign="top"><pre>use strict; </pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Always, always run your
+          plugins under use strict. If you want your plugin to be mod_perl
+          compatible, this will be essential.</font></td>
+      </tr>      
+      <tr>
+        <td valign="top">
+          <pre>use GT::Mail::Parse;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">This module lets you
+          parse the contents of an email.</font></td>
+      </tr>      
+      <tr>
+        <td valign="top">
+          <pre>use GT::Date qw/timelocal parse_format/;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">GT::Date provides several functions useful in parsing dates, and 
+doing date manipulation.</font></td>
+      </tr>  
+      <tr>
+        <td valign="top">
+          <font face="Tahoma,Arial,Helvetica" size="2">1;</font>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Don't forget, all
+          module must end with a 1; or they won't be able to get require'd in
+          properly.</font></td>
+      </tr>
+    </table>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 10: All Done, try it
+out!<br>
+    </b>Now, we are all done! Click on Plugin Manager and it should be listed as
+a plugin waiting to be installed. Click on Install and you should now be able to
+try it out!</font></p>
+    <TABLE width=100%>
+<TR>
+<TD align="right" valign="top">
+<B><a href="admin.cgi?do=help&topic=help_toc.html"><font face="Verdana, Arial, Helvetica" size="2">Table
+of Contents</font></a></B>
+<HR>
+</TD>
+</TR>
+</TABLE>
+
+</body>
+
+
+</html>
\ No newline at end of file
Index: admin/help/help_guide_modperl.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide_modperl.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_guide_modperl.html  11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_guide_modperl.html  18 Apr 2002 23:24:18 -0000      1.3
@@ -2,7 +2,7 @@
 ^M
 <head>^M
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">^M
-<title>Links SQL Help: Plug Ins</title>^M
+<title>Gossamer Forum Help: Plug Ins</title>
 </head>^M
 ^M
 <body>^M
Index: admin/help/help_guide_plugins.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_guide_plugins.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_guide_sample.html
===================================================================
RCS file: admin/help/help_guide_sample.html
diff -N admin/help/help_guide_sample.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ admin/help/help_guide_sample.html   14 Jan 2002 18:34:24 -0000      1.2
@@ -0,0 +1,708 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>Gossamer Forum Help: Plug Ins</title>
+</head>
+
+<body>
+
+<H1><font face="Verdana, Arial, Helvetica">Gossamer Forum Help</font></H1>
+
+<TABLE width=100%>
+<TR>
+<TD align="right" valign="top">
+<HR>
+<B><a href="admin.cgi?do=help&topic=help_toc.html"><font face="Verdana, Arial, Helvetica" size="2">Table
+of Contents</font></a></B>
+</TD>
+</TR>
+</TABLE>
+
+<table width="100%" cellpadding="20">
+  <tr>
+    <td>
+
+    <p><font face="Verdana, Arial, Helvetica" size="4"><a href="admin.cgi?do=help&amp;topic=help_guide.html">Gossamer Forum Developers Guide</a>:
+    Sample Plugin</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Sample Plugin - MailArc<br>
+    </b>In this sample, we will develop a sample plugin so you can see the full
+    process from Start to End. It's recommended you open a new browser window
+    with the <a href="admin.cgi?do=page&page=plugin_wizard.html" target="_blank">plugin
+    wizard</a> and follow along. The plugin wizard will create a template for
+    you to use to start your plugin.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">We are going to create MailArc plugin which allows you to use Gossamer Forum as an archive for mailing lists.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 1: Naming your
+    plugin</b><br>
+    You will be prompted to give your plugin a name. The name of your plugin
+    corresponds to the package space it will run under, so it must conform to
+    perls syntax. It should be only letters and numbers, and must not contain
+    spaces. Our sample plugin is called 'MailArc'. Convention dictates that
+    you start with a capital letter. All code will run under the package
+    Plugins::GForum::MailArc. Enter in MailArc in the name of the plugin and hit
+    Create.</font></p>
+<div align="center">
+  <center>
+  <table cellPadding="3" width="500" border="0">
+    <tr>
+      <td vAlign="top" width="50%"><font face="Tahoma,Arial,Helvetica" size="2">Create
+        new plugin named:</font></td>
+      <td vAlign="top" width="50%">
+        <form>
+                       <font face="Tahoma,Arial,Helvetica" size="2"><input value="MailArc" name="plugin_name" size="20">
+          <input type="button" value="Next  &gt;&gt;" name="next"></font>
+        </form>
+      </td>
+    </tr>
+  </table>
+  </center>
+</div>
+    </FORM>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 2: Meta Information</b><br>
+    The next step is to edit meta information about your plugin. This
+    contains information about your plugin that will be used by Gossamer Forum when
+    users install it. You must enter at a minimum a Version Number, but should
+    fill out all the fields completely.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">It's very important to
+    update the version number when you make changes. When users download plugins,
+    they are presented with the version number, and from that can decide if they
+    want to upgrade an existing installation.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">To start, we'll enter:</font></p>
+    <form>      
+      <div align="center">
+        <center>
+  <table cellPadding="3" width="500" border="0">
+      <tr>
+        <td>
+          <table borderColor="#c0c0c0" cellSpacing="0" cellPadding="3" width="100%" border="1">
+            <tbody>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Version:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input value="1.0.0" name="version" size="20"></font></p>
+                </td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Author:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input size="40" value="Alex Krohn" name="author"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">URL:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input size="40" value="http://www.gossamer-threads.com" name="url"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">License:</font></td>
+                <td><select size="1" name="license">
+                    <option selected>Freeware</option>
+                    <option>GPL</option>
+                    <option>Shareware</option>
+                    <option>Commercial</option>
+                    <option>Other</option>
+                  </select></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Gossamer Forum Version Required:</font></td>
+                <td><font face="Tahoma,Arial,Helvetica" size="2"><input value="1.0.0" name="prog_ver" size="20"></font></td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Description:</font></td>
+                <td><textarea name="description" rows="5" cols="40">This plugin will allow you to use Gossamer Forum as an archive for mailing lists.</textarea></td>
+              </tr>
+            </tbody>
+          </table>
+        </td>
+      </tr>
+  </table>
+        </center>
+      </div>
+    </form>
+<p><font face="Tahoma,Arial,Helvetica" size="2">and hit next. This information
+will now be saved with your plugin.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step3: Hooking into Gossamer Forum</b><br>  
+We don't need to hook Gossamer Forum, so we just skip this step.
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 4: Admin Menu<br>
+</b>We have an admin menu for helping. We'll enter:</font></p>
+<center>
+       <table cellPadding="3" width="500" border="0">
+      <tr>
+        <td>
+          <table borderColor="#c0c0c0" cellSpacing="0" cellPadding="3" width="100%" border="1">
+            <tbody>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Name:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="name" size="40" value="About"></font></p>
+                </td>
+              </tr>
+              <tr>
+                <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">URL:</font></td>
+                <td>
+                  <p><font face="Tahoma,Arial,Helvetica" size="2"><input type="text" name="url" size="40" value="admin.cgi?do=plugin&plugin=MailArc&func=about"></font></p>
+                </td>
+              </tr>
+                </table>
+               </td>
+         </tr>
+       </table>
+</center>
+<p><font face="Tahoma,Arial,Helvetica" size="2">Hit next to continue</p>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 5: User Options</b>&nbsp;<br>
+User options are variables you can have the plugin user fill out and access in
+your plugin. We won't do any for this, but maybe for the next version we will
+add a user option for how long the cache should last.</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 6: Included Files<br>
+</b>Every plugin needs at least an Install.pm and a ModuleName.pm (in our case
+MailArc.pm). The plugin wizard will automatically generate these two files
+for you. It is quite common to need to bundle other files though, from images,
+to user cgi. From here you can upload those files that you need and the plugin
+wizard will bundle it in your plugin and create the install function for you.</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2">We don't need any extra files
+for the MailArc, so we hit next.</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 7: Install Messages<br>
+</b>The last step is too add an install and uninstall message. This should
+explain to the user what the plugin will do exactly during the install and
+uninstall: i.e. what column it will add, what files it will install,
+etc.&nbsp;</font></p>
+<p><font face="Tahoma,Arial,Helvetica" size="2">We also need to add any custom
+install and uninstall code. The Wizard takes care of hooking into Gossamer Forum, but
+we need to provide code to add post_message_id to Post table. Fill in the form with the following
+information:</font></p>
+    <form method="POST" action="--WEBBOT-SELF--">
+      <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
+      S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
+      <div align="center">
+        <center>
+        <table borderColor="#C0C0C0" cellSpacing="0" cellPadding="3" width="500" border="1">
+          <tr>
+            <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Install
+              Message</font></td>
+            <td><font face="Tahoma,Arial,Helvetica" size="2"><textarea name="install" rows="5" wrap="on" cols="40">The MailArc plugin will create a new column in Post table that logs all message ID from mailing lists.
+Also, it will create archive.pl file.</textarea></font></td>
+          </tr>
+          <tr>
+            <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">UnInstall
+              Message</font></td>
+            <td><font face="Tahoma,Arial,Helvetica" size="2"><textarea name="uninstall" rows="5" wrap="on" cols="40">Removing the MailArc plugin will erase archive.pl, but will not harm your Gossamer Forum installation.</textarea></font></td>
+          </tr>
+          <tr>
+            <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Install
+              Code</font></td>
+            <td><font face="Tahoma,Arial,Helvetica" size="2"><textarea name="install_code" rows="5" wrap="off" cols="40">my ($mgr, $tar) = @_;
+    $mgr->install_menu ( 'MailArc', [ ['About', 'admin.cgi?do=plugin&plugin=MailArc&func=about'] ] );
+
+# add new column to Post table
+    my $editor = $DB->editor ('Post');
+    $editor->add_col ("post_email_id", 
+                                        { size      => 50, 
+                                          type      => 'varchar', 
+                                          form_type => 'TEXT'}
+                    ) or Plugins::GForum::MailArc->error("Warning: $GT::SQL::error", 'WARN');
+    my $content =  <<'END_ARCHIVE';
+#!/usr/bin/perl
+
+    use lib '..';
+    use strict;
+    use GForum qw/$DB $CFG/;
+    GForum::init('..');
+    
+    main();
+
+sub main {
+#----------------------------------------------------------
+#
+    require Plugins::GForum::MailArc;
+    my $mail_arc = new Plugins::GForum::MailArc;
+    $mail_arc->process( sql => $DB, cfg => $CFG);
+}  
+END_ARCHIVE
+
+    $content =~ s,\.\.,$CFG->{admin_root_path},;
+    open (FILE,"> $CFG->{admin_root_path}/Plugins/GForum/archive.pl") or Plugins::GForum::MailArc->error("Cannot create archive.pl: $!","FATAL");
+    print FILE $content;    
+    close FILE;
+    chmod (0775,"$CFG->{admin_root_path}/Plugins/GForum/archive.pl");
+    
+    return "The MailArc plugin has been successfully installed!";
+                       </textarea></font></td>
+          </tr>
+          <tr>
+            <td vAlign="top" width="120"><font face="Tahoma,Arial,Helvetica" size="2">Uninstall
+              Message</font></td>
+            <td><font face="Tahoma,Arial,Helvetica" size="2"><textarea name="uninstall_code" rows="5" wrap="off" cols="40">unlink ("$CFG->{admin_root_path}/Plugins/GForum/archive.pl");
+                       </textarea></font></td>
+          </tr>
+        </table>
+        </center>
+      </div>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">You are now all done! Hit
+      Next and the plugin wizard will create the plugin template for you. It has
+      automatically generated an Install.pm file and a MailArc.pm file for
+      you. The Install file should be pretty much complete, so all you have left
+      to do is edit the MailArc.pm file.</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">Click on the Plugin Editor
+      to finish the job!</font></p>
+      <p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 9: Insert your
+      code<br>
+      </b>Now you should see a screen that looks something like:</font></p>
+      <div align="center">
+        <center>
+        <table cellSpacing="0" cellPadding="0" border="1">
+          <tbody>
+            <tr>
+              <td>
+                <table width="500" border="0">
+                  <tbody>
+                    <tr>
+                      <td align="middle" bgColor="#dddddd" colSpan="2"><font face="Tahoma,Arial,Helvetica" size="3"><b>Plugin
+                        Details</b></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Plugin:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">MailArc</font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Version:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">1.0.0</font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Author:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Alex Krohn</font></td>
+                    </tr>
+                    <tr>
+                      <td vAlign="top"><font face="Tahoma,Arial,Helvetica" size="2">License:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Freeware</font></td>
+                    </tr>
+                    <tr>
+                      <td vAlign="top"><font face="Tahoma,Arial,Helvetica" size="2">Description:</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">This plugin will allow you to use Gossamer Forum as an archive for mailing lists.</font></td>
+                    </tr>
+                    <tr>
+                      <td>&nbsp;</td>
+                    </tr>
+                    <tr>
+                      <td align="middle" bgColor="#dddddd" colSpan="2"><font face="Tahoma,Arial,Helvetica" size="3"><b>Plugin
+                        Files</b></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">Install.pm
+                        (4123 bytes)</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2"><font color="#0000FF"><u>Edit</u></font>
+                        | <font color="#0000FF"><u>Perl Check</u></font></font></td>
+                    </tr>
+                    <tr>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2">MailArc.pm
+                        (12474 bytes)</font></td>
+                      <td><font face="Tahoma,Arial,Helvetica" size="2"><font color="#0000FF"><u>Edit</u></font>
+                        | <font color="#0000FF"><u>Perl Check</u></font></font></td>
+                    </tr>
+                  </tbody>
+                </table>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        </center>
+      </div>
+      <p><font face="Tahoma,Arial,Helvetica" size="2">Now we need to add our
+      code for the Mail Archive . Click on Edit for MailArc.pm and enter:</font></p>
+      <p align="center"><textarea rows="8" name="code" wrap="off" cols="50">
+# ==================================================================
+# Plugins::GForum::MailArc - Auto Generated Install Module
+#
+#   Plugins::GForum::MailArc
+#   Author  : Gossamer Threads Inc
+#   Version : 1.0.0
+#   Updated : Tue Dec 18 16:50:12 2001
+#
+# ==================================================================
+#
+
+package Plugins::GForum::MailArc;
+# ==================================================================
+
+    use strict;
+    use vars qw/@ISA $ERRORS $VERSION $DEBUG $error/;
+
+    use GT::Mail::Parse;
+    use GT::Date qw/timelocal parse_format/;
+    use GT::Base qw/:all/;  # Imports $MOD_PERL $SPEEDY $PERSIST
+
+    # System modules
+    use Getopt::Long;
+    $VERSION = '1.0.0';
+    $DEBUG   = 0;
+    $ERRORS  = {
+                'BADFORUMID'   => "Please send forum id, your command shoud be: perl archive.pl --forum=xx",
+                'BADINPUT'     => "The data content is empty",
+                'BADCGI'       => "You must pass in a GT::CGI object.",
+                'BADUSERNAME'  => "Can not parse the user name.",
+                'WARNING'      => "Error: %s",
+                };
+    @ISA = qw/GT::Base/;
+
+sub process () {
+#----------------------------------------------------------
+    my ($self,@in) = @_;
+    my $opts = $self->common_param (@in) or return $self->error("BADCGI","FATAL");
+
+    $self->{sql} = $opts->{sql}; # DB object
+    $self->{cfg} = $opts->{cfg}; # Forum config data
+
+    GetOptions('forum=s' => \$self->{input}->{forum_id}); # get forum ID 
+
+    ($self->{input}->{forum_id}) or return $self->error("BADID","FATAL");
+    (-s STDIN)                   or return $self->error("BADINPUT","FATAL");
+
+    my $mail;
+    {
+        local $/;
+        $mail = <STDIN>;
+    } 
+    $mail =~ s/\r?\n/\n/g;
+
+    my $parser = new GT::Mail::Parse (
+        debug     => $self->{cfg}->{debug_level},
+        in_string => $mail,
+        crlf      => "\n"
+    ) or return $self->error("WARNING","FATAL",$GT::Mail::error);
+
+    $self->{input}->{head}     = $parser->parse;   
+    $self->{input}->{parts}    = $parser->parts;
+    $self->{user}->{user_name} = parse_elem($self->{input}->{head}->get('From'));
+
+    ($self->{user}->{user_name}) or return $self->error("BADUSERNAME","FATAL");
+
+# Create new disabled user
+    $self->create_disabled_user();
+
+#add message
+    $self->insert_message();
+}
+
+sub create_disabled_user {
+#-------------------------------------------------------
+# create new disabled user
+#
+    my $self = shift;
+    my $table = $self->{sql}->table('User');
+    my $rs = $table->select({user_username => $self->{user}->{user_name}})->fetchrow_hashref;
+    if ($rs->{user_username}) {
+        $self->{user}->{user_id} = $rs->{user_id};
+    }
+    else {
+        my $cols = $table->{schema}->{cols};
+        my $fields;
+        $fields->{user_username}    = $self->{user}->{user_name};
+        $fields->{user_email}       = $self->{user}->{user_name};
+        $fields->{user_disp_email}  = $self->{user}->{user_name};
+        $fields->{user_enabled}     = 0;
+        my $sth = $table->insert($fields) or return $self->error("WARNING","FATAL",$GT::SQL::error);
+        $self->{user}->{user_id} = $sth->insert_id;
+    }
+}
+
+sub insert_message {
+#----------------------------------------------------------
+# Insert a message
+#
+    my $self = shift;
+    my $post_time;
+
+    my $head = $self->{input}->{head};
+    my $date = $head->get('Date');
+    ($date) and $post_time = parse_date($date);
+
+    my $table  = $self->{sql}->table('Post');
+    my $fields;    
+    my $body   = $self->get_body();
+
+    my $msgid = $head->get('message-id');
+    $msgid =~ s,[< >],,g;
+
+    $fields->{post_username} = $self->{user}->{user_name};
+    $fields->{user_id_fk}    = $self->{user}->{user_id};
+    $fields->{forum_id_fk}   = $self->{input}->{forum_id};
+    $fields->{post_root_id}  = 0;
+    $fields->{post_father_id}= 0;
+    $fields->{post_depth}    = 0;
+    $fields->{post_time}     = $post_time;
+    $fields->{post_subject}  = $head->get('Subject');
+    $fields->{post_style}    = ($head->effective_type eq 'text/plain') ? 0 : 2;
+    $fields->{post_message}  = $body->{body};
+    $fields->{post_email_id} = $msgid;
+    
+    if ($head->get('received')) {
+        my $received = pop @{$self->get_ip()};
+        $received =~ m/([^\(]*?\d)\)/; 
+        $fields->{post_ip} = $1;        
+    }
+    $fields->{post_ip} ||= '0.0.0.0';    
+
+    my $refid = parse_elem($head->get('references'));
+    if ($refid or $head->{'in-reply-to'}) { #this is a reply to an existing message        
+        my $parent = $self->{sql}->table('Post')->select({ post_email_id => $refid })->fetchrow_hashref;
+        if ($parent) {
+            $fields->{post_root_id}   = $parent->{post_root_id} || $parent->{post_id};
+            $fields->{post_father_id} = $parent->{post_id};
+            $fields->{post_depth}     = $parent->{post_depth} + 1;
+        }
+    }     
+
+    my $table = $self->{sql}->table('Post');
+    my $sth   = $table->insert($fields) or return $self->error("WARNING","FATAL",$GT::SQL::error);    
+    my $post_id = $sth->insert_id;
+
+# add the attachments
+    require GT::TempFile;
+    my $name = new GT::TempFile;    
+    my $path = $$name.'tmp';
+    my $attachments = $body->{attachments}; 
+    if ($#$attachments >=0) {
+        mkdir ($path,0777) or return $self->error("WARNING","FATAL",$!);
+        foreach (@$attachments) {
+            if ($_->{name}) {
+                open (FILE, "> $path/$_->{name}") or return $self->error("WARNING","FATAL",$!);;
+                print FILE $_->{content};
+                close FILE;
+                $table->attach($post_id, "$path/$_->{name}");
+                unlink "$path/$_->{name}";
+            }
+        }
+        rmdir ($path) or return $self->error("WARNING","FATAL",$!);;
+    }
+}
+
+sub get_ip {
+# -------------------------------------------------------------------
+# get IP address
+    my $self = shift;
+    my $received = $self->{input}->{head}->{header_lines}->{received};
+    return if (ref $received ne 'ARRAY');
+    return @$received[0] if ($#$received == 0);
+    return $received;
+}
+
+sub get_body {
+#--------------------------------------------------------------------
+# Parse the body
+#
+    my $self = shift;
+
+    my $head  = $self->{input}->{head};
+    my $parts = $self->{input}->{parts};
+
+    my $type = $head->mime_attr( 'content-type' );
+    my ($body, @attachments);
+
+    if ($type eq 'text/plain' or $type eq 'text/html') {
+        $body = $head->body_as_string;
+    }
+    else {
+        for (@$parts) {
+            my $attach = $_->mime_attr('content-disposition') and $_->mime_attr('content-disposition') eq 'attachment';
+            if ($attach) {
+                my $in = $_->body_in;
+                my $body;
+                if ($in eq 'MEMORY') {
+                    $body = $_->body_data;
+                }
+                elsif ($in eq 'HANDLE') {
+                    $body = $_->body_handle;
+                }
+                elsif ($in eq 'FILE') {
+                    $body = $_->body_path;
+                }
+                ($body) and push @attachments, { name => $_->mime_attr('content-disposition.filename'), content => $body };
+            }
+            elsif ($_->mime_attr('content-type') eq 'text/plain') {
+                $body = $_->body_as_string;
+            }
+            elsif ($_->mime_attr('content-type') ne 'text/html') {
+            #    push @attachments, $_;
+            }
+        }
+        if ( !$body ) {
+            for (@$parts) {
+                next if $_->mime_attr('content-disposition') and $_->mime_attr('content-disposition') eq 'attachment';
+                if ( $_->mime_attr('content-type') eq 'text/html') {
+                    $body = $_->body_as_string;
+                    last;
+                }
+             }
+         }
+         $body ||= '';                 
+    }
+    return { body => $body, attachments => \@attachments};
+}
+
+sub about {
+# -------------------------------------------------------------------
+# Called from the admin, displays a simple help screen.
+#
+    require GT::CGI;
+    my $in = new GT::CGI;
+    print $in->header;
+    print qq~
+<html>
+    <head><title>MailArc Plugin</title>
+    </head>
+    <body bgcolor="#FFFFFF">    
+    <table border="1" cellpadding="0" cellspacing="0"><tr><td>
+      <table bgColor="#ffffff" border="0" cellPadding="3" cellSpacing="3" width="500" valign="top">
+        <tr>
+          <td align="left" bgColor="navy"><b><font color="#ffffff" size="2" face="Tahoma,Arial,Helvetica">MailArc Plugin</font></b></td>
+        </tr>
+        <tr>
+          <td>
+               <p align="center"><b><font color="#000000" size="2" face="Tahoma,Arial,Helvetica">MailArc Plugin</font></b></p>
+               <p><font size="2" face="Tahoma,Arial,Helvetica">
+                This plugin will allow you to use Gossamer Forum as an archive for mailing list.<BR><BR>
+                <b>How do you use MailArc plugin?</b><BR>                   
+               </font></p>
+          </td>
+        </tr>
+      </table>
+      </td></tr>
+    </table>
+    </body>
+    ~;    
+    print qq~
+    </body>
+</html>
+    ~;
+}
+
+sub parse_elem {
+# -------------------------------------------------------------------
+# Return a hash contains name and email from email header if applicable
+    my $value = shift;
+
+    my $result;
+    if ($value =~ /"?([^<"]+)"?\s*<([^>]+)>/) {
+        $result = $2;
+    }
+    elsif ($value =~ /<([^>]+)>/) {
+        $result = $1;
+    }
+    else {
+        $result = $value || '';
+        $result =~ s/\([^)]+\)//g;
+    }
+    return $result;
+}
+
+sub parse_date {
+# -------------------------------------------------------------------
+# Internal use, not usfull from a template.
+# Parse an RFC 822 5.1 compliant date into one understood by mysql.
+# Formats expected:
+#    Sat, 28 Jul 2001 08:44:00 -0700
+#    Sat, 28 Jul 2001 08:44:00 EST
+#    Sat, 28 Jul 2001 08:44:00 "EST"
+#    Sat, 21 Jul 01 19:07:20
+#    28 Jul 2001 14:57:07 -0000
+#    28 Jul 2001 14:57:07 GMT
+#    28 Jul 2001 14:57:07 "GMT"
+#    20 May 01 6:33:30 PM
+#
+# Only the first date is an RFC date, but it appears lots of clients don't
+# use the RFC.
+#
+    my $date = shift;
+    $date || return;
+    chop $date;
+#    $date =~ s/\r//g;
+
+    my $format;
+    CASE: for ($date) {
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/    and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d "(?:[+-]\d+|\w+)"/  and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% "%o%"'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d  (?:[+-]\d+|\w+)/   and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss%  %o%'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d  "(?:[+-]\d+|\w+)"/ and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss%  "%o%"'; last CASE };
+        /\w+, \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d/                    and do { $format = '%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss%'; last CASE };
+        /\w+, \d\d? \w+ \d{2} \d?\d:\d?\d:\d\d/                    and do { $format = '%ddd%, %dd% %mmm% %yy% %HH%:%MM%:%ss%'; last CASE };
+        
+        /\w+,  \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/   and do { $format = '%ddd%,  %dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\w+,  \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d "(?:[+-]\d+|\w+)"/ and do { $format = '%ddd%,  %dd% %mmm% %yyyy% %HH%:%MM%:%ss% "%o%"'; last CASE };
+        /\w+,  \d\d? \w+ \d{4} \d?\d:\d?\d:\d\d/                   and do { $format = '%ddd%,  %dd% %mmm% %yyyy% %HH%:%MM%:%ss%'; last CASE };
+        /\w+,  \d\d? \w+ \d{2} \d?\d:\d?\d:\d\d/                   and do { $format = '%ddd%,  %dd% %mmm% %yy% %HH%:%MM%:%ss%'; last CASE };
+
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d (?:[+-]\d+|\w+)/         and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o%'; last CASE };
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d "(?:[+-]\d+|\w+)"/       and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss% "%o%"'; last CASE };
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d  (?:[+-]\d+|\w+)/        and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss%  %o%'; last CASE };
+        /\d\d? \w+ \d{4} \d?\d:\d?\d:\d\d  "(?:[+-]\d+|\w+)"/      and do { $format = '%dd% %mmm% %yyyy% %HH%:%MM%:%ss%  "%o%"'; last CASE };
+        /\d\d? \w+ \d{2} \d?\d:\d?\d:\d\d [AaPpMm]{2}/             and do { $format = '%dd% %mmm% %yy% %hh%:%MM%:%ss% %tt%'; last CASE };
+    }
+    $format or return;
+    return timelocal(parse_format($date, $format));
+}
+1;
+
+</textarea></p>
+    </form>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">Simply cut and paste the
+    above code into the edit box, and hit update. To make sure everything is
+    correct, you can click on Perl Check to run a syntax check on it. Try it and
+    you should see
+    'MailArc.pm syntax ok'.</font></p>
+    <p><font face="Tahoma,Arial,Helvetica" size="2">A couple things to note about
+    the code:</font></p>
+    <table border="0" cellpadding="2" width="80%">
+      <tr>
+        <td valign="top">
+          <pre>package Plugins::GForum::MailArc;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Don't forget to put
+          your code inside the proper package or it will never work.</font></td>
+      </tr>
+      <tr>
+        <td valign="top"><pre>use strict; </pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Always, always run your
+          plugins under use strict. If you want your plugin to be mod_perl
+          compatible, this will be essential.</font></td>
+      </tr>      
+      <tr>
+        <td valign="top">
+          <pre>use GT::Mail::Parse;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">This module lets you
+          parse the contents of an email.</font></td>
+      </tr>      
+      <tr>
+        <td valign="top">
+          <pre>use GT::Date qw/timelocal parse_format/;</pre>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">GT::Date provides several functions useful in parsing dates, and 
+doing date manipulation.</font></td>
+      </tr>  
+      <tr>
+        <td valign="top">
+          <font face="Tahoma,Arial,Helvetica" size="2">1;</font>
+        </td>
+        <td valign="top"><font face="Tahoma,Arial,Helvetica" size="2">Don't forget, all
+          module must end with a 1; or they won't be able to get require'd in
+          properly.</font></td>
+      </tr>
+    </table>
+<p><font face="Tahoma,Arial,Helvetica" size="2"><b>Step 10: All Done, try it
+out!<br>
+    </b>Now, we are all done! Click on Plugin Manager and it should be listed as
+a plugin waiting to be installed. Click on Install and you should now be able to
+try it out!</font></p>
+    </td>
+  </tr>
+</table>
+
+<TABLE width=100%>
+<TR>
+<TD align="right" valign="top">
+<B><a href="admin.cgi?do=help&topic=help_toc.html"><font face="Verdana, Arial, Helvetica" size="2">Table
+of Contents</font></a></B>
+<HR>
+</TD>
+</TR>
+</TABLE>
+
+</body>
+
Index: admin/help/help_home.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_home.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_markup.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_markup.html,v
retrieving revision 1.1
retrieving revision 1.4
diff -b -u -r1.1 -r1.4
--- admin/help/help_markup.html 11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_markup.html 14 Mar 2002 22:20:21 -0000      1.4
@@ -36,6 +36,9 @@
       When you view your markup tags, they will be sorted by markup type,^M
       grouping all &quot;icon&quot; tags together, for example.</font></p>^M
     </blockquote>^M
+
+
+
     <ul>^M
       <li><b><u><font size="2" face="Tahoma, Arial, Helvetica">Modify</font></u></b></li>^M
     </ul>^M
@@ -63,6 +66,92 @@
       &quot;List&quot; displays a detailed list of all of your database's markup^M
       tags.</font></p>^M
     </blockquote>^M
+
+<p><u><font size="4" face="Tahoma,Arial,Helvetica">Advanced Markup Tags</font></u></p>
+    
+    <blockquote>
+      <p><font size="2" face="Tahoma, Arial, Helvetica">
+Note: creating tags using arguments can be difficult, and it is recommended that it only be tried
+by users who feel comfortable with advanced software configuration.<br><br>
+
+New markup tags that contain a pair of brackets at the end of their title, such as [test()] can be
+used to display preset text followed by text entered by users.  As an example, create a tag called
+[test()].  In the tag's HTML field, enter:<br><br>
+
+<pre>This is test number %1%</pre><br>
+
+When a user uses the [test()] tag, they designate an argument which will appear in place of %1%,
+prefaced by "This is test number".  So, if a user entered the following in the body of a post:<br><br>
+
+<pre>[test 12]</pre><br>
+
+The following would be displayed in the forum:<br><br>
+
+<pre>This is test number 12</pre><br>
+
+Multiple arguments can be implemented through the use of this tag.  If the [test()] tag contained
+the following HTML:<br><br>
+
+<pre>This is test number %1% Today is %2%</pre><br>
+
+%1% would be replaced by the first argument in the tag, while %2% would be replaced  by the second
+argument in the tag.  For example, if a user entered the following in the body of a post:<br><br>
+
+<pre>[test 17 Monday]</pre><br>
+
+The following would be displayed in the forum:<br><br>
+
+<pre>This is test number 17 Today is Monday</pre><br>
+
+Quotes can be used to separate arguments that contain spaces or carriage returns.  Using the same
+HTML for the [test()] tag above, entering the following in the body of a post:<br><br>
+
+<pre>[test 17 "February 13, 2002"]</pre><br>
+
+Would display the following in the forum:<br><br>
+
+<pre>This is test number 17 Today is February 13, 2002</pre><br>
+
+Entering:<br><br>
+
+<pre>[test 17 "<br>
+February 13, 2002"]</pre><br>
+
+Would display:<br><br>
+
+<pre>This is test number 17 Today is<br>
+February 13, 2002</pre><br>
+
+If you are including an argument which is to be used as a cgi script parameter, you will need to
+specify %c1% in order to properly CGI-escape the argument for use in a URL.  Doing this will ensure
+that<br><br>
+
+<pre>[url "http://site/cgi-bin/test.cgi?asdf=sdfg&amp;xcvb=6"]</pre><br>
+
+becomes:<br><br>
+
+<pre>http%3A%2F%2Fsite%2Fcgi-bin%2Fgforum.cgi%3Fasdf%3Dsdfg%26xcvb%3D6</pre><br>
+
+This can be used as an argument in a CGI script. For example, you could make the value of the tag:
+
+<pre>&lt;a href="/cgi-bin/somescript.cgi?url=%c1%&amp;var=1"&gt;</pre>
+
+Using <code>[tagname "http://abc/cgi-bin/asdf.cgi?1=2&amp;3=4"]</code> will result in:
+
+<pre>&lt;a href="/cgi-bin/somescript.cgi?url=http%3A%2F%2Fabc%2Fcgi-bin%2Fasdf.cgi%3F1%3D2%263%3D4&amp;var=1"&lt;</pre>
+
+This way, the URL will be properly passed as a parameter to the CGI script.<br><br>
+
+If you used %1% instead of %c1%, you would end up with:
+
+<pre>&lt;a href="/cgi-bin/somescript.cgi?url=http://abc/cgi-bin/asdf.cgi/1=2&amp;3=4&amp;var=1"&lt;</pre>
+
+Using this method, "somescript.cgi" would receive the wrong variables. %c1% is not, in most cases, required.
+
+</font></p>
+    </blockquote>
+
+
     <p><u><font size="4" face="Tahoma,Arial,Helvetica">Markup Text</font></u></p>^M
     <ul>^M
       <li><b><u><font face="Tahoma, Arial, Helvetica" size="2">Add</font></u></b></li>^M
Index: admin/help/help_plugins.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_plugins.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_posts.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_posts.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
Index: admin/help/help_setup.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_setup.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_setup.html  11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_setup.html  4 Mar 2002 19:00:15 -0000       1.3
@@ -34,9 +34,9 @@
       files and resources.</font></p>^M
     </blockquote>^M
     <p><font size="2" face="Tahoma, Arial, Helvetica">&nbsp;</font></p>^M
-    <p><font size="4" face="Tahoma, Arial, Helvetica"><u>Default</u></font></p>^M
+    <p><font size="4" face="Tahoma, Arial, Helvetica"><u>Defaults</u></font></p>
     <blockquote>^M
-      <p><font size="2" face="Tahoma, Arial, Helvetica">The &quot;Default&quot;^M
+      <p><font size="2" face="Tahoma, Arial, Helvetica">The &quot;Defaults&quot;
       options allow you to configure the default settings which will be used^M
       when your forum is viewed.</font></p>^M
     </blockquote>^M
@@ -90,13 +90,6 @@
       will be sent.</font></p>^M
     </blockquote>^M
     <p><font size="2" face="Tahoma, Arial, Helvetica">&nbsp;</font></p>^M
-    <p><font size="4" face="Tahoma, Arial, Helvetica"><u>Dates</u></font></p>^M
-    <blockquote>^M
-      <p><font size="2" face="Tahoma, Arial, Helvetica">The &quot;Dates&quot;^M
-      options allow you to configure how dates will be displayed throughout your^M
-      forum.</font></p>^M
-    </blockquote>^M
-    <p><font size="2" face="Tahoma, Arial, Helvetica">&nbsp;</font></p>^M
     <p><font size="4" face="Tahoma, Arial, Helvetica"><u>Actions</u></font></p>^M
     <blockquote>^M
       <p><font size="2" face="Tahoma, Arial, Helvetica">The &quot;Actions&quot;^M
Index: admin/help/help_support.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_support.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
Index: admin/help/help_templates.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_templates.html,v
retrieving revision 1.4
retrieving revision 1.7
diff -b -u -r1.4 -r1.7
--- admin/help/help_templates.html      19 Oct 2001 23:31:01 -0000      1.4
+++ admin/help/help_templates.html      14 Mar 2002 22:20:21 -0000      1.7
@@ -27,9 +27,7 @@
       Gossamer Forum's templates.</font></p>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Select a template set
       from the "Currently working on template set" drop-down menu and click the
-      "Change" button. If you wish to alter the default template set that is
-      displayed when people visit your forum, you can select that from Setup
-      -&gt; Default Options.</font></p>
+      "Change" button.</font></p>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Select a specific
       template from the "Available templates" drop-down
       menu. Click "Load" to see the template displayed in the main
@@ -47,13 +45,13 @@
 <p><u><font face="Tahoma, Arial, Helvetica" size="4">Email Templates</font></u></p>
     <blockquote>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking "Email Templates" brings up a menu allowing you to edit the templates from that will be used to build emails automatically sent to your forum's users.</font></p>
-      <p><font face="Tahoma, Arial, Helvetica" size="2">Select the template set you wish to modify from the first drop-down menu and click "Change".  Next, select the specific template you wish to modify from the drop-down menu (see below for descriptions of these templates) and click "Load".<span style="mso-spacerun: yes">&nbsp;
+      <p><font face="Tahoma, Arial, Helvetica" size="2">Select the template set you wish to modify from the first drop-down menu and click "Change".  Next, select the specific template you wish to modify from the drop-down menu and click "Load".<span style="mso-spacerun: yes">&nbsp;
       </span>The email template will be displayed in the "To", "Subject", "From" and "E-mail body" fields.  Clicking the "Show Extra Headers" button opens a field allowing extra headers to be added to the template or modified.  Make changes to the text and tags included in the desired fields.  You can save the template under a different name by entering one in the "Save template as:" field and clicking the "Save" button, or resize the template's textarea by entering values in the row and column fields and clicking the "Change" button.</font></p></blockquote>


     <p>&nbsp;</p>
     <p><u><font face="Tahoma, Arial, Helvetica" size="4">Language
-    Variables</font></u></p>
+    Vars</font></u></p>
     <blockquote>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking
       "Language Variables" displays a menu allowing you to view and
@@ -81,21 +79,15 @@
     </blockquote>
     <p><font face="Tahoma, Arial, Helvetica" size="2">&nbsp;</font></p>
     <p><u><font face="Tahoma, Arial, Helvetica" size="4">Global
-    Variables</font></u></p>
+    Vars</font></u></p>
     <blockquote>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking
       "Global Variables" displays a menu allowing you to view and edit
       your databases' globals. Globals are HTML tags that can be used in
       all templates.</font></p>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Select
-      a template set from the first drop-down menu. If you want changes to your
-      globals to be visible when you rebuild
-      your directory, you should modify the template set selected in the
-      "default_template_set" option in the "Default Options" section
-      of the "Setup" menu. Make changes to the global in the
-      "Description" field, and click the "Save Changes" button.</font></p>
-      <p><font size="2" face="Tahoma, Arial, Helvetica">To
-      create a new global, enter it's name in the Code field. </font><span style="mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-CA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><font face="Tahoma, Arial, Helvetica">Enter
+      a template set from the first drop-down menu. Make changes to the global in the
+      "Description" field, and click the "Save Changes" button. Enter
       the new global's content in the Description field at the bottom of the
       page (globals can be written in HTML or regular text), and click the
       "Save Changes" button.</font></p>
Index: admin/help/help_templates_guide.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_templates_guide.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_templates_guide.html        11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_templates_guide.html        18 Apr 2002 23:24:18 -0000      1.3
@@ -2,7 +2,7 @@
 ^M
 <head>^M
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">^M
-<title>Links SQL Help: Admin</title>^M
+<title>Gossamer Forum Help: Admin</title>
 </head>^M
 ^M
 <body>^M
Index: admin/help/help_templates_syntax.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_templates_syntax.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_templates_syntax.html       11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_templates_syntax.html       18 Apr 2002 23:24:18 -0000      1.3
@@ -2,7 +2,7 @@
 ^M
 <head>^M
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">^M
-<title>Links SQL Help: Admin</title>^M
+<title>Gossamer Forum Help: Admin</title>
 </head>^M
 ^M
 <body>^M
Index: admin/help/help_templates_tags.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_templates_tags.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_templates_tags.html 11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_templates_tags.html 18 Apr 2002 23:24:18 -0000      1.3
@@ -2,12 +2,12 @@
 ^M
 <head>^M
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">^M
-<title>Links SQL Help: Admin</title>^M
+<title>Gossamer Forum Help: Admin</title>
 </head>^M
 ^M
 <body>^M
 ^M
-<H1><font face="Verdana, Arial, Helvetica">Links SQL Help</font></H1>^M
+<H1><font face="Verdana, Arial, Helvetica">Gossamer Forum Help</font></H1>
 ^M
 <TABLE width=100%>^M
 <TR>^M
Index: admin/help/help_toc.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_toc.html,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- admin/help/help_toc.html    11 Oct 2001 22:28:01 -0000      1.1
+++ admin/help/help_toc.html    4 Mar 2002 19:00:15 -0000       1.3
@@ -21,7 +21,15 @@
        <a href="admin.cgi?do=help;topic=help_admin.html">Your Admin</a>^M
     <blockquote>^M
     <p><a href="admin.cgi?do=help;topic=help_home.html">Home</a></p>^M
-    <p><a href="admin.cgi?do=help;topic=help_forums.html">Forums</a><p><a href="admin.cgi?do=help;topic=help_posts.html">Posts</a><p><a href="admin.cgi?do=help;topic=help_users.html">Users</a><p><a href="admin.cgi?do=help;topic=help_markup.html">Markup</a><p><a href="admin.cgi?do=help;topic=help_templates.html">Templates</a><p><a href="admin.cgi?do=help;topic=help_email.html">Email</a><p><a href="admin.cgi?do=help;topic=help_plugins.html">Plugins</a><p><a href="admin.cgi?do=help;topic=help_setup.html">Setup</a>^M
+    <p><a href="admin.cgi?do=help;topic=help_forums.html">Forums</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_posts.html">Posts</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_users.html">Users</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_markup.html">Markup</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_templates.html">Templates</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_email.html">Email</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_plugins.html">Plugins</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_tools.html">Tools</a></p>
+    <p><a href="admin.cgi?do=help;topic=help_setup.html">Setup</a></p>
     </blockquote>^M
     <p><a href="admin.cgi?do=help;topic=help_templates_guide.html">Templates</a>^M
     <blockquote>^M
Index: admin/help/help_tools.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_tools.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/help/help_tools.html  19 Oct 2001 23:31:01 -0000      1.2
+++ admin/help/help_tools.html  2 Mar 2002 02:32:13 -0000       1.3
@@ -19,6 +19,13 @@
 </table>
 <table width=100% cellpadding=20>
 <tr><td>
+
+<p><font size="4" face="Tahoma,Arial,Helvetica"><u>Forum Stats</u></font></p>
+    <blockquote>
+      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking the "Stats" link will display a detailed list of statistics relating to your forum directory: number of users, most recent posts, most popular threads, etc.</font></p>
+      <p><font face="Tahoma, Arial, Helvetica" size="2">Clicking "Source" will display the HTML used to create the Statistics page.</span></font></p>
+    </blockquote>
+
     <p><font size="4" face="Tahoma,Arial,Helvetica"><u>Table Editor</u></font></p>
     <blockquote>
       <p><font face="Tahoma, Arial, Helvetica" size="2">Selecting
Index: admin/help/help_users.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/admin/help/help_users.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -r1.2 -r1.3
--- admin/help/help_users.html  19 Oct 2001 20:07:29 -0000      1.2
+++ admin/help/help_users.html  10 Jan 2002 09:02:19 -0000      1.3
@@ -31,32 +31,6 @@
       Code&quot; and &quot;Email&quot; fields cannot be left blank.</font></p>
     </blockquote>
     <ul>
-      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Modify</font></u></b></li>
-    </ul>
-    <blockquote>
-      <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the
-      &quot;Modify&quot; link brings up a form allowing you to search for
-      specific user records to modify.&nbsp; Enter criteria for your search and
-      click the &quot;Search User&quot; button.&nbsp; A page with the results of
-      your search will be displayed.&nbsp; Select a user record to modify by
-      clicking the radio button beside it and clicking the &quot;Modify
-      User&quot; button.&nbsp; A form allowing you to change any or all aspects
-      of that user record will be displayed.</font></p>
-    </blockquote>
-    <ul>
-      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Delete</font></u></b></li>
-    </ul>
-    <blockquote>
-      <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the
-      &quot;Delete&quot; link brings up a form allowing you to search for
-      specific user record to delete.&nbsp; Enter criteria for your search and
-      click the &quot;Search User&quot; button.&nbsp; A page with the results of
-      your search will be displayed.&nbsp; Select a user record to delete by
-      clicking the checkbox beside it and clicking the &quot;Delete User&quot;
-      button.&nbsp;</font></p>
-    </blockquote>
-
-<ul>
       <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">Validate</font></u></b></li>
     </ul>
     <blockquote>
@@ -72,14 +46,14 @@
       &quot;Search&quot; link brings up a form allowing you to search for
       specific user record.&nbsp; Enter criteria for your search and click the
       &quot;Search User&quot; button.&nbsp; A page with the results of your
-      search will be displayed.&nbsp;</font></p>
+      search will be displayed. You can choose to view the "Details" of, "Modify" or "Delete" any of the records returned by your search by clicking on the appropriate link.&nbsp;</font></p>
     </blockquote>
     <ul>
-      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">List</font></u></b></li>
+      <li><b><u><font size="2" face="Tahoma,Arial,Helvetica">List All</font></u></b></li>
     </ul>
     <blockquote>
       <p><font size="2" face="Tahoma,Arial,Helvetica">Clicking the
-      &quot;List&quot; link displays a detailed list of all user records in your
+      &quot;List All&quot; link displays a detailed list of all user records in your
       database.&nbsp; A shorter summary of all user records can be viewed by
       clicking the &quot;condensed&quot; link.</font></p>
     </blockquote>
@@ -143,7 +117,7 @@
     <blockquote>
       <p><font face="Tahoma,Arial,Helvetica" size="2">Clicking the &quot;Add
       Users&quot; link brings up a form allowing you to add users to any of your
-      database's user groups.</font></p>
+      database's user groups. Select the appropriate group from the drop-down menu, then enter usernames in the main text field, one per line.</font></p>
     </blockquote>
     <ul>
       <li><b><u><font face="Tahoma,Arial,Helvetica" size="2">Remove Users</font></u></b></li>
@@ -151,7 +125,7 @@
     <blockquote>
       <p><font face="Tahoma,Arial,Helvetica" size="2">Clicking the &quot;Remove
       Users&quot; link brings up a form allowing you to remove users from any of
-      your database's user groups.</font></p>
+      your database's user groups. Select the appropriate group from the drop-down menu and click the "select users" button.  You can enter usernames in the main text field, one per line, or click the "View user select list" to see a list of all users in the selected group.  Usernames can be selected and deleted from this list.</font></p>
     </blockquote>
     <p>&nbsp;</p>
     <p><u><font size="4" face="Tahoma,Arial,Helvetica">Bans</font></u></p>
Index: common/README
===================================================================
RCS file: common/README
diff -N common/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ common/README       10 Jan 2002 09:02:09 -0000      1.1
@@ -0,0 +1 @@
+Note! Do not edit these templates. You should use the template editor in the admin, which saves changes in the local directory. This allows you to recover old templates if you accidentally mess up a template, or compare your customized templates to the original template.
Index: common/editor.js
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/common/editor.js,v
retrieving revision 1.3
retrieving revision 1.8
diff -b -u -r1.3 -r1.8
--- common/editor.js    18 Dec 2001 18:21:43 -0000      1.3
+++ common/editor.js    15 May 2002 02:03:36 -0000      1.8
@@ -1,975 +1,457 @@
 /*
  * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
+ * HTML Editor - A wysiwyg web based editor for IE5.5+
  *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor.js,v 1.3 2001/12/18 18:21:43 sbeck Exp $
+ *    Revision : $Id: editor.js,v 1.8 2002/05/15 02:03:36 jagerman Exp $
  *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
+ * Copyright (c) 2002 Gossamer Threads Inc. All Rights Reserved.
  * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
+ * see LICENSE file for full details.
  * =================================================================
  *
- * Description: Public interface for creating an HTML editor.
+ * Description: Common functions needed to display the toolbar for an
+ * HTML-editing iframe, as used in Gossamer Forum.
  */

-// Keep track of number of images loaded.
-IMAGES_LEN = 0;
+/* -- Javascript needed to write a post -- */
+
+var port = (window.location.port == 0) ? '' : ':' + window.location.port;
+var url = window.location.protocol + '//' + window.location.hostname + port + window.location.pathname + '?<%hidden_query%>';

-// All the files. Used to set the url to them.
-FILES = {
-    image  : "image.html",
-    about  : "about.html"
+var image_url = '<%escape_js image_url%>';
+
+var Faces = {
+    ':)'      : image_url + '/smile.gif',
+    ';)'      : image_url + '/wink.gif',
+    ':('      : image_url + '/frown.gif',
+    ':P'      : image_url + '/tongue.gif',
+    'cool'    : image_url + '/cool.gif',
+    'blush'   : image_url + '/blush.gif',
+    'angelic' : image_url + '/angelic.gif',
+    'crazy'   : image_url + '/crazy.gif',
+    'mad'     : image_url + '/mad.gif',
+    'shocked' : image_url + '/shocked.gif',
+    'laugh'   : image_url + '/laugh.gif',
+    ':/'      : image_url + '/unsure.gif',
+    ':|'      : image_url + '/unimpressed.gif',
+    'sly'     : image_url + '/sly.gif',
+    'pirate'  : image_url + '/pirate.gif'
 };

-// Have to store "this" in a global for events that are fired.
-// This gives a limitation that only one instance of the 
-// Editor can occur. This seems quite lame to me. If JScript
-// had support for closures there would not be a problem.
-This = false;
+var iframe, editor, post, outerdoc; // iframe is the inner iframe, editor is the editor (document object), and post is the editor's body.

+var innerInterval, tbInterval, pressedInterval, initialized;

-/***********************************************************/
-/***********************************************************/
-/************ Public Fucntions                  ************/
-/***********************************************************/
-/***********************************************************/
+window.onresize = tb_layout;

-function Editor (opts) {
-/* ---------------------------------------------------------
- * Constructor for Editor. Pass in an Object or options
- * for this instance of the editor.
- * Example:
- *    var editor = new Editor (
- *        { 
- *            debug      : 1, 
- *            base_url   : "http://www.gossamer-threads.com/tmp/editor"
- *        }
- *    );
- * 
- */
-    this.debug ("Got to constructor Editor");
-    if (!opts) return this;
-    var initialize = false;
-    this.initialized = false;
-    this.tb_hide = {};
-    this.tb_delete = {};
-    this.control = DHTMLSafe;
-    for (var opt in opts) {
-        switch (opt) {
-            case "tb_hide":
-                for (var i = 0; i < opts[opt].length; i++) {
-                    this.tb_hide[opts[opt][i]] = 1;
-                }
-                break;
-            case "tb_delete":
-                for (var i = 0; i < opts[opt].length; i++) {
-                    this.tb_delete[opts[opt][i]] = 1;
-                }
-                break;
-            case "base_url":
-                this.base_url = opts[opt];
-                break;
-            case "image_url":
-                this.image_url = opts[opt];
-                break;
-            case "images_url":
-                this.images_url = opts[opt];
-                break;
-            case "debug":
-                this.set_debug_level (opts[opt]);
-                break;
-            case "init":
-                initialize = true;
-                break;
-            default:
-                return this.error ("In constructure for Editor wrong argument");
-                break;
-        }
-    }
+function initOuterIFrame () {
+    // How fun - we write the HTML (which includes JavaScript) for this iframe, then write the HTML for the iframe contained within the iframe. :)
+    document.frames.editor_iframe.document.write('<%GForum::Utils::js_quote_include('editor_iframe.html')%>');

-// go through and set all the urls
-    for (var file in FILES) {
-        if (this[file + "_url"]) continue;
-        if (this.base_url) {
-            this[file + "_url"] = this.base_url + FILES[file];
+    innerInterval = setInterval("initInnerIFrame()", 100);
+}
+
+function initInnerIFrame () {
+    if (document.frames.editor_iframe.document.editor_iframe) { // The inner <iframe> exists
+        clearInterval(innerInterval);
         }
         else {
-            this[file + "_url"] = FILES[file];
+        return; // The inner <iframe> hasn't been loaded yet
         }
+    outerdoc = document.frames.editor_iframe.document;
+    iframe = outerdoc.frames.editor_iframe;
+    editor = iframe.document;
+
+    var initValue;
+    if (privateMessage) {
+        initValue = document.message.msg_body_html.value;
     }
-// Set some defaults
-
-// State we are in.
-    this.text_mode    = false;
-
-// Initial html.
-    this.editor_content = '';
-
-// The editor is initialized
-    this.editor_init  = false;
-
-// The toolbar is initialized
-    this.toolbar_init = false;
-
-// Images initialized
-    this.images_init  = false;
+    else {
+        initValue = document.post.post_message_html.value;
+    }
+    editor.write('<%GForum::Utils::js_quote_include('editor_editor.html')%>' + initValue + '</body></html>');

-// Array of toolbars
-    this.toolbars     = [];
+    post = editor.all.post;

-    This = this;
-    if (initialize) this.init();
-    return this;
-}
+    tbInterval = setInterval("toolbarInit()", 100);

-function get_editor_html () {
-/* ---------------------------------------------------------
- * Gets the html when the user is done editing it. Html 
- * returned should be sutible for a web page.
- */
-    var ret;
-    ret = DHTMLSafe.DocumentHTML;
-    return ret;
-}
-Editor.prototype.get_editor_html = get_editor_html;
+    if (privateMessage) {
+        document.message.onsubmit = retrieveHTML;
+    }
+    else {
+        document.post.onsubmit = retrieveHTML;
+    }

-function set_editor_html (content) {
-/* ---------------------------------------------------------
- * Set the html for the document. String passed in must be
- * somewhat valid html.
- */
-// Set the content
-    this.editor_content = content;
-    return true;
+    pressedInterval = setInterval("calcPressed()", 300);
 }
-Editor.prototype.set_editor_html = set_editor_html;

-function set_debug_level (debug) {
-/* ---------------------------------------------------------
- * Gets the html when the user is done editing it. Html 
- * returned should be sutible for a web page.
- */
-    if (debug || debug == 0) this._debug = debug;
-    if (this._debug > 0) this.debug_init();
-
-    return this._debug;
+function press (button, image) { // Takes a span from the outer iframe and "presses" it.
+    button.isPressed = true;
+    button.className = "menu_item_mouseoverdown";
+    image.className  = "icon_down";
 }
-Editor.prototype.set_debug_level = set_debug_level;

-/***********************************************************/
-/***********************************************************/
-/************ Error handling and Debugging      ************/
-/***********************************************************/
-/***********************************************************/
-
-function error () {
-/* ---------------------------------------------------------
- * Called for errors. Alerts the error and returns false.
- * Nice for syntax like return this.error ("Some is wrong");
- */
-    var msg = '';
-    for (var i = 0; i < arguments.length; i++) msg += ' ' + arguments[i];
-    if (this._debug > 0) this.debug (msg);
-    alert ("Editor: " + msg);
-    return false;
+function unpress (button, image) { // Takes one of the spans from the editor_iframe page and unpresses the button
+    button.isPressed = false;
+    button.className = "tb_menu_item";
+    image.className  = "tb_icon";
 }
-Editor.prototype.error = error;

-function debug () {
-/* ---------------------------------------------------------
- * Debuggin routine. FIXME: Escape html character.
- */
-    var msg = '';
-    for (var i = 0; i < arguments.length; i++) msg += ' ' + arguments[i];
-    if (this._debug > 0 && this.dh) this.dh.writeln ("Editor: " + msg);
-    return true;
+function disable (button) { // Disables a span
+       button.className  = "tb_menu_item";
+    button.disabled = true;
+    button.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=25)";
 }
-Editor.prototype.debug = debug;
-
-
-/***********************************************************/
-/***********************************************************/
-/************ Init functions                    ************/
-/***********************************************************/
-/***********************************************************/
-
-function init_start () {
-/* ---------------------------------------------------------
- * Initializes the toolbar and images. Public function
- * to start everything after options are passed in.
- */
-
-    // Display everything at once.
-    this.debug ("Init start called");
-    this.debug ("Setting interval");
-    this.time_out = window.setInterval ("This.window_init()", 1000, 'JScript');
-
-// Initialize images and toolbar
-    this.debug ("Calling init_images");
-    this.init_images ();
-    this.debug ("Calling init_toolbar");
-    this.init_toolbar ();
-    this.debug ("Done with init_start");
-    this.initialized = true;

+function enable (button) { // Enables a span
+    button.disabled = false;
+    button.style.filter = null;
 }
-Editor.prototype.init = init_start;

-function debug_init () {
-/* ---------------------------------------------------------
- * Initializes the debugging window and sets up an event
- * handler to close it.
- */
-    if (this._debug) {
-        var win = window.open ("", "debug_win", "");
-        this.dh = win.document;
-        this.debug_win = win;
-        this.dh.write ("<html><pre>");
-        window.onunload = function () { This.debug_win.close() };
-    }
-}
-Editor.prototype.debug_init = debug_init;
+var pressLoopInit = false;
+var pressButtons = {};
+var pressLoop = [];
+function calcPressed () {
+    var sel = editor.selection.createRange();

-function window_init () {
-/* ---------------------------------------------------------
- * Sets the display on all toolbars to visible. Returns
- * if anything has not been initalized
- */
-// Toolbar and images have been initialized
-    if (!this.toolbar_init || !this.images_init) return;
+    if (!pressLoopInit) {
+        pressLoop[pressLoop.length] = 'Bold';
+        pressButtons['Bold'] = [outerdoc.all.bold, outerdoc.all.boldImage];

-// All images are loaded
-    if (IMAGES_LEN < document.images.length) return;
+        pressLoop[pressLoop.length] = 'Italic';
+        pressButtons['Italic'] = [outerdoc.all.italic, outerdoc.all.italicImage];

-    this.debug ("Initializing Window display");
+        pressLoop[pressLoop.length] = 'Underline';
+        pressButtons['Underline'] = [outerdoc.all.underline, outerdoc.all.underlineImage];

-// Clear the timeout
-    this.debug ("Clearing interval");
-    window.clearInterval (this.time_out);
+        pressLoop[pressLoop.length] = 'JustifyLeft';
+        pressButtons['JustifyLeft'] = [outerdoc.all.jleft, outerdoc.all.jleftImage];

-    this.debug ("Going through images array");
-    for (var i = 0; i < document.images.length; i++) {
-        var image = document.images[i];
+        pressLoop[pressLoop.length] = 'JustifyCenter';
+        pressButtons['JustifyCenter'] = [outerdoc.all.jcenter, outerdoc.all.jcenterImage];

+        pressLoop[pressLoop.length] = 'JustifyRight';
+        pressButtons['JustifyRight'] = [outerdoc.all.jright, outerdoc.all.jrightImage];

-// Do not show images that have been deleted in the toolbar
-        var tb = image.parentElement.parentElement.title;
-        if (this.tb_delete[tb]) continue;
+        pressLoop[pressLoop.length] = 'InsertOrderedList';
+        pressButtons['InsertOrderedList'] = [outerdoc.all.ol, outerdoc.all.olImage];

-        document.images[i].style.visibility = 'visible';
-    }
+        pressLoop[pressLoop.length] = 'InsertUnorderedList';
+        pressButtons['InsertUnorderedList'] = [outerdoc.all.ul, outerdoc.all.ulImage];

-// Display toolbar
-    this.debug ("Going through toobar array");
-    for (var i = 0; i < this.toolbars.length; i++) {
-        this.debug ("Setting toolbar", this.toolbars[i].title, "to visible");
-        if (this.toolbars[i].className == 'toolbar_hidden') continue;
-        this.toolbars[i].style.visibility = 'visible';
+        pressLoopInit = true;
     }
-    this.debug ("Setting dhtml content");
-    if ( this.editor_content ) DHTMLSafe.DocumentHTML = this.editor_content;

-    this.debug ("Finished windows init");
-    return true;
-}
-Editor.prototype.window_init = window_init;
-
-
-/***********************************************************/
-/***********************************************************/
-/************ Execute DHTML Commands            ************/
-/***********************************************************/
-/***********************************************************/
-
-function exec (what, prompt, opt) {
-/* ---------------------------------------------------------
- * General method to Execute a command to edit.
- * Options are "Command", "Prompt user", 
- * "options for command" . The first two are constants 
- * defined at the top. The last is any options the command
- * needs. This function validates against text mode and 
- * runs a Query to see if the command can happen. If the
- * can't be ran, returns false.
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
+    for (var i = 0; i < pressLoop.length; i++) {
+        var pressed = sel.queryCommandValue(pressLoop[i]);
+        var span  = pressButtons[pressLoop[i]][0];
+        var image = pressButtons[pressLoop[i]][1];

-    if (!opt)     opt = '';
-    if (!prompt)  prompt = OLECMDEXECOPT_DODEFAULT;
-
-// Do whatever it is we are doing
-    var ret = this.query (what);
-    switch (ret) {
-        case 0:
-            //alert ("Command not supported");
-            this.debug ("Command", what, "not supported");
-            break;
-        case 1:
-            //alert ("Command disabled (" + what + ")");
-            this.debug ("Command", what, "disabled");
-            break;
-        default:
-            this.debug ("Calling ExecCommand with arguments", what, prompt, opt);
-            DHTMLSafe.ExecCommand(what, prompt, opt);
-            DHTMLSafe.focus();
-            return true;
+        if      (pressed && !span.isPressed)   press(span, image);
+        else if (!pressed && span.isPressed) unpress(span, image);
+        else if (span.isPressed == null) span.isPressed = false;
     }
-    DHTMLSafe.focus();
-    return false;
-}
-Editor.prototype.exec = exec;
-
-function query (what) {
-    return DHTMLSafe.QueryStatus (what)
-}
-Editor.prototype.query = query;
-
-/***********************************************************/
-/***********************************************************/
-/************ Utility Function                  ************/
-/***********************************************************/
-/***********************************************************/
-
-function update_toggle (element, image) {
-/* ---------------------------------------------------------
- * Updates a toggle button given the parent element and
- * the image object.
- */

-// Turn it off
-    if (element.tb_state == 'on') {
-        element.tb_state  = 'off';
-        element.className = "tb_menu_item";
-        image.className   = "tb_icon";
-    }
+    var cutable = sel.queryCommandEnabled('Cut');
+    var copyable = sel.queryCommandEnabled('Copy');
+    var pastable = sel.queryCommandEnabled('Paste');
+    var linkable = (sel.htmlText != '' && sel.htmlText != '\n<P>&nbsp;</P>');

-// Turn it off
-    else if (element.tb_state == 'off') {
-        element.tb_state = 'on';
-        element.className = "menu_item_mouseoverdown";
-        image.className   = "icon_down";
-    }
+    if      ( cutable  &&  outerdoc.all.cut.disabled  ) enable (outerdoc.all.cut  );
+    else if (!cutable  && !outerdoc.all.cut.disabled  ) disable(outerdoc.all.cut  );
+    if      ( copyable &&  outerdoc.all.copy.disabled ) enable (outerdoc.all.copy );
+    else if (!copyable && !outerdoc.all.copy.disabled ) disable(outerdoc.all.copy );
+    if      ( pastable &&  outerdoc.all.paste.disabled) enable (outerdoc.all.paste);
+    else if (!pastable && !outerdoc.all.paste.disabled) disable(outerdoc.all.paste);
+    if      ( linkable &&  outerdoc.all.link.disabled ) enable (outerdoc.all.link );
+    else if (!linkable && !outerdoc.all.link.disabled ) disable(outerdoc.all.link );
 }
-Editor.prototype.update_toggle = update_toggle;
-
-function cancel_event (evnt) {
-/* ---------------------------------------------------------
- * General function to cancel an event.
- */
-    if (!evnt) evnt = event;
-    if (!evnt) return false;
-    evnt.returnValue  = false;
-    evnt.cancelBubble = true;
-    return false;
-}
-Editor.prototype.cancel_event = cancel_event;
-
-/* 
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor.js,v 1.3 2001/12/18 18:21:43 sbeck Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: DHTML Editing Component Constants for JavaScript
- * Constants (c) Microsoft Corporation.
- */

-//
-// Command IDs
-//
-DECMD_BOLD =                      5000
-DECMD_COPY =                      5002
-DECMD_CUT =                       5003
-DECMD_DELETE =                    5004
-DECMD_DELETECELLS =               5005
-DECMD_DELETECOLS =                5006
-DECMD_DELETEROWS =                5007
-DECMD_FINDTEXT =                  5008
-DECMD_FONT =                      5009
-DECMD_GETBACKCOLOR =              5010
-DECMD_GETBLOCKFMT =               5011
-DECMD_GETBLOCKFMTNAMES =          5012
-DECMD_GETFONTNAME =               5013
-DECMD_GETFONTSIZE =               5014
-DECMD_GETFORECOLOR =              5015
-DECMD_HYPERLINK =                 5016
-DECMD_IMAGE =                     5017
-DECMD_INDENT =                    5018
-DECMD_INSERTCELL =                5019
-DECMD_INSERTCOL =                 5020
-DECMD_INSERTROW =                 5021
-DECMD_INSERTTABLE =               5022
-DECMD_ITALIC =                    5023
-DECMD_JUSTIFYCENTER =             5024
-DECMD_JUSTIFYLEFT =               5025
-DECMD_JUSTIFYRIGHT =              5026
-DECMD_LOCK_ELEMENT =              5027
-DECMD_MAKE_ABSOLUTE =             5028
-DECMD_MERGECELLS =                5029
-DECMD_ORDERLIST =                 5030
-DECMD_OUTDENT =                   5031
-DECMD_PASTE =                     5032
-DECMD_REDO =                      5033
-DECMD_REMOVEFORMAT =              5034
-DECMD_SELECTALL =                 5035
-DECMD_SEND_BACKWARD =             5036
-DECMD_BRING_FORWARD =             5037
-DECMD_SEND_BELOW_TEXT =           5038
-DECMD_BRING_ABOVE_TEXT =          5039
-DECMD_SEND_TO_BACK =              5040
-DECMD_BRING_TO_FRONT =            5041
-DECMD_SETBACKCOLOR =              5042
-DECMD_SETBLOCKFMT =               5043
-DECMD_SETFONTNAME =               5044
-DECMD_SETFONTSIZE =               5045
-DECMD_SETFORECOLOR =              5046
-DECMD_SPLITCELL =                 5047
-DECMD_UNDERLINE =                 5048
-DECMD_UNDO =                      5049
-DECMD_UNLINK =                    5050
-DECMD_UNORDERLIST =               5051
-DECMD_PROPERTIES =                5052
-
-//
-// Enums
-//
-
-// OLECMDEXECOPT  
-OLECMDEXECOPT_DODEFAULT =         0 
-OLECMDEXECOPT_PROMPTUSER =        1
-OLECMDEXECOPT_DONTPROMPTUSER =    2
-
-// DHTMLEDITCMDF
-DECMDF_NOTSUPPORTED =             0 
-DECMDF_DISABLED =                 1 
-DECMDF_ENABLED =                  3
-DECMDF_LATCHED =                  7
-DECMDF_NINCHED =                  11
-
-// DHTMLEDITAPPEARANCE
-DEAPPEARANCE_FLAT =               0
-DEAPPEARANCE_3D =                 1 
-
-// OLE_TRISTATE
-OLE_TRISTATE_UNCHECKED =          0
-OLE_TRISTATE_CHECKED =            1
-OLE_TRISTATE_GRAY =               2
-
-/*  
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor.js,v 1.3 2001/12/18 18:21:43 sbeck Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Editing and format functions.
- */
-
-/***********************************************************/
-/***********************************************************/
-/************ HTML Insertion Functions          ************/
-/***********************************************************/
-/***********************************************************/
-
-function insert_html (start, stop) {
-/* ---------------------------------------------------------
- * If called with "start" and "stop" gets the text that
- * is selected in the edit field and pastes "start" on the
- * left of it an "stop" on the right of it. 
- * Like: <textarea> and </textarea>
- * If called is only "start" replaces the selected text with
- * "start".
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-       var selection = DHTMLSafe.DOM.selection.createRange();
-       if (!start) return;
-       if (selection.htmlText == null) {
-               this.debug ("Can't insert html (", start, stop, "). Selection is null");
-               DHTMLSafe.focus();
-               return;
-       }
-       var html = '';
-       if (stop) {
-               this.debug ("Inserting html (", start, stop, ") around (", selection.text, ")");
-               html = start + selection.text + stop;
+function retrieveHTML () {
+    if (privateMessage) {
+        document.message.msg_body.value = post.innerHTML;
        }
        else {
-               this.debug ("Inserting html (", html, ")");
-               html = start;
+        document.post.post_message.value = post.innerHTML;
        }
-       if (this.text_mode) html = escape_html (html);
-       selection.pasteHTML (html);
-       DHTMLSafe.focus();
 }
-Editor.prototype.insert_html = insert_html;

-function insert_image () {
-/* ---------------------------------------------------------
- * Calles a pop-up diaglog "IMAGE_URL" to prompt the user to
- * select a URL to an image. After that inserts the image 
- * into the document by calling insert_html.
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-       if (DHTMLSafe.DOM.selection.type == 'Control') {
-               this.debug ("Type of selection is Control. Deselection");
-               DHTMLSafe.DOM.selection.empty();
-       }
-       this.debug ("Bringging up dialogue for URL: (", this.image_url, ")");
-    var src = showModalDialog( this.image_url, this, "dialogHeight:170px;dialogWidth:435px" );
-    if ( src ) this.insert_html( '<img src="' + src + '">' );
+function command (cmd) {
+    iframe.focus();
+    editor.execCommand(cmd);
+    iframe.focus();
 }
-Editor.prototype.insert_image = insert_image;

-function insert_hr () {
-/* ---------------------------------------------------------
- * Inserts the html needed for an hr
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('hr')%>
-    this.insert_html( '<%escape_js hr%><br>' )
+function addTag (face) {
+    iframe.focus();
+    editor.selection.createRange().pasteHTML('<img src="' + Faces[face] + '">');
+    iframe.focus();
 }
-Editor.prototype.insert_hr = insert_hr;

-function insert_quote () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a quote
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('quote', '/quote')%>
-    var start = '<%escape_js quote%><br>';
-    var end   = '<%escape_js /quote%>';
-    this.insert_html( start, end );
+// This handles the tabbing - if you change the post icon selection, the
+// tabIndex needs to be changed as well so that we don't have to tab through all
+// of the icons if going through the page with tab
+function updateTab (selected_val) {
+  var col = document.getElementsByName("post_icon");
+  for (i = 0; i < col.length; i++) {
+    if (selected_val == col[i].value)
+      col[i].tabIndex = 5;
+    else
+      col[i].tabIndex = 0;
+  }
 }
-Editor.prototype.insert_quote = insert_quote;

-function insert_reply () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a reply
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('reply', '/reply')%>
-    var start = '<%escape_js reply%><br>';
-    var end   = '<%escape_js /reply%>';
-    this.insert_html( start, end );
+function command (cmd) {
+    editor.execCommand(cmd);
+    iframe.focus();
 }
-Editor.prototype.insert_reply = insert_reply;

-function insert_code () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a code
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('code', '/code')%>
-    var start = '<%escape_js code%><br>';
-    var end   = '<%escape_js /code%>';
-    this.insert_html( start, end );
+// This is called for things like [quote]...[/quote] - they should surround the selected text.
+function surroundTag (start, end) {
+    iframe.focus();
+    var selection = editor.selection.createRange();
+    selection.pasteHTML(start + selection.htmlText + end);
+    iframe.focus();
 }
-Editor.prototype.insert_code = insert_code;
-
-
-/* 
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor.js,v 1.3 2001/12/18 18:21:43 sbeck Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Event handlers for DHTMLSafe.
- */

+// This is called for tags like [smile] - it replaces any selected text
+function insertTag (tag) {
+    iframe.focus();
+    var selection = editor.selection.createRange();
+    selection.pasteHTML(tag);
+    iframe.focus();
+}

+<%GForum::Markup::get_tags('code', '/code', 'reply', '/reply', 'quote', '/quote')%>

-/***********************************************************/
-/***********************************************************/
-/************ Event handlers for DHTMLSafe      ************/
-/***********************************************************/
-/***********************************************************/
+function insertCode ()  { var sel = editor.selection.createRange(); surroundTag('<%escape_js code%>'  + ((sel.htmlText == '' || sel.htmlText == '\n<P>&nbsp;</P>') ? '<br>' : ''), '<%escape_js /code%>' ); }
+function insertReply () { var sel = editor.selection.createRange(); surroundTag('<%escape_js reply%>' + ((sel.htmlText == '' || sel.htmlText == '\n<P>&nbsp;</P>') ? '<br>' : ''), '<%escape_js /reply%>'); }
+function insertQuote () { var sel = editor.selection.createRange(); surroundTag('<%escape_js quote%>' + ((sel.htmlText == '' || sel.htmlText == '\n<P>&nbsp;</P>') ? '<br>' : ''), '<%escape_js /quote%>'); }

-function DocumentComplete () {
-/* ---------------------------------------------------------
- * Initializes the content of the edit window when the
- * edit window is finished loading the first time.
- */
-       if (this.editor_init) return true;
-       this.editor_init = true;
-       this.debug ("Initializing DHTMLSafe and setting content");
-       if ( this.editor_content ) DHTMLSafe.DocumentHTML = this.editor_content;
+function imageDialog () {
+    var imageSrc = showModalDialog(url + ';do=editor_image', null, "dialogHeight: 135px; dialogWidth: 435px; scroll: no; help: no; status: no");
+    if (imageSrc) {
+        iframe.focus();
+        editor.execCommand('InsertImage', false, imageSrc);
+    }
+    iframe.focus();
 }
-Editor.prototype.DocumentComplete = DocumentComplete;

-function onkeydown () {
-/* ---------------------------------------------------------
- * Function called onKeyPress for the Edit object. Used to 
- * disable certain short cuts during "text mode". Also used 
- * to enable CTRL-D to bring op the Font dialog. 
- */
+function linkDialog () {
+    var sel = editor.selection.createRange();
+    if (sel.htmlText == '' || sel.htmlText == '\n<P>&nbsp;</P>') return;

- // What a strang place to stick an event object
-       var evnt = DHTMLSafe.DOM.parentWindow.event;
-       if (evnt.ctrlKey) {
-
-               switch (evnt.keyCode) {
-                       case 90: // ctrl-z   undo 
-                       case 89: // ctrl-y   redo 
-                       case 67: // ctrl-c   copy 
-                       case 37: // ctrl-left     
-                       case 39: // ctrl-right    
-                               return true;
-            case 68:
-                exec (DECMD_FONT, OLECMDEXECOPT_PROMPTUSER);
-                return this.cancel_event (evnt);
-                       default:
-                               break;
-               }
-       }
-       return true;
+    iframe.focus();
+    setTimeout("editor.execCommand('CreateLink', true); iframe.focus();", 100);
 }
-Editor.prototype.onkeydown = onkeydown;

-function DisplayChanged () {
-/* ---------------------------------------------------------
- * Time critical event handler. Called every time anything
- * changes on the Edit object field. Used to update the 
- * "toggle" menu items and disabled items for "text mode".
- */
-// No debugging in here. This event is ran every second or so.
+function fontDialog () {
+    var sel = editor.selection.createRange();
+    var font = sel.queryCommandValue('FontName');
+    var size = sel.queryCommandValue('FontSize');
+    var color = sel.queryCommandValue('ForeColor');
+    var bold = sel.queryCommandValue('Bold');
+    var italic = sel.queryCommandValue('Italic');
+    var underline = sel.queryCommandValue('Underline');
+    var args = [font, size, color, bold, italic, underline];

- // Loop through all the toolbars
-       var tb_len = this.toolbars.length
-       for (var i = 0; i < tb_len; i++) {
-               if (this.toolbars[i].className == 'toolbar_hidden') continue;
-
-// Get the toolbars children and loop through them.
-               var elements = this.toolbars[i].children;
-               if (!elements) continue;
-               var ele_len = elements.length;
-               for (var e = 0; e < ele_len; e++) {
-                       var current = elements[e];
-                       var image = current.children (0);
-                       if (!current || !image) continue;
-
-                       if (current.enabled) {
-                               var ret = 0;
-                               eval ("ret = " + current.enabled);
-                               if (ret == DECMDF_DISABLED || ret == DECMDF_NOTSUPPORTED) {
-                                       current.style.filter = "alpha(opacity=25)";
-                                       current.state        = 'disabled';
-                                       if (current.id == 'fmt_select') current.disabled = true;
+    // ret is an array, just like args: [font, size, color, b, i, u]
+    var ret = showModalDialog(url + ';do=editor_font', args, "dialogHeight: 332px; dialogWidth: 442px; scroll: no; help: no; status: no");

-                                       // Disabled, no need to toggle check.
-                                       continue;
-                               }
-                               else {
-                                       current.style.filter = "";
-                                       current.state        = 'enabled';
-                                       if (current.id == 'fmt_select') {
-                                               current.disabled = false;
-                                       }
-                               }
-                       }
-                       else {
-                               current.state = 'enabled';
-                               current.style.filter = "";
-                               current.className = "tb_menu_item";
-                               image.className   = "tb_icon";
-                               continue;
+    if (ret) {
+        var applyTo;
+        if (sel.htmlText.length == 0 || sel.htmlText == '\n<P>&nbsp;</P>')
+            applyTo = editor;
+        else
+            applyTo = sel;
+        if (ret[0]) applyTo.execCommand('FontName', false, ret[0]);
+        if (ret[1]) applyTo.execCommand('FontSize', false, ret[1]);
+        if (ret[2]) applyTo.execCommand('ForeColor', false, ret[2]);
+        if (ret[3] != null && ((ret[3] && !bold) || (!ret[3] && bold))) // Toggle bold if bold was on and is now off or if bold was off and is now on
+            applyTo.execCommand('Bold');
+        if (ret[4] != null && ((ret[4] && !italic) || (!ret[4] && italic))) // Toggle italics if it was on and is now off or if it was off and is now on
+            applyTo.execCommand('Italic');
+        if (ret[5] != null && ((ret[5] && !underline) || (!ret[5] && underline))) // Toggle underline if it was on and is now off or if it was off and is now on
+            applyTo.execCommand('Underline');
                        }
+    iframe.focus();
+}

+<%if ie_version >= 6%>
+function colorDialog () {
+    setTimeout('IE6Color(); iframe.focus()');
+}

-// Not a toggle button, make sure the button is in the mouse
-// out position.
-                       if (current.TB_TYPE != 'toggle') continue;
+function IE6Color () {
+    var color = document.all.dlg.ChooseColorDlg();

-// Eval the string
-                       eval("var code = " + current.enabled);
+    var hexColor = color.toString(16);
+    if (hexColor.length < 6) hexColor = "000000".substring(0, 6 - hexColor.length) + hexColor;

-// If we are in that edit mode turn the button on
-                       if (code == DECMDF_LATCHED) {
-                               current.tb_state  = 'on';
-                               current.className = "menu_item_mouseoverdown";
-                               image.className   = "icon_down";
-                       }
-
-// else turn the button off
-                       else {
-                               current.tb_state  = 'off';
-                               current.className = "tb_menu_item";
-                               image.className   = "tb_icon";
-                       }
-               }
-       }
-       return true;
+    editor.execCommand("ForeColor", true, hexColor);
 }
-Editor.prototype.DisplayChanged = DisplayChanged;
+<%else%>
+function colorDialog () {
+    var hexColor = showModalDialog(url + ';do=editor_color', null, "dialogHeight: 380px; dialogWidth: 115px; scroll: no; help: no; status: no");
+    editor.execCommand("ForeColor", true, hexColor);
+    iframe.focus();
+}
+<%endif%>

-/*
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor.js,v 1.3 2001/12/18 18:21:43 sbeck Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Functions for the editor toolbars.
- */
+/* -- Toolbar initialization is below -- */

-function init_images () {
-/* ---------------------------------------------------------
- * Preloads images and sets the URL for all the images on 
- * the page. If you add other images be sure they are in
- * the directory you set above.
- * This sets the onload event for the images to be displayed.
- */

- // If we are initialized return
-       if (this.images_init) return true;
-       this.debug ("Initializing Images");
-       for (var i = 0; i < document.images.length; i++) {
-               image = document.images[i];
-
-// Images are hidden untill the toolbar is loaded
-               image.style.visibility = 'hidden';
-
-// Do not load images of toolbars that are deleted
-               var pb = image.parentElement.title;
-               var tb = image.parentElement.parentElement.title;
-               if (this.tb_delete[tb] || this.tb_delete[pb]) {
-                       IMAGES_LEN++;
-                       continue;
-               }
-
-// Set the image source
-               var old_src = image.src;
-               image.src = old_src;
-       }
-       this.images_init = true;
-       return true;
-}
-Editor.prototype.init_images = init_images;
+var initInterval, toolbars, tb;

-function init_toolbar () {
+// Keep track of number of images loaded.
+//var imagesLoaded = 0;
+
+function toolbarInit () {
 /* ---------------------------------------------------------
- * Should be called after the document has loaded. 
+ * Should be called after the outerdoc has loaded. 
  * Initializes the Toolbar for display.
  */
-// Toolbar handler
+    // 'toolbars' contains all the div tags
+       var tbs = outerdoc.body.all.tags("DIV");

-       if (this.toolbar_init) return true;
-       this.debug ("Initializing toolbar");
-       var i, s, element;
-       this.tb = {};
-       var tbs = document.body.all.tags ("DIV");
-       var tbs_len = tbs.length;
+    // There are 3 <div>'s. If another is ever added, this number should be incremented.
+    if (tbs.length < 3)
+        return;
+    else
+        clearInterval(tbInterval);

-// Go therough the document and get the toolbar classes
-       for (i=0; i < tbs_len; i++) {
-               element = tbs[i];
+    initialized = true;

-// Store all the toolbar elements
-               this.tb[element.title] = element;
+    tb = {};
+    toolbars = [];
+    document.all.editor_iframe.style.visibility = 'visible';
+// Go through the outerdoc and get the toolbar classes
+       for (var i = 0; i < tbs.length; i++) {
+               var toolbar = tbs[i];

-// The toolbars are hidden till the images are loaded
-               element.TB_INDEX  = this.toolbars.length;
+               tb[toolbar.title] = toolbar;
+               toolbars[toolbars.length] = toolbar;

-// Skip deleted toolbars
-               if (this.tb_delete[element.title]) {
-                       element.className = 'toolbar_hidden';
-                       continue;
-               }
+               toolbar.TB_INDEX  = toolbars.length;

-// Initialize each toolbar
-               if (!this.tb_init (element)) {
-                       this.error ("Could not initialize toolbar:", element.title);
+// Initialize the toolbar
+        tb_init(toolbar);
                }

-// Set progmaticaly hidden toolbars to hidden
-               if (this.tb_hide[element.title]) {
-                       element.className = 'toolbar_hidden';
-               }
-
-// Keep all the toolbars for resizing and hidding
-               this.debug ("Adding toolbar", element.title);
-               this.toolbars[this.toolbars.length] = element;
-       }
-
-       this.tb_layout();
+       tb_layout();

 // If the window is resized we need to re-layout the
 // toolbar.
-       window.onresize = function () { This.tb_layout() };
-       this.toolbar_init = true;
+       toolbar_init = true;
 }
-Editor.prototype.init_toolbar = init_toolbar;
-

-function tb_init_button (element) {
-/* ---------------------------------------------------------
- * Sets op all the defaults for a button DIV. Saves any 
- * onclick and detaches the event. OnClick events are called
- * onMouseDown.
- */
-       if (element.className == "tb_general") return true;
-
-// Set events
-       element.onmouseover   = function () { This.tb_mouseover () }
-       element.onmouseout    = function () { This.tb_mouseout  () }
-       element.onmousedown   = function () { This.tb_mousedown () }
-       element.onmouseup     = function () { This.tb_mouseup   () }
-
-// Disable events
-       element.ondragstart   = function () { This.cancel_event () };
-       element.onselectstart = function () { This.cancel_event () };
-       element.onselect      = function () { This.cancel_event () };
-
-// Save onClick event for onMouseDown
-       element.YUSERONCLICK  = element.onclick;
-       element.onclick       = function () { This.cancel_event () };
-
-// Initial state is enabled
-       element.state = 'enabled';
-
-// If it is a toggle set the initial state.
-       if (element.TB_TYPE == 'toggle') element.tb_state = 'off';
-
-// So we don't re-initialize
-       element.INITIALIZED  = true;
-
-       return true;
-}
-Editor.prototype.tb_init_button = tb_init_button;
-
-function tb_init (element) {
+function tb_init (toolbar) {
 /* ---------------------------------------------------------
  * Called for each toolbar DIV. Populates the toolbar and
  * sets the width.
  */
-       element.TBWidth = 0;
-       if (! this.tb_populate (element)) return false;
-       element.style.posWidth = element.TBWidth;
+       toolbar.TBWidth = 0;
+    tb_populate(toolbar)
+       toolbar.style.posWidth = toolbar.TBWidth;
        return true;
 }
-Editor.prototype.tb_init = tb_init;
-
-function tb_show (menu) {
-/* ---------------------------------------------------------
- * Shows or hiddes a toolbar. The element passed in is the 
- * toolbar object to toggle.
- */
-       var title = menu.title;
-       if (!this.tb[title]) return;
-       if (menu.className == 'toolbar_hidden') {
-               menu.className        = 'toolbar';
-               menu.style.visibility = 'visible';
-       }
-       else {
-               menu.className        = 'toolbar_hidden';
-               menu.style.visibility = 'hidden';
-       }
-       this.tb_layout();
-       return this.cancel_event();
-}
-Editor.prototype.tb_show = tb_show;

-function tb_populate (y) {
+function tb_populate (toolbar) {
 /* ---------------------------------------------------------
- * Moves all a toolbar "y"'s icons to the proper location on
+ * Moves all of toolbar 'toolbar's icons to the proper location on
  * the screen and sets the correct size for the toolbars.
  */
-       var i, elements, element;
-
-       this.debug ("tb_populate called for", y.title);

-       elements = y.children;
+       var elements = toolbar.children;
        if (!elements) return;

 // Loop through all the toolbars children.
-       for (i=0; i < elements.length; i++) {
-               element = elements[i];
+       for (var i = 0; i < elements.length; i++) {
+               var element = elements[i];
                if (element.tagName == "SCRIPT" || element.tagName == "!") continue;

 // Switch to see what element we are workin with.
                switch (element.className) {
-
-// Menu Item then initialize it if it is not initialized.
-                       case "tb_menu_item":
-                               if (element.INITIALIZED == null) {
-                                       if (! this.tb_init_button (element)) return this.error ("Problem initializing:", element.title);
-                               }
-                               element.style.posLeft = y.TBWidth;
-                               y.TBWidth += element.offsetWidth + 1;
+                       case "tb_menu_item": // A button
+                               if (element.INITIALIZED == null)
+                    tb_init_button(element)
+                               element.style.posLeft = toolbar.TBWidth;
+                               toolbar.TBWidth += element.offsetWidth + 1;
                                break;

-// Toolbar element that is not a button
-// most likly a form field.
-                       case "tb_general":
+                       case "tb_general": // Not a button - most likely a form field
+
                        case "tb_menu_text":
-                               element.style.posLeft = y.TBWidth;
-                               y.TBWidth += element.offsetWidth + 5;
+                               element.style.posLeft = toolbar.TBWidth;
+                               toolbar.TBWidth += element.offsetWidth + 5;
                                break;

-// Seperator
-                       case "tb_sep":
-                               element.style.posLeft = y.TBWidth + 2;
-                               y.TBWidth += 5;
+                       case "tb_sep": // Seperator
+                               element.style.posLeft = toolbar.TBWidth + 2;
+                               toolbar.TBWidth += 5;
                                break;

-// Handle for the toolbar, would be cool if people 
-// could move the toolbar. Next version :)
-                       case "tb_handle":
+                       case "tb_handle": // Toolbar handle
                                element.style.posLeft = 2;
-                               y.TBWidth += element.offsetWidth + 7;
+                               toolbar.TBWidth += element.offsetWidth + 7;
                                break;

-// Should never get here unless the html is messed
-                       default:
-                               return this.error ("Invalid class:", element.className,"on Element:", element.id, "<", element.tagName, "> title: <", element.title, ">");
+                       default: // Should never get here unless the html is messed
                }
        }

-// Plus one in case the width is zero
-       y.TBWidth += 1;
-       this.debug ("Toolbar width set to", y.TBWidth);
+       toolbar.TBWidth++; // Add 1 in case the width is zero
+       return true;
+}
+
+function tb_init_button (element) {
+/* ---------------------------------------------------------
+ * Sets op all the defaults for a button DIV. Saves any 
+ * onclick and detaches the event. OnClick events are called
+ * onMouseDown.
+ */
+       if (element.className == "tb_general") return true;
+
+// Set events
+       element.onmouseover   = tb_mouseover;
+       element.onmouseout    = tb_mouseout;
+       element.onmousedown   = tb_mousedown;
+       element.onmouseup     = tb_mouseup;
+
+// Disable events
+       element.ondragstart   = cancel_event;
+       element.onselectstart = cancel_event;
+       element.onselect      = cancel_event;
+
+// Save onClick event for onMouseDown
+       element.YUSERONCLICK  = element.onclick;
+       element.onclick       = cancel_event;
+
+// So we don't re-initialize
+       element.INITIALIZED  = true;
+
        return true;
 }
-Editor.prototype.tb_populate = tb_populate;

 function tb_layout () {
 /* ---------------------------------------------------------
  * Layouts the toolbar on the screen based on the screen
  * width and the widths built in tb_populate().
  */
-       this.debug ("Layout called.");

-       var num_tb = this.toolbars.length;
+    if (!initialized)
+        toolbarInit();
+
+       var num_tb = toolbars.length;

 // No toolbars
-       if (num_tb == 0) { this.debug ("Ack, no toolbars"); return }
+       if (num_tb == 0) return;
        var i;

 // Get the screen width minus the width of the scrollbar
-       var sbar = document.body.offsetWidth - document.body.clientWidth;
-       var ScrWid = (document.body.offsetWidth  - sbar);
-       var ScrHit = (document.body.offsetHeight - sbar);
+       var sbar = outerdoc.body.offsetWidth - outerdoc.body.clientWidth;
+       var ScrWid = (outerdoc.body.offsetWidth  - sbar);
+       var ScrHit = (outerdoc.body.offsetHeight - sbar);

 // Go through the toolbars and find the width of the widest
 // one.
@@ -977,8 +459,7 @@
        var tb = [];
        var e = 0;
        for (i = 0; i < num_tb; i++) {
-               if (this.toolbars[i].className == 'toolbar_hidden') continue;
-               tb[e] = this.toolbars[i];
+               tb[e] = toolbars[i];
                if (tb[e].TBWidth > TotalLen) TotalLen = tb[e].TBWidth;
                e++;
        }
@@ -1022,169 +503,147 @@
                Start    += CurrWid;

        }
-       DHTMLSafe.style.posTop     = (rows * 25);
-       DHTMLSafe.style.posHeight  = ScrHit - (rows * 25) - 5;
-       DHTMLSafe.style.posWidth   = ScrWid - 5;
-       DHTMLSafe.style.visibility = 'visible';
+       outerdoc.all.editor_iframe.style.posTop     = rows * 25;
+       outerdoc.all.editor_iframe.style.posHeight  = ScrHit - (rows * 25);
+       outerdoc.all.editor_iframe.style.posWidth   = ScrWid;
+       outerdoc.all.editor_iframe.style.visibility = 'visible';

 // Set the total width
        TB.style.width = TotalLen - LastStart;

 // Move the rest of the toolbars down
-       i--;
-       TB = tb[i];
+       TB = tb[--i];
        var TBInd = TB.sourceIndex;
        var A = TB.document.all;
        for (var i in A) {
                var item = A.item(i);
-               if (! item)                    continue;
-               if (! item.style)              continue;
-               if (item.sourceIndex <= TBInd) continue;
-               if (! this.tb[item.title])     continue;
-               if (item.className == 'toolbar_hidden')  continue;
+               if (item && item.style && item.sourceIndex > TBInd && tb[item.title])
                item.style.posTop = RelTop;
        }
 }
-Editor.prototype.tb_layout = tb_layout;

 function tb_mouseover () {
 /* ---------------------------------------------------------
  * OnMouseOver event handler function for toolbar buttons.
  */
  // Source must be an image
-       if (event.srcElement.tagName != "IMG")  return this.cancel_event();
+    var event = document.frames.editor_iframe.event;
+       if (event.srcElement.tagName != "IMG") return cancel_event(event);
        var image   = event.srcElement;
        var element = image.parentElement;

 // If we are in text mode and the button is disables for
 // text mode. cancel the mouseover.
-       if (element.state == 'disabled') return this.cancel_event();
+       if (element.disabled) return cancel_event(event);

 // If the image in normal state put it in mouseover state
        if (image.className == "tb_icon") {
                element.className = "menu_item_mouseoverup";
        }
-
 // else if it is in down state put it in mouseover
 // for down states.
        else if (image.className == "icon_down") {
                element.className = "menu_item_mouseoverdown";
        }

-       return this.cancel_event();
+       return cancel_event(event);
 }
-Editor.prototype.tb_mouseover = tb_mouseover;

 function tb_mouseout () {
 /* ---------------------------------------------------------
  * MouseOut event handler function for toolbar buttons
  */
  // The source tag must be an image.
-//     this.debug ("MouseOut event caught for", event.srcElement.title);
-       if (event.srcElement.tagName != "IMG") {
-//             this.debug ("Source is not an image");
-               return this.cancel_event();
-       }
+    var event = document.frames.editor_iframe.event;
+       if (event.srcElement.tagName != "IMG") return cancel_event(event);
        var image   = event.srcElement;
        var element = image.parentElement;

-// IF we are in "text mode" disable mouseout and return
-       if (element.state == 'disabled') {
-//             this.debug ("Source is disabled");
-               return this.cancel_event();
-       }
+       if (element.disabled) return cancel_event(event);

 // If the button is a toggle update it's state.
-       if (element.TB_TYPE == 'toggle' && element.tb_state != 'off') {
+    if (element.isPressed) {
                element.className = "menu_item_mouseoverdown"
                image.className   = 'icon_down';
        }
-
 // else put the image back to it's normal state.
        else {
                element.className  = "tb_menu_item";
                image.className    = "tb_icon";
        }

-       return this.cancel_event();
+    return cancel_event(event);
 }
-Editor.prototype.tb_mouseout = tb_mouseout;

 function tb_mousedown () {
 /* ---------------------------------------------------------
  * MouseDown event handler for toolbar buttons.
  */

-       this.debug ("MouseDown event caught for", event.srcElement.title);
  // The source tag must be an image.
-       if (event.srcElement.tagName != "IMG") { 
-               this.debug ("Source was not an image"); 
-               return this.cancel_event();
-       }
-       var image   = event.srcElement;
+    var evnt = document.frames.editor_iframe.event;
+       if (evnt.srcElement.tagName != "IMG") return cancel_event(evnt);
+       var image   = evnt.srcElement;
        var element = image.parentElement;

 // If we are in "text mode" and the button is not supported in
 // "text mode" cancel the event and return false.
-       if (element.state == 'disabled') { 
-               this.debug (element.title, "disabled"); 
-               return this.cancel_event();
-       }
-
-// If the button is a toggle update it's state.
-
-       if (element.TB_TYPE == 'toggle') {
-               this.debug (element.title, "is toggle. Updating toggle");
-               this.update_toggle (element, image);
-       }
-       else {
+       if (element.disabled) return cancel_event(evnt);

-// Else set the button to the mosedown state.
+    if (element.isPressed != null && !element.isPressed)
+        press(element, image);
                element.className = "menu_item_mouseoverdown";
                image.className   = "icon_down";
-       }

 // We disabled the click function and saved it in this.
 // Eval it here and run it.
-       this.debug ("Calling code", element.YUSERONCLICK);
+
        if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
-       return this.cancel_event();
+       return cancel_event(evnt);
 }
-Editor.prototype.tb_mousedown = tb_mousedown;

 function tb_mouseup () {
 /* ---------------------------------------------------------
  * MouseUp event handler function for toolbar buttons.
  */
  // The source element must be an image type.
-//     this.debug ("Caught mouseup event for", event.srcElement.title);
-       if (event.srcElement.tagName != "IMG") {
-//             this.debug ("Source is not an image");
-               return this.cancel_event();
-       }
+    var event = document.frames.editor_iframe.event;
+       if (event.srcElement.tagName != "IMG") return cancel_event(event);
        var image   = event.srcElement;
        var element = image.parentElement;

 // If we are in "text mode" and the field is disabled in that
 // mode return and cancel the event.
-       if (element.state == 'disabled') {
-//             this.debug ("State is disabled");
-               return this.cancel_event();
-       }
+       if (element.disabled) return cancel_event(event);

 // It the icons to the mouseUp state.
        element.className = "menu_item_mouseoverup";
        image.className   = "tb_icon";

 // Refocus the compose window here.
-       DHTMLSafe.focus();
+       iframe.focus();

-       return this.cancel_event();
+       return cancel_event(event);

 }
-Editor.prototype.tb_mouseup = tb_mouseup;
+
+function cancel_event (evnt) {
+/* ---------------------------------------------------------
+ * General function to cancel an event.
+ */
+    if (!evnt) evnt = event;
+    if (!evnt) return false;
+    evnt.returnValue  = false;
+    evnt.cancelBubble = true;
+    if (event) {
+        event.returnValue  = false;
+        event.cancelBubble = true;
+    }
+    return false;
+}

 /* Help VIM out
 vim:ts=4:shiftwidth=4:syntax=javascript
 */
+

Index: common/editor_about.html
===================================================================
RCS file: common/editor_about.html
diff -N common/editor_about.html
--- common/editor_about.html    16 Dec 2001 21:30:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-<html>
-<head><title>About</title>
-<style><%include editor_dialog.css%></style>
-<body>
-<p align=center><font face="Verdana" size="3"><b>IE 5 HTML Editor</b><br>
-Author: Scott Beck<br>&lt;<a href="mailto:sbeck@gossamer-threads.com">sbeck@gossamer-threads.com</a>&gt;</font></p>
-
-<blockquote>
-<p><font face="Verdana" size="2">
-Copyright (c) 2000 Gossamer Threads Inc. Redistribution of the code
-without express written consent is forbidden. To receive the right
-to license this code for use on your site, the original code must be
-copied from gossamer-threads.com. License is granted if and only if
-all copyright notices remain unaltered, and you link from the page on 
-which the code is used to Gossamer Threads at <a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a>.
-</font></p></blockquote>
-</body>
-</html>
Index: common/editor_color.html
===================================================================
RCS file: common/editor_color.html
diff -N common/editor_color.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ common/editor_color.html    10 Jan 2002 08:58:52 -0000      1.1
@@ -0,0 +1,91 @@
+<html>
+<head><title>Select Colour</title>
+  <style>
+    <%include editor_dialog.css%>
+  </style>
+<script language=JScript>
+
+var R, G, B, hexColor;
+
+function setColor() {
+    var x = window.event.offsetX; // 0 - 84
+    var y = window.event.offsetY; // 0 - 199
+
+    var hexColor = getColor(x, y);
+
+    document.all.colortest.style.backgroundColor = hexColor;
+    document.all.OK.style.color = hexColor;
+}
+
+// Returns the hex color clicked on, based on the x and y coordinates.
+function getColor(x, y) {
+    calcRGB(x, y); // After this, R, G, and B contain values from 0 - 1.
+
+    var rgb = 65536 * Math.round(255 * R) + 256 * Math.round(255 * G) + Math.round(255 * B);
+
+    hexColor = rgb.toString(16);
+    if (hexColor.length < 6) hexColor = "000000".substring(0, 6 - hexColor.length) + hexColor;
+
+    return hexColor;
+    //iframe.document.execCommand("ForeColor", false, hexColor);
+}
+
+function calcRGB (x, y) {
+    if (y < 8) {
+        R = G = B = x / 84;
+        return;
+    }
+    y -= 8;
+    var r, g, b;
+    if (y == 0)                  { g = 1; r = b = 0; }
+    else if (y > 0 && y < 32)    { g = 1; b = 0; r = (y - 0) / 32; }
+    else if (y == 32)            { r = g = 1; b = 0; }
+    else if (y > 32 && y < 64)   { r = 1; b = 0; g = (64 - y) / 32; }
+    else if (y == 64)            { r = 1; g = b = 0; }
+    else if (y > 64 && y < 96)   { r = 1; g = 0; b = (y - 64) / 32; }
+    else if (y == 96)            { r = b = 1; g = 0; }
+    else if (y > 96 && y < 128)  { b = 1; g = 0; r = (128 - y) / 32; }
+    else if (y == 128)           { b = 1; r = g = 0; }
+    else if (y > 128 && y < 160) { b = 1; r = 0; g = (y - 128) / 32; }
+    else if (y == 160)           { g = b = 1; r = 0; }
+    else if (y > 160 && y < 192) { g = 1; r = 0; b = (192 - y) / 32; }
+    // r, g, and b are now all ratios from 0 to 1. (ultimately, 0 = 0, 1 = 255)
+    intensity(r, g, b, x / 84);
+}
+
+// Sets R, G, and B to the new values.
+function intensity (r, g, b, i) {
+    if (i == 0) {
+        R = G = B = 0;
+    }
+    else if (i == 1) {
+        R = G = B = 1;
+    }
+    else if (i < 0.5) {
+        i *= 2; // Now 0.0000... - 0.9999...
+        R = r * i;
+        G = g * i;
+        B = b * i;
+    }
+    else if (i > 0.5) {
+        i = (i - 0.5) * 2; // Now 0.0000... - 0.9999...
+        R = r + (1 - r) * i;
+        G = g + (1 - g) * i;
+        B = b + (1 - b) * i;
+    }
+    return;
+}
+
+</script>
+</head>
+<body>
+<center><font size=2>Select colour</font></center>
+<hr>
+<div align=center>
+  <img src="<%image_url%>/colorchart.jpg" width="85" height="200" style="cursor: crosshair" onClick="setColor()"><br><br>
+  <img src="<%image_url%>/clear_shim.gif" width="85" height="20" id="colortest"><br><br>
+  <button class=button id="OK" onclick="window.returnValue = hexColor; window.close()">OK</button><br>
+  <button class=button onclick="window.close();">Cancel</button>
+</div>
+</body>
+</html>
Index: common/editor_constants.js
===================================================================
RCS file: common/editor_constants.js
diff -N common/editor_constants.js
--- common/editor_constants.js  16 Dec 2001 21:30:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,97 +0,0 @@
-/* 
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor_constants.js,v 1.1 2001/12/16 21:30:23 jagerman Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: DHTML Editing Component Constants for JavaScript
- * Constants (c) Microsoft Corporation.
- */
-
-//
-// Command IDs
-//
-DECMD_BOLD =                      5000
-DECMD_COPY =                      5002
-DECMD_CUT =                       5003
-DECMD_DELETE =                    5004
-DECMD_DELETECELLS =               5005
-DECMD_DELETECOLS =                5006
-DECMD_DELETEROWS =                5007
-DECMD_FINDTEXT =                  5008
-DECMD_FONT =                      5009
-DECMD_GETBACKCOLOR =              5010
-DECMD_GETBLOCKFMT =               5011
-DECMD_GETBLOCKFMTNAMES =          5012
-DECMD_GETFONTNAME =               5013
-DECMD_GETFONTSIZE =               5014
-DECMD_GETFORECOLOR =              5015
-DECMD_HYPERLINK =                 5016
-DECMD_IMAGE =                     5017
-DECMD_INDENT =                    5018
-DECMD_INSERTCELL =                5019
-DECMD_INSERTCOL =                 5020
-DECMD_INSERTROW =                 5021
-DECMD_INSERTTABLE =               5022
-DECMD_ITALIC =                    5023
-DECMD_JUSTIFYCENTER =             5024
-DECMD_JUSTIFYLEFT =               5025
-DECMD_JUSTIFYRIGHT =              5026
-DECMD_LOCK_ELEMENT =              5027
-DECMD_MAKE_ABSOLUTE =             5028
-DECMD_MERGECELLS =                5029
-DECMD_ORDERLIST =                 5030
-DECMD_OUTDENT =                   5031
-DECMD_PASTE =                     5032
-DECMD_REDO =                      5033
-DECMD_REMOVEFORMAT =              5034
-DECMD_SELECTALL =                 5035
-DECMD_SEND_BACKWARD =             5036
-DECMD_BRING_FORWARD =             5037
-DECMD_SEND_BELOW_TEXT =           5038
-DECMD_BRING_ABOVE_TEXT =          5039
-DECMD_SEND_TO_BACK =              5040
-DECMD_BRING_TO_FRONT =            5041
-DECMD_SETBACKCOLOR =              5042
-DECMD_SETBLOCKFMT =               5043
-DECMD_SETFONTNAME =               5044
-DECMD_SETFONTSIZE =               5045
-DECMD_SETFORECOLOR =              5046
-DECMD_SPLITCELL =                 5047
-DECMD_UNDERLINE =                 5048
-DECMD_UNDO =                      5049
-DECMD_UNLINK =                    5050
-DECMD_UNORDERLIST =               5051
-DECMD_PROPERTIES =                5052
-
-//
-// Enums
-//
-
-// OLECMDEXECOPT  
-OLECMDEXECOPT_DODEFAULT =         0 
-OLECMDEXECOPT_PROMPTUSER =        1
-OLECMDEXECOPT_DONTPROMPTUSER =    2
-
-// DHTMLEDITCMDF
-DECMDF_NOTSUPPORTED =             0 
-DECMDF_DISABLED =                 1 
-DECMDF_ENABLED =                  3
-DECMDF_LATCHED =                  7
-DECMDF_NINCHED =                  11
-
-// DHTMLEDITAPPEARANCE
-DEAPPEARANCE_FLAT =               0
-DEAPPEARANCE_3D =                 1 
-
-// OLE_TRISTATE
-OLE_TRISTATE_UNCHECKED =          0
-OLE_TRISTATE_CHECKED =            1
-OLE_TRISTATE_GRAY =               2
-
Index: common/editor_dialog.css
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/common/editor_dialog.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -r1.1 -r1.2
--- common/editor_dialog.css    16 Dec 2001 21:30:23 -0000      1.1
+++ common/editor_dialog.css    10 Jan 2002 08:58:52 -0000      1.2
@@ -3,7 +3,7 @@
  *
  *     dialog
  *     Author  : Scott Beck
- *     $Id: editor_dialog.css,v 1.1 2001/12/16 21:30:23 jagerman Exp $
+ *     $Id: editor_dialog.css,v 1.2 2002/01/10 08:58:52 jagerman Exp $
  *
  * Copyright (c) 2000 Gossamer Threads Inc.  All Rights Reserved.
  * ==================================================================
@@ -23,6 +23,16 @@
        font-size        : 8pt;
 }

+.sample {
+        font-family      : "MS Sans Serif";
+        border-left      : buttonshadow solid 1px;
+        border-bottom    : buttonhighlight solid 1px;
+        border-right     : buttonhighlight solid 1px;
+        border-top       : buttonshadow solid 1px;
+        overflow         : hidden;
+        background-color : buttonface;
+}
+
 .button {
        font-family      : "MS Sans Serif";
        background-color : buttonface;
@@ -30,7 +40,7 @@
        width            : 80px;
 }

-.select_list {
+select {
        font-family      : "MS Sans Serif";
        font-size        : 8pt;
        background-color : window;
@@ -38,55 +48,14 @@
        border-left      : buttonshadow solid 2px;
        border-right     : buttonhighlight solid 2px;
        border-top       : buttonshadow solid 2px;
-       width            : 350px;
-       height           : 153px;
        overflow         : hidden;
        cursor           : default;
 }

-.select_list_inner {
+.textbox {
        font-family      : "MS Sans Serif";
        font-size        : 8pt;
        background-color : window;
-       border-bottom    : buttonhighlight solid 2px; 
-       border-left      : buttonshadow solid 2px; 
-       border-right     : buttonhighlight solid 2px; 
-       border-top       : buttonshadow solid 2px;
-       width            : 361px;
-       height           : 153px;
-       overflow         : scroll;
        cursor           : default;
 }

-.select_title {
-       font-family      : "MS Sans Serif";
-       font-size        : 8pt;
-       background-color : buttonface;
-       border-bottom    : buttonshadow solid 1px; 
-       border-top       : buttonhighlight solid 1px;
-       border-left      : buttonhighlight solid 1px; 
-       border-right     : buttonshadow solid 1px; 
-       padding          : 2px;
-       margin           : 0px;
-       cursor           : default;
-}
-
-.select_option {
-       font-family      : "Fixedsys";
-       font-size        : 8px;
-       cursor           : default;
-}
-
-.select_title_outer {
-       font-family      : "MS Sans Serif";
-       font-size        : 8pt;
-       cursor           : default;
-}
-
-.select_option_selected {
-       font-family      : "Fixedsys";
-       font-size        : 8px;
-       background-Color : highlight;
-       color            : white;
-       cursor           : default;
-}
Index: common/editor_edit.js
===================================================================
RCS file: common/editor_edit.js
diff -N common/editor_edit.js
--- common/editor_edit.js       16 Dec 2001 21:30:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,121 +0,0 @@
-/*  
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor_edit.js,v 1.1 2001/12/16 21:30:23 jagerman Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Editing and format functions.
- */
-
-/***********************************************************/
-/***********************************************************/
-/************ HTML Insertion Functions          ************/
-/***********************************************************/
-/***********************************************************/
-
-function insert_html (start, stop) {
-/* ---------------------------------------------------------
- * If called with "start" and "stop" gets the text that
- * is selected in the edit field and pastes "start" on the
- * left of it an "stop" on the right of it. 
- * Like: <textarea> and </textarea>
- * If called is only "start" replaces the selected text with
- * "start".
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-       var selection = DHTMLSafe.DOM.selection.createRange();
-       if (!start) return;
-       if (selection.htmlText == null) {
-               this.debug ("Can't insert html (", start, stop, "). Selection is null");
-               DHTMLSafe.focus();
-               return;
-       }
-       var html = '';
-       if (stop) {
-               this.debug ("Inserting html (", start, stop, ") around (", selection.text, ")");
-               html = start + selection.text + stop;
-       }
-       else {
-               this.debug ("Inserting html (", html, ")");
-               html = start;
-       }
-       if (this.text_mode) html = escape_html (html);
-       selection.pasteHTML (html);
-       DHTMLSafe.focus();
-}
-Editor.prototype.insert_html = insert_html;
-
-function insert_image () {
-/* ---------------------------------------------------------
- * Calles a pop-up diaglog "IMAGE_URL" to prompt the user to
- * select a URL to an image. After that inserts the image 
- * into the document by calling insert_html.
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-       if (DHTMLSafe.DOM.selection.type == 'Control') {
-               this.debug ("Type of selection is Control. Deselection");
-               DHTMLSafe.DOM.selection.empty();
-       }
-       this.debug ("Bringging up dialogue for URL: (", this.image_url, ")");
-    var src = showModalDialog( this.image_url, this, "dialogHeight:170px;dialogWidth:435px" );
-    if ( src ) this.insert_html( '<img src="' + src + '">' );
-}
-Editor.prototype.insert_image = insert_image;
-
-function insert_hr () {
-/* ---------------------------------------------------------
- * Inserts the html needed for an hr
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('hr')%>
-    this.insert_html( '<%escape_js hr%><br>' )
-}
-Editor.prototype.insert_hr = insert_hr;
-
-function insert_quote () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a quote
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('quote', '/quote')%>
-    var start = '<%escape_js quote%><br>';
-    var end   = '<%escape_js /quote%>';
-    this.insert_html( start, end );
-}
-Editor.prototype.insert_quote = insert_quote;
-
-function insert_reply () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a reply
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('reply', '/reply')%>
-    var start = '<%escape_js reply%><br>';
-    var end   = '<%escape_js /reply%>';
-    this.insert_html( start, end );
-}
-Editor.prototype.insert_reply = insert_reply;
-
-function insert_code () {
-/* ---------------------------------------------------------
- * Inserts the html needed for a code
- */
-       if (DHTMLSafe.Busy) return this.cancel_event();
-    <%GForum::Markup::get_tags('code', '/code')%>
-    var start = '<%escape_js code%><br>';
-    var end   = '<%escape_js /code%>';
-    this.insert_html( start, end );
-}
-Editor.prototype.insert_code = insert_code;
-
-
-/* Help VIM out
-vim:ts=4:shiftwidth=4:syntax=javascript
-*/
-
Index: common/editor_editor.html
===================================================================
RCS file: common/editor_editor.html
diff -N common/editor_editor.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ common/editor_editor.html   14 Mar 2002 23:07:32 -0000      1.2
@@ -0,0 +1,24 @@
+<%--
+
+editor_editor.html
+
+This file is used as the actual part where you write the
+post or message. This file should contain ONLY up and
+including the <body> tag of the page. The </body></html>
+will be added automatically. Take care when changing the
+body tag - it must have contenteditable="true" and id="post"
+or you will BREAK THE ADVANCED EDITOR.
+
+--%>
+<html>
+<head>
+<style>
+body {
+    background-color      : <%advanced_editor_background%>;
+    font-family           : "<%advanced_editor_font%>";
+    font-size             : "x-small"; <%-- font sizes 1-7: xx-small,x-small,small,medium,large,x-large,xx-large --%>
+}
+</style>
+<%include include_css.html%>
+</head>
+<body contenteditable="true" id="post">
Index: common/editor_events.js
===================================================================
RCS file: common/editor_events.js
diff -N common/editor_events.js
--- common/editor_events.js     16 Dec 2001 21:30:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,143 +0,0 @@
-/* 
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor_events.js,v 1.1 2001/12/16 21:30:23 jagerman Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Event handlers for DHTMLSafe.
- */
-
-
-
-/***********************************************************/
-/***********************************************************/
-/************ Event handlers for DHTMLSafe      ************/
-/***********************************************************/
-/***********************************************************/
-
-function DocumentComplete () {
-/* ---------------------------------------------------------
- * Initializes the content of the edit window when the
- * edit window is finished loading the first time.
- */
-       if (this.editor_init) return true;
-       this.editor_init = true;
-       this.debug ("Initializing DHTMLSafe and setting content");
-       if ( this.editor_content ) DHTMLSafe.DocumentHTML = this.editor_content;
-}
-Editor.prototype.DocumentComplete = DocumentComplete;
-
-function onkeydown () {
-/* ---------------------------------------------------------
- * Function called onKeyPress for the Edit object. Used to 
- * disable certain short cuts during "text mode". Also used 
- * to enable CTRL-D to bring op the Font dialog. 
- */
-
- // What a strang place to stick an event object
-       var evnt = DHTMLSafe.DOM.parentWindow.event;
-       if (evnt.ctrlKey) {
-
-               switch (evnt.keyCode) {
-                       case 90: // ctrl-z   undo 
-                       case 89: // ctrl-y   redo 
-                       case 67: // ctrl-c   copy 
-                       case 37: // ctrl-left     
-                       case 39: // ctrl-right    
-                               return true;
-            case 68:
-                exec (DECMD_FONT, OLECMDEXECOPT_PROMPTUSER);
-                return this.cancel_event (evnt);
-                       default:
-                               break;
-               }
-       }
-       return true;
-}
-Editor.prototype.onkeydown = onkeydown;
-
-function DisplayChanged () {
-/* ---------------------------------------------------------
- * Time critical event handler. Called every time anything
- * changes on the Edit object field. Used to update the 
- * "toggle" menu items and disabled items for "text mode".
- */
-// No debugging in here. This event is ran every second or so.
-
- // Loop through all the toolbars
-       var tb_len = this.toolbars.length
-       for (var i = 0; i < tb_len; i++) {
-               if (this.toolbars[i].className == 'toolbar_hidden') continue;
-
-// Get the toolbars children and loop through them.
-               var elements = this.toolbars[i].children;
-               if (!elements) continue;
-               var ele_len = elements.length;
-               for (var e = 0; e < ele_len; e++) {
-                       var current = elements[e];
-                       var image = current.children (0);
-                       if (!current || !image) continue;
-
-                       if (current.enabled) {
-                               var ret = 0;
-                               eval ("ret = " + current.enabled);
-                               if (ret == DECMDF_DISABLED || ret == DECMDF_NOTSUPPORTED) {
-                                       current.style.filter = "alpha(opacity=25)";
-                                       current.state        = 'disabled';
-                                       if (current.id == 'fmt_select') current.disabled = true;
-
-                                       // Disabled, no need to toggle check.
-                                       continue;
-                               }
-                               else {
-                                       current.style.filter = "";
-                                       current.state        = 'enabled';
-                                       if (current.id == 'fmt_select') {
-                                               current.disabled = false;
-                                       }
-                               }
-                       }
-                       else {
-                               current.state = 'enabled';
-                               current.style.filter = "";
-                               current.className = "tb_menu_item";
-                               image.className   = "tb_icon";
-                               continue;
-                       }
-
-
-// Not a toggle button, make sure the button is in the mouse
-// out position.
-                       if (current.TB_TYPE != 'toggle') continue;
-
-// Eval the string
-                       eval("var code = " + current.enabled);
-
-// If we are in that edit mode turn the button on
-                       if (code == DECMDF_LATCHED) {
-                               current.tb_state  = 'on';
-                               current.className = "menu_item_mouseoverdown";
-                               image.className   = "icon_down";
-                       }
-
-// else turn the button off
-                       else {
-                               current.tb_state  = 'off';
-                               current.className = "tb_menu_item";
-                               image.className   = "tb_icon";
-                       }
-               }
-       }
-       return true;
-}
-Editor.prototype.DisplayChanged = DisplayChanged;
-
-/* Help VIM out
-vim:ts=4:shiftwidth=4:syntax=javascript
-*/
Index: common/editor_font.html
===================================================================
RCS file: common/editor_font.html
diff -N common/editor_font.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ common/editor_font.html     1 May 2002 22:01:39 -0000       1.5
@@ -0,0 +1,234 @@
+<html>
+<head><title>Select Font</title>
+<style>
+<%include editor_dialog.css%>
+</style>
+<script language=JScript>
+<!--
+returnValue = [];
+
+var font, size, color, b, i, u, input;
+
+function initDialog () {
+
+    input = window.dialogArguments;
+    // input is: [font, size, color, b, i, u]
+
+    populateFont();
+
+    if (input[1]) { // Size
+        sizeList.selectedIndex = input[1] - 1;
+        sizeList.fireEvent("onchange");
+    }
+
+    if (input[2]) { // Color. This is actually something very strange - instead of RGB, it's BGR ???
+        var hexColor = input[2].toString(16);
+        if (hexColor.length < 6) hexColor = "000000".substring(0, 6 - hexColor.length) + hexColor;
+        hexColor = hexColor.substring(4, 6) + hexColor.substring(2, 4) + hexColor.substring(0, 2);
+        colorList.selectedIndex = 16;
+        setColor(hexColor);
+    }
+
+    if (input[3] != null || input[4] != null) {
+        if (input[3] && input[4])
+            styleList.selectedIndex = 3;
+        else if (input[3])
+            styleList.selectedIndex = 1;
+        else if (input[4])
+            styleList.selectedIndex = 2;
+        else
+            styleList.selectedIndex = 0;
+
+        styleList.fireEvent("onchange");
+    }
+
+    if (input[5] != null && underlineBox.checked != input[5]) {
+        underlineBox.click();
+    }
+
+}
+
+function addFont (select, fontName) {
+    var option = document.createElement("OPTION");
+    select.options.add(option);
+    option.innerText = fontName;
+    option.value = fontName;
+    if (input[0] && input[0] == fontName) {
+        select.selectedIndex = select.options.length - 1;
+        select.fireEvent("onchange");
+    }
+}
+
+function populateFont() {
+<%if ie_version >= 6%>
+    var fonts = [];
+    for (var i = 1; i <= dlg.fonts.count; i++) fonts[i - 1] = dlg.fonts(i);
+    fonts.sort();
+    for (var i = 0; i < fonts.length; i++) addFont(fontList, fonts[i]);
+<%else%>
+    addFont(fontList, 'Arial');
+    addFont(fontList, 'Arial Black');
+    addFont(fontList, 'Arial Narrow');
+    addFont(fontList, 'Century Gothic');
+    addFont(fontList, 'Comic Sans MS');
+    addFont(fontList, 'Courier');
+    addFont(fontList, 'Courier New');
+    addFont(fontList, 'Fixedsys');
+    addFont(fontList, 'Garamond');
+    addFont(fontList, 'Georgia');
+    addFont(fontList, 'Lucida Console');
+    addFont(fontList, 'MS Sans Serif');
+    addFont(fontList, 'MS Serif');
+    addFont(fontList, 'System');
+    addFont(fontList, 'Tahoma');
+    addFont(fontList, 'Times New Roman');
+    addFont(fontList, 'Verdana');
+    addFont(fontList, 'Webdings');
+    addFont(fontList, 'Wingdings');
+    addFont(fontList, 'Wingdings 2');
+    addFont(fontList, 'Wingdings 3');
+<%endif%>
+}
+
+function setFont() {
+    font = event.srcElement.value;
+    fontBox.innerText = font;
+    sample.style.fontFamily = font;
+}
+
+var cssSizeConv = [null, '8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'];
+
+function setSize() {
+    var opt = sizeList.options[sizeList.selectedIndex];
+    size = opt.value; // 1 - 7, use on cssSizeConv
+    sample.style.fontSize = cssSizeConv[size];
+    sizeBox.innerText = opt.innerText;
+}
+
+function setStyle() {
+    var opt = styleList.options[styleList.selectedIndex];
+    styleBox.innerText = opt.innerText;
+    if (opt.value == 'r') {
+        b = false;
+        i = false;
+        sample.style.fontWeight = "normal";
+        sample.style.fontStyle = "normal";
+    }
+    else if (opt.value == 'b') {
+        b = true;
+        i = false;
+        sample.style.fontWeight = "bold";
+        sample.style.fontStyle = "normal";
+    }
+    else if (opt.value == 'i') {
+        b = false;
+        i = true;
+        sample.style.fontWeight = "normal";
+        sample.style.fontStyle = "italic";
+    }
+    else if (opt.value == 'bi') {
+        b = true;
+        i = true;
+        sample.style.fontWeight = "bold";
+        sample.style.fontStyle = "italic";
+    }
+}
+
+function setUnderline(val) { // val should be true or false
+    u = val;
+    sample.style.textDecorationUnderline = val;
+}
+
+function setReturn () {
+    returnValue = [font, size, color, b, i, u];
+}
+
+function setColor (clr) {
+    if (clr) {
+        color = clr;
+        sample.style.color = clr;
+    }
+    else {
+        color = null;
+        sample.style.color = 'black';
+    }
+}
+
+// Bug? The '/' on the following line shouldn't be needed (and isn't needed from the main page). Why is it needed here???
+var url = window.location.protocol + '//' + window.location.hostname + '/' + window.location.pathname + '?<%hidden_query%>';
+function colorDialog () {
+<%if ie_version >= 6%>
+    var hexColor = dlg.ChooseColorDlg().toString(16);
+    if (hexColor.length < 6) hexColor = "000000".substring(0, 6 - hexColor.length) + hexColor;
+<%else%>
+    var hexColor = showModalDialog(url + ';do=editor_color', null, "dialogHeight: 380px; dialogWidth: 115px; scroll: no; help: no; status: no");
+<%endif%>
+
+    setColor(hexColor);
+}
+
+-->
+</script>
+</head>
+<body onLoad="initDialog()">
+<%if ie_version >= 6%><object id="dlg" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object><%endif%>
+  
+  <div style="position: absolute; top: 7px; left: 10px">Font:</div>
+  <input type="text" class="textbox" id="fontBox" style="font-size: 8pt; font-family: MS Sans Serif; height: 22px; width: 160px; position: absolute; top: 27px; left: 10px">
+  <select id="fontList" size="7" style="width: 162px; position: absolute; top: 49px; left: 9px" onchange="setFont()"></select>
+
+  <div style="border-style: groove; border-width: 2px; position: absolute; top: 190px; left: 10px; height: 100px; width: 160px"><div style="position: relative; top: -9px; left: 5px; width: 0px; background-color: buttonface">&nbsp;Effects&nbsp;</div></div>
+  <input type="checkbox" id="underlineBox" style="position: absolute; top: 207px; left: 25px" onclick="setUnderline(this.checked)">
+  <div type="text" style="font-family: 'MS Sans Serif'; font-size: 8pt; border-width: 0px; position: absolute; top: 209px; left: 48px; width: 60px" onclick="underlineBox.click()">Underline</div>
+
+  <div style="position: absolute; top: 233px; left: 25px">Color:</div>
+  <select id="colorList" size="1" style="font-face: 8pt; width: 80; position: absolute; top: 253px; left: 25px" onchange="setColor(this.value)">
+    <option value="black">Black</option>
+    <option value="#808080">Gray</option>
+    <option value="silver">Silver</option>
+    <option value="white">White</option>
+    <option value="#00FF00">Lime</option>
+    <option value="green">Green</option>
+    <option value="yellow">Yellow</option>
+    <option value="#808000">Olive</option>
+    <option value="red">Red</option>
+    <option value="#800000">Maroon</option>
+    <option value="#FF00FF">Fuchsia</option>
+    <option value="purple">Purple</option>
+    <option value="#00FFFF">Aqua</option>
+    <option value="#008080">Teal</option>
+    <option value="#000080">Navy</option>
+    <option value="blue">Blue</option>
+    <option value="">Custom</option>
+  </select>
+  <button style="position: absolute; top: 250px; left: 115px; font-family: 'MS Sans Serif'; font-size: 8pt; height: 25px; width: 25px" onclick="colorList.selectedIndex = colorList.options.length - 1; colorDialog()"><img src="<%image_url%>/toolbar/font_color.gif" width="23" height="23"></button>
+  
+  <div style="position: absolute; top: 7px; left: 180px">Style:</div>
+  <input type="text" class="textbox" id="styleBox" style="font-size: 8pt; height: 22px; width: 77px; position: absolute; top: 27px; left: 185px" readonly>
+  <select id="styleList" size="7" style="width: 79px; position: absolute; top: 49px; left: 184px" onchange="setStyle()">
+    <option value="r">Regular</option>
+    <option value="b">Bold</option>
+    <option value="i">Italic</option>
+    <option value="bi">Bold Italic</option>
+  </select>
+  
+  <div style="position: absolute; top: 7px; left: 277px">Size:</div>
+  <input type="text" class="textbox" id="sizeBox" style="font-size: 8pt; height: 22px; width: 60px; position: absolute; top: 27px; left: 277px" readonly>
+  <select id="sizeList" size="7" style="width: 62px; position: absolute; top: 49px; left: 276px" onchange="setSize()">
+    <option value="1">8</option>
+    <option value="2">10</option>
+    <option value="3">12</option>
+    <option value="4">14</option>
+    <option value="5">18</option>
+    <option value="6">24</option>
+    <option value="7">36</option>
+  </select>
+
+  <div style="border-style: groove; border-width: 2px; position: absolute; top: 190px; left: 185px; height: 100px; width: 153px"><div style="position: relative; top: -9px; left: 5px; width: 0px; background-color: buttonface">&nbsp;Sample&nbsp;</div></div>
+  <table width="131" height="70" style="position: absolute; top: 207px; left: 195px" cellpadding=0 cellspacing=0><tr><td valign="middle" align="center" id="sample" class="sample"><span style="overflow: hidden; width: 131px">AaBbYyZz</span></td></tr></table>
+
+  <button class="button" onclick="setReturn(); window.close()" style="position: absolute; top: 26px; left: 345px">OK</button>
+  <button class="button" onclick="window.close()" style="position: absolute; top: 54px; left: 345px">Cancel</button>
+
+</body>
+</html>
Index: common/editor_iframe.html
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/common/editor_iframe.html,v
retrieving revision 1.7
retrieving revision 1.10
diff -b -u -r1.7 -r1.10
--- common/editor_iframe.html   18 Dec 2001 21:42:59 -0000      1.7
+++ common/editor_iframe.html   11 Jan 2002 23:18:19 -0000      1.10
@@ -1,150 +1,104 @@
 <html>
-<head><title>HTML Editor</title>
+<head>

-<!-- Public editor interface -->
-<script language="JScript" src="gforum.cgi?do=editor_js"></script>
+<%include include_css.html%>

-<!-- Style sheet for toolbar -->
-<link rel="stylesheet" type="text/css" href="gforum.cgi?do=editor_css">
+<style type="text/css" media="screen">
+<!--
+<%include editor_style.css%>
+-->
+</style>

 </head>
-<body bgcolor="<%editor_base_color%>" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" rightmargin="0" onLoad="parent.load_html()">

-<div class="toolbar" id="File" title="File" onselectstart="return This.cancel_event ();">
+<body leftmargin="0" topmargin="0" bgcolor="<%editor_base_color%>">
+
+<div class="toolbar" id="File" title="File" onselectstart="return parent.cancel_event();">
        <!--====================================-->
        <span title="Handle" class=tb_handle></span>
-       <span title="Cut Div" enabled="This.query (DECMD_CUT);" TB_TYPE="button" onclick="This.exec(DECMD_CUT);" class="tb_menu_item">
-               <img title="Cut" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/cut.gif" alt="Bold"></img>
-       </span>
-       <span title="Copy Div" enabled="This.query (DECMD_COPY);" TB_TYPE="button" onclick="This.exec(DECMD_COPY);" class="tb_menu_item">
-               <img title="Copy" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/copy.gif" alt="Copy"></img>
+  <span id="cut" title="Cut Div" onclick="parent.command('Cut')" class="tb_menu_item">
+    <img title="Cut" class="tb_icon" src="<%image_url%>/toolbar/cut.gif" alt="Bold">
        </span>
-       <span title="Paste Div" enabled="This.query (DECMD_PASTE);" TB_TYPE="button" onclick="This.exec(DECMD_PASTE);" class="tb_menu_item">
-               <img title="Paste" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/paste.gif" alt="Paste"></img>
+  <span id="copy" title="Copy Div" onclick="parent.command('Copy')" class="tb_menu_item">
+    <img title="Copy" class="tb_icon" src="<%image_url%>/toolbar/copy.gif" alt="Copy">
        </span>
-       <!----------------------------------------->
-       <span title="Seperator" class="tb_sep"></span>
-       <span title="Undo Div" enabled="This.query (DECMD_UNDO);" TB_TYPE="button" onclick="This.exec(DECMD_UNDO)" class="tb_menu_item">
-               <img title="Undo" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/undo.gif" alt="Undo"></img>
-       </span>
-       <span title="Redo Div" enabled="This.query (DECMD_REDO);" TB_TYPE="button" onclick="This.exec(DECMD_REDO)" class="tb_menu_item">
-               <img title="Redo" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/redo.gif" alt="Redo"></img>
-       </span>
-       <span title="Seperator" class="tb_sep"></span>
-       <span title="Find Div" enabled="This.query (DECMD_FINDTEXT);" TB_TYPE="button" onclick="This.exec(DECMD_FINDTEXT, OLECMDEXECOPT_DODEFAULT, '', 1)" class="tb_menu_item">
-               <img title="Find" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/find.gif" alt="Find"></img>
+  <span id="paste" title="Paste Div" onclick="parent.command('Paste')" class="tb_menu_item">
+    <img title="Paste" class="tb_icon" src="<%image_url%>/toolbar/paste.gif" alt="Paste">
        </span>
 </div>

-<div class="toolbar" id="Format" title="Format" onselectstart="return This.cancel_event ();">
+<div class="toolbar" id="Format" title="Format" onselectstart="return parent.cancel_event ();">
        <!--=====================================-->
        <span title="Handle" class=tb_handle></span>
-       <span title="Bold Item" enabled="This.query (DECMD_BOLD);" TB_TYPE="toggle" onclick="This.exec(DECMD_BOLD);" class="tb_menu_item">
-               <img title="Bold" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/bold.gif" alt="Bold"></img>
+       <span id="bold" title="Bold Item" onclick="parent.command('Bold');" class="tb_menu_item">
+               <img id="boldImage" title="Bold" class="tb_icon" src="<%image_url%>/toolbar/bold.gif" alt="Bold"></img>
        </span>
-       <span title="Italic Item" enabled="This.query (DECMD_ITALIC);" TB_TYPE="toggle" onclick="This.exec(DECMD_ITALIC)" class="tb_menu_item">
-               <img title="Italic" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/italic.gif" alt="Italic"></img>
+       <span id="italic" title="Italic Item" onclick="parent.command('Italic');" class="tb_menu_item">
+               <img id="italicImage" title="Italic" class="tb_icon" src="<%image_url%>/toolbar/italic.gif" alt="Italic"></img>
        </span>
-       <span title="Underline Item" enabled="This.query (DECMD_UNDERLINE);" TB_TYPE="toggle" onclick="This.exec(DECMD_UNDERLINE)" class="tb_menu_item">
-               <img title="Underline" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/under.gif" alt="Underline"></img>
+       <span id="underline" title="Underline Item" onclick="parent.command('Underline');" class="tb_menu_item">
+               <img id="underlineImage" title="Underline" class="tb_icon" src="<%image_url%>/toolbar/under.gif" alt="Underline"></img>
        </span>
        <!----------------------------------------->
        <span title="Seperator" class="tb_sep"></span>
-  <span title="Quote" TB_TYPE="button" onclick="This.insert_quote()" class="tb_menu_item">
-    <img title="Quote" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/quote.gif" alt="Quote"></img>
+        <span title="Quote" onclick="parent.insertQuote()" class="tb_menu_item">
+                <img title="Quote" class="tb_icon" src="<%image_url%>/toolbar/quote.gif" alt="Quote"></img>
        </span>
-  <span title="Reply" TB_TYPE="button" onclick="This.insert_reply()" class="tb_menu_item">
-    <img title="Reply" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/reply.gif" alt="Reply"></img>
+        <span title="Reply" onclick="parent.insertReply()" class="tb_menu_item">
+                <img title="Reply" class="tb_icon" src="<%image_url%>/toolbar/reply.gif" alt="Reply"></img>
        </span>
-  <span title="Code" TB_TYPE="button" onclick="This.insert_code()" class="tb_menu_item">
-    <img title="Code" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/code.gif" alt="Code"></img>
+        <span title="Code" onclick="parent.insertCode()" class="tb_menu_item">
+               <img title="Code" class="tb_icon" src="<%image_url%>/toolbar/code.gif" alt="Code"></img>
        </span>
        <!----------------------------------------->
        <span title="Seperator" class="tb_sep"></span>
-       <span title="Left Div" enabled="This.query (DECMD_JUSTIFYLEFT);" TEXT_MODE='no' TB_TYPE="toggle" onclick="This.exec(DECMD_JUSTIFYLEFT)" class="tb_menu_item">
-               <img title="Left" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/left.gif" alt="Justify Left"></img>
+       <span id="jleft" title="Left Div" TEXT_MODE='no' onclick="parent.command('JustifyLeft');" class="tb_menu_item">
+               <img id="jleftImage" title="Justify Left" class="tb_icon" src="<%image_url%>/toolbar/left.gif" alt="Justify Left"></img>
        </span>
-       <span title="Center Div" enabled="This.query (DECMD_JUSTIFYCENTER);" TEXT_MODE='no' TB_TYPE="toggle" onclick="This.exec(DECMD_JUSTIFYCENTER)" class="tb_menu_item">
-               <img title="Center" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/center.gif" alt="Justify Center"></img>
+       <span id="jcenter" title="Center Div" TEXT_MODE='no' onclick="parent.command('JustifyCenter');" class="tb_menu_item">
+               <img id="jcenterImage" title="Justify Center" class="tb_icon" src="<%image_url%>/toolbar/center.gif" alt="Justify Center"></img>
        </span>
-       <span title="Right Div" enabled="This.query (DECMD_JUSTIFYRIGHT);" TEXT_MODE='no' TB_TYPE="toggle" onclick="This.exec(DECMD_JUSTIFYRIGHT)" class="tb_menu_item">
-               <img title="Rigth" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/right.gif" alt="Justify Right"></img>
+       <span id="jright" title="Right Div" TEXT_MODE='no' onclick="parent.command('JustifyRight');" class="tb_menu_item">
+               <img id="jrightImage" title="Justify Right" class="tb_icon" src="<%image_url%>/toolbar/right.gif" alt="Justify Right"></img>
        </span>
        <!----------------------------------------->
        <span title="Seperator" class="tb_sep"></span>
-       <span title="OL Div" enabled="This.query (DECMD_ORDERLIST);" TEXT_MODE='no' TB_TYPE="toggle" onclick="This.exec(DECMD_ORDERLIST)" class="tb_menu_item">
-               <img title="OL" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/numlist.gif" alt="Ordered List"></img>
+       <span id="ol" title="OL Div" TEXT_MODE='no' onclick="parent.command('InsertOrderedList');" class="tb_menu_item">
+               <img id="olImage" title="Ordered List" class="tb_icon" src="<%image_url%>/toolbar/numlist.gif" alt="Ordered List"></img>
        </span>
-       <span title="UL Div" enabled="This.query (DECMD_UNORDERLIST);" TEXT_MODE='no' TB_TYPE="toggle" onclick="This.exec(DECMD_UNORDERLIST)" class="tb_menu_item">
-               <img title="UL" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/bullist.gif" alt="Un-Ordered List"></img>
+       <span id="ul" title="UL Div" TEXT_MODE='no' onclick="parent.command('InsertUnorderedList');" class="tb_menu_item">
+               <img id="ulImage" title="Unordered List" class="tb_icon" src="<%image_url%>/toolbar/bullist.gif" alt="Unordered List"></img>
        </span>
-       <span title="Outdent Div" enabled="This.query (DECMD_OUTDENT);" TB_TYPE="button" onclick="This.exec(DECMD_OUTDENT)" TEXT_MODE='no' class="tb_menu_item">
-               <img title="Outdent" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/deindent.gif" alt="Outdent"></img>
+       <span title="Outdent Div" onclick="parent.command('Outdent')" TEXT_MODE='no' class="tb_menu_item">
+               <img title="Outdent" class="tb_icon" src="<%image_url%>/toolbar/outdent.gif" alt="Outdent"></img>
        </span>
-       <span title="Indent Div" enabled="This.query (DECMD_INDENT);" TB_TYPE="button" onclick="This.exec(DECMD_INDENT)" TEXT_MODE='no' class="tb_menu_item">
-               <img title="Indent" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/inindent.gif" alt="Indent"></img>
+       <span title="Indent Div" onclick="parent.command('Indent')" TEXT_MODE='no' class="tb_menu_item">
+               <img title="Indent" class="tb_icon" src="<%image_url%>/toolbar/indent.gif" alt="Indent"></img>
        </span>
        <!----------------------------------------->
        <span title="Sperator" class="tb_sep"></span>
-       <span title="Font Div" enabled="This.query (DECMD_FONT);" TEXT_MODE='no' TB_TYPE="button" onclick="This.exec (DECMD_FONT, OLECMDEXECOPT_PROMPTUSER)" class="tb_menu_item">
-               <img title="Font" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/font.gif" alt="Font"></img>
+       <span title="Font Div" TEXT_MODE='no' onclick="parent.fontDialog()" class="tb_menu_item">
+               <img title="Font Face" class="tb_icon" src="<%image_url%>/toolbar/font.gif" alt="Font Face"></img>
+       </span>
+       <span title="Font Div" TEXT_MODE='no' onclick="parent.colorDialog()" class="tb_menu_item">
+               <img title="Font Color" class="tb_icon" src="<%image_url%>/toolbar/font_color.gif" alt="Font Color"></img>
        </span>
 </div>
-<div class="toolbar" id="Misc" title="Misc" onselectstart="return This.cancel_event ();">
+<div class="toolbar" id="Misc" title="Misc" onselectstart="return parent.cancel_event();">
        <!--=====================================-->
        <span title="Handle" class=tb_handle></span>
-       <span title="Horizontal Rule Div" TB_TYPE="button" onclick="This.insert_hr();" class="tb_menu_item">
-               <img title="Horizontal Rule" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/hr.gif" alt="Horizontal Rule"></img>
+       <span title="Horizontal Rule Div" onclick="parent.command('InsertHorizontalRule')" class="tb_menu_item">
+               <img title="Horizontal Rule" class="tb_icon" src="<%image_url%>/toolbar/hr.gif" alt="Horizontal Rule"></img>
        </span>
        <!----------------------------------------->
        <span title="Seperator" class="tb_sep"></span>
-       <span title="Image Div" TB_TYPE="button" onclick="This.insert_image()" class="tb_menu_item">
-               <img title="Image" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/image.gif" alt="Insert Image"></img>
+       <span title="Image Div" onclick="parent.imageDialog()" class="tb_menu_item">
+               <img title="Image" class="tb_icon" src="<%image_url%>/toolbar/image.gif" alt="Insert Image"></img>
        </span>
-       <span title="Link Div" enabled="This.query (DECMD_HYPERLINK);" TB_TYPE="button" onclick="This.exec(DECMD_HYPERLINK, OLECMDEXECOPT_PROMPTUSER)" class="tb_menu_item">
-               <img title="Link" onload="IMAGES_LEN++;" class="tb_icon" src="<%image_url%>/toolbar/link.gif" alt="Create Link"></img>
+       <span id="link" title="Link Div" onclick="parent.linkDialog()" class="tb_menu_item">
+               <img id="linkImage" title="Link" class="tb_icon" src="<%image_url%>/toolbar/link.gif" alt="Create Link"></img>
        </span>
 </div>
-
-<!-- The DHTML Edit object. -->
-<object id="DHTMLSafe" title="Main Edit Window" style="position:absolute" classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A" tabindex="6">
-       <param name="ShowDetails" value="0">
-       <param name="ShowBorders" value="0">
-       <param name="Appearance" value="1">
-       <param name="Scrollbars" value="-1">
-       <param name="ScrollbarAppearance" value="1">
-       <param name="AbsoluteDropMode" value="-1">
-       <param name="SourceCodePreservation" value="0">
-       <param name="UseDivOnCarriageReturn" value="0">
-       <param name="ActivateDTCs" value="0">
-       <param name="BrowseMode" value="1">
-</object>
-<%-- Event handlers for DHTMLSafe --%>
-
-<script for="DHTMLSafe" event="DocumentComplete">
-<!--
-// Editor Object loaded
-    if (!This) return false;
-    return This.DocumentComplete ();
-// -->
-</script>
-
-<script for=DHTMLSafe event=DisplayChanged>
-<!--
-// Editor Object changed
-    if (!This) return false;
-    return This.DisplayChanged ();
-// -->
-</script>
-
-<script for=DHTMLSafe event=onkeydown>
-<!--
-// Key press event for short cut keys
-    if (!This) return false;
-    return This.onkeydown ();
-// -->
-</script>
-
+<iframe width="100%" height="200" name="editor_iframe" id="editor_iframe" style="position: absolute"></iframe>
 </body>
 </html>
-
Index: common/editor_style.css
===================================================================
RCS file: /usr/local/gossamer/gforum/cgi/admin/templates/common/editor_style.css,v
retrieving revision 1.1
retrieving revision 1.3
diff -b -u -r1.1 -r1.3
--- common/editor_style.css     16 Dec 2001 21:30:23 -0000      1.1
+++ common/editor_style.css     11 Jan 2002 23:18:19 -0000      1.3
@@ -1,9 +1,9 @@
 /*
  * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
+ * HTML Editor - A wysiwyg web based editor for IE5.5+
  *    Website  : http://gossamer-threads.com/
  *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor_style.css,v 1.1 2001/12/16 21:30:23 jagerman Exp $
+ *    Revision : $Id: editor_style.css,v 1.3 2002/01/11 23:18:19 jagerman Exp $
  *
  * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
  * Redistribution in part or in whole strictly prohibited. Please
@@ -18,23 +18,12 @@
         scrollbar-arrow-color: #00ff33;
 }

-.compose {
-       position      : absolute;
-       border-bottom : buttonface solid 1px;
-       border-left   : buttonface solid 1px; 
-       border-right  : buttonface solid 1px; 
-       border-top    : buttonface solid 1px;
-       visibility    : hidden;
-       left          : 0;
-       top           : 0;
-}
-
 .tb_icon {
        position : absolute;
-       width    : 22;
-       height   : 22;
-       left     : -1;
-       top      : -1;
+       width    : 22px;
+       height   : 22px;
+       left     : -1px;
+       top      : -1px;
 }

 .icon_down {
@@ -58,8 +47,8 @@
        border-right  : <%editor_base_color%> solid 1px;
        border-top    : <%editor_base_color%> solid 1px;
        top           : 1px;
-       height        : 22; 
-       width         : 23;
+       height        : 22px;
+       width         : 23px;
 }

 .menu_item_mouseoverup {
@@ -110,22 +99,22 @@
        position         : absolute;
        background-color : #C0C0C0;
        height           : 22px;
-       top              : 2;
-       font             : 8pt verdana,arial,sans-serif
+       top              : 2px;
+       font             : 8pt Verdana,Arial,sans-serif;
        border           : none;
 }

 .tb_text_mouseover {
        background-color : #C0C0C0;
        height           : 20px;
-       top              : 2;
+       top              : 2px;
        font-family      : "MS Sans Serif";
        font-size        : 6pt;
        border-bottom    : buttonhighlight solid 1px;
        border-left      : buttonshadow solid 1px;
        border-right     : buttonhighlight solid 1px;
        border-top       : buttonshadow solid 1px;
-       height           : 17;
+       height           : 17px;
 }

 .tb_handle {
@@ -147,44 +136,8 @@
        border-left      : buttonhighlight solid 1px;
        border-right     : buttonshadow solid 1px;
        border-top       : buttonhighlight solid 1px;
-       visibility       : hidden;
        height           : 25px;
-       top              : 0;
-       left             : 0;
-}
-
-.toolbar_hidden {
-       position   : absolute;
-       display    : none;
-       height     : 1px;
-       top        : 0;
-       left       : 0;
-}
-
-.context_menu {
-       position         : absolute;
-       display          : none;
-       visibility       : visible;
-       width            : 100;
-       background-Color : menu;
-       z-index          : 10
-       border           : outset 3px gray;
-}
-
-.menuItem {
-       font-family      : sans-serif;
-       background-Color : menu;
-       font-size        : 10pt;
-       width            : 100;
-       padding-left     : 20;
-       color            : black;
+       top              : 0px;
+       left             : 0px;
 }

-.highlightItem {
-       font-family      : sans-serif;
-       font-size        : 10pt;
-       width            : 100;
-       padding-left     : 20;
-       background-Color : highlight;
-       color            : white;
-}
Index: common/editor_toolbar.js
===================================================================
RCS file: common/editor_toolbar.js
diff -N common/editor_toolbar.js
--- common/editor_toolbar.js    17 Dec 2001 03:20:25 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,470 +0,0 @@
-/*
- * =================================================================
- * HTML Editor - A wysiwyg web based editor for IE5+
- *    Website  : http://gossamer-threads.com/
- *    Author   : Scott Beck sbeck@gossamer-threads.com
- *    Revision : $Id: editor_toolbar.js,v 1.2 2001/12/17 03:20:25 sbeck Exp $
- *
- * Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
- * Redistribution in part or in whole strictly prohibited. Please
- * see About file for full details.
- * =================================================================
- *
- * Description: Functions for the editor toolbars.
- */
-
-function init_images () {
-/* ---------------------------------------------------------
- * Preloads images and sets the URL for all the images on 
- * the page. If you add other images be sure they are in
- * the directory you set above.
- * This sets the onload event for the images to be displayed.
- */
-
- // If we are initialized return
-       if (this.images_init) return true;
-       this.debug ("Initializing Images");
-       for (var i = 0; i < document.images.length; i++) {
-               image = document.images[i];
-
-// Images are hidden untill the toolbar is loaded
-               image.style.visibility = 'hidden';
-
-// Do not load images of toolbars that are deleted
-               var pb = image.parentElement.title;
-               var tb = image.parentElement.parentElement.title;
-               if (this.tb_delete[tb] || this.tb_delete[pb]) {
-                       IMAGES_LEN++;
-                       continue;
-               }
-
-// Set the image source
-               var old_src = image.src;
-               image.src = old_src;
-       }
-       this.images_init = true;
-       return true;
-}
-Editor.prototype.init_images = init_images;
-
-function init_toolbar () {
-/* ---------------------------------------------------------
- * Should be called after the document has loaded. 
- * Initializes the Toolbar for display.
- */
-// Toolbar handler
-
-       if (this.toolbar_init) return true;
-       this.debug ("Initializing toolbar");
-       var i, s, element;
-       this.tb = {};
-       var tbs = document.body.all.tags ("DIV");
-       var tbs_len = tbs.length;
-
-// Go therough the document and get the toolbar classes
-       for (i=0; i < tbs_len; i++) {
-               element = tbs[i];
-
-// Store all the toolbar elements
-               this.tb[element.title] = element;
-
-// The toolbars are hidden till the images are loaded
-               element.TB_INDEX  = this.toolbars.length;
-
-// Skip deleted toolbars
-               if (this.tb_delete[element.title]) {
-                       element.className = 'toolbar_hidden';
-                       continue;
-               }
-
-// Initialize each toolbar
-               if (!this.tb_init (element)) {
-                       this.error ("Could not initialize toolbar:", element.title);
-               }
-
-// Set progmaticaly hidden toolbars to hidden
-               if (this.tb_hide[element.title]) {
-                       element.className = 'toolbar_hidden';
-               }
-
-// Keep all the toolbars for resizing and hidding
-               this.debug ("Adding toolbar", element.title);
-               this.toolbars[this.toolbars.length] = element;
-       }
-
-       this.tb_layout();
-
-// If the window is resized we need to re-layout the 
-// toolbar.
-       window.onresize = function () { This.tb_layout() };
-       this.toolbar_init = true;
-}
-Editor.prototype.init_toolbar = init_toolbar;
-
-
-function tb_init_button (element) {
-/* ---------------------------------------------------------
- * Sets op all the defaults for a button DIV. Saves any 
- * onclick and detaches the event. OnClick events are called
- * onMouseDown.
- */
-       if (element.className == "tb_general") return true;
-
-// Set events
-       element.onmouseover   = function () { This.tb_mouseover () }
-       element.onmouseout    = function () { This.tb_mouseout  () }
-       element.onmousedown   = function () { This.tb_mousedown () }
-       element.onmouseup     = function () { This.tb_mouseup   () }
-
-// Disable events
-       element.ondragstart   = function () { This.cancel_event () };
-       element.onselectstart = function () { This.cancel_event () };
-       element.onselect      = function () { This.cancel_event () };
-
-// Save onClick event for onMouseDown
-       element.YUSERONCLICK  = element.onclick;
-       element.onclick       = function () { This.cancel_event () };
-
-// Initial state is enabled
-       element.state = 'enabled';
-
-// If it is a toggle set the initial state.
-       if (element.TB_TYPE == 'toggle') element.tb_state = 'off';
-
-// So we don't re-initialize
-       element.INITIALIZED  = true;
-
-       return true;
-}
-Editor.prototype.tb_init_button = tb_init_button;
-
-function tb_init (element) {
-/* ---------------------------------------------------------
- * Called for each toolbar DIV. Populates the toolbar and 
- * sets the width.
- */
-       element.TBWidth = 0;
-       if (! this.tb_populate (element)) return false;
-       element.style.posWidth = element.TBWidth;
-       return true;
-}
-Editor.prototype.tb_init = tb_init;
-
-function tb_show (menu) {
-/* ---------------------------------------------------------
- * Shows or hiddes a toolbar. The element passed in is the 
- * toolbar object to toggle.
- */
-       var title = menu.title;
-       if (!this.tb[title]) return;
-       if (menu.className == 'toolbar_hidden') {
-               menu.className        = 'toolbar';
-               menu.style.visibility = 'visible';
-       }
-       else {
-               menu.className        = 'toolbar_hidden';
-               menu.style.visibility = 'hidden';
-       }
-       this.tb_layout();
-       return this.cancel_event();
-}
-Editor.prototype.tb_show = tb_show;
-
-function tb_populate (y) {
-/* ---------------------------------------------------------
- * Moves all a toolbar "y"'s icons to the proper location on
- * the screen and sets the correct size for the toolbars.
- */
-       var i, elements, element;
-
-       this.debug ("tb_populate called for", y.title);
-
-       elements = y.children;
-       if (!elements) return;
-
-// Loop through all the toolbars children.
-       for (i=0; i < elements.length; i++) {
-               element = elements[i];
-               if (element.tagName == "SCRIPT" || element.tagName == "!") continue;
-
-// Switch to see what element we are workin with.
-               switch (element.className) {
-
-// Menu Item then initialize it if it is not initialized.
-                       case "tb_menu_item":
-                               if (element.INITIALIZED == null) {
-                                       if (! this.tb_init_button (element)) return this.error ("Problem initializing:", element.title);
-                               }
-                               element.style.posLeft = y.TBWidth;
-                               y.TBWidth += element.offsetWidth + 1;
-                               break;
-
-// Toolbar element that is not a button
-// most likly a form field.
-                       case "tb_general":
-                       case "tb_menu_text":
-                               element.style.posLeft = y.TBWidth;
-                               y.TBWidth += element.offsetWidth + 5;
-                               break;
-
-// Seperator
-                       case "tb_sep":
-                               element.style.posLeft = y.TBWidth + 2;
-                               y.TBWidth += 5;
-                               break;
-
-// Handle for the toolbar, would be cool if people 
-// could move the toolbar. Next version :)
-                       case "tb_handle":
-                               element.style.posLeft = 2;
-                               y.TBWidth += element.offsetWidth + 7;
-                               break;
-
-// Should never get here unless the html is messed
-                       default:
-                               return this.error ("Invalid class:", element.className,"on Element:", element.id, "<", element.tagName, "> title: <", element.title, ">");
-               }
-       }
-
-// Plus one in case the width is zero
-       y.TBWidth += 1;
-       this.debug ("Toolbar width set to", y.TBWidth);
-       return true;
-}
-Editor.prototype.tb_populate = tb_populate;
-
-function tb_layout () {
-/* ---------------------------------------------------------
- * Layouts the toolbar on the screen based on the screen
- * width and the widths built in tb_populate().
- */
-       this.debug ("Layout called.");
-
-       var num_tb = this.toolbars.length;
-
-// No toolbars
-       if (num_tb == 0) { this.debug ("Ack, no toolbars"); return }
-       var i;
-
-// Get the screen width minus the width of the scrollbar
-       var sbar = document.body.offsetWidth - document.body.clientWidth;
-       var ScrWid = (document.body.offsetWidth  - sbar);
-       var ScrHit = (document.body.offsetHeight - sbar);
-
-// Go through the toolbars and find the width of the widest
-// one.
-       var TotalLen = ScrWid;
-       var tb = [];
-       var e = 0;
-       for (i = 0; i < num_tb; i++) {
-               if (this.toolbars[i].className == 'toolbar_hidden') continue;
-               tb[e] = this.toolbars[i];
-               if (tb[e].TBWidth > TotalLen) TotalLen = tb[e].TBWidth;
-               e++;
-       }
-       e--;
-       if (!tb.length) { return; }
-       var PrevTB;
-       var LastStart = 0;
-       var RelTop = 0;
-       var LastWid, CurrWid;
-
-// Position the top toolbar to the top of the screen
-       var TB           = tb[0];
-       TB.style.posTop  = 0;
-       TB.style.posLeft = 0;
-       var rows         = 1;
-
-// Go through the toolbars and update there width
-// and position.
-       var Start = TB.TBWidth;
-       for (i = 1; i < tb.length; i++) {
-               PrevTB = TB;
-               TB = tb[i];
-               CurrWid = TB.TBWidth;
-
-// Reached the end of the screen, reset to the start
-               if ((Start + CurrWid) > ScrWid) { 
-                       Start = 0;
-                       rows++;
-                       LastWid = TotalLen - LastStart;
-               }
-               else {
-                       LastWid = PrevTB.TBWidth;
-                       RelTop -= TB.offsetHeight;
-               }
-         
-               TB.style.posTop = RelTop;
-               TB.style.posLeft = Start;
-               PrevTB.style.width = LastWid;
-
-               LastStart = Start;
-               Start    += CurrWid;
-
-       }
-       DHTMLSafe.style.posTop     = (rows * 25);
-       DHTMLSafe.style.posHeight  = ScrHit - (rows * 25) - 5;
-       DHTMLSafe.style.posWidth   = ScrWid - 5;
-       DHTMLSafe.style.visibility = 'visible';
-
-// Set the total width
-       TB.style.width = TotalLen - LastStart;
-
-// Move the rest of the toolbars down
-       i--;
-       TB = tb[i];
-       var TBInd = TB.sourceIndex;
-       var A = TB.document.all;
-       for (var i in A) {
-               var item = A.item(i);
-               if (! item)                    continue;
-               if (! item.style)              continue;
-               if (item.sourceIndex <= TBInd) continue;
-               if (! this.tb[item.title])     continue;
-               if (item.className == 'toolbar_hidden')  continue;
-               item.style.posTop = RelTop;
-       }
-}
-Editor.prototype.tb_layout = tb_layout;
-
-function tb_mouseover () {
-/* ---------------------------------------------------------
- * OnMouseOver event handler function for toolbar buttons.
- */
- // Source must be an image
-       if (event.srcElement.tagName != "IMG")  return this.cancel_event();
-       var image   = event.srcElement;
-       var element = image.parentElement;
-
-// If we are in text mode and the button is disables for 
-// text mode. cancel the mouseover.
-       if (element.state == 'disabled') return this.cancel_event();
-
-// If the image in normal state put it in mouseover state
-       if (image.className == "tb_icon") { 
-               element.className = "menu_item_mouseoverup";
-       }
-
-// else if it is in down state put it in mouseover
-// for down states.
-       else if (image.className == "icon_down") {
-               element.className = "menu_item_mouseoverdown";
-       }
-
-       return this.cancel_event();
-}
-Editor.prototype.tb_mouseover = tb_mouseover;
-
-function tb_mouseout () {
-/* ---------------------------------------------------------
- * MouseOut event handler function for toolbar buttons
- */
- // The source tag must be an image.
-//     this.debug ("MouseOut event caught for", event.srcElement.title);
-       if (event.srcElement.tagName != "IMG") {
-//             this.debug ("Source is not an image");
-               return this.cancel_event();
-       }
-       var image   = event.srcElement;
-       var element = image.parentElement;
-
-// IF we are in "text mode" disable mouseout and return
-       if (element.state == 'disabled') {
-//             this.debug ("Source is disabled");
-               return this.cancel_event();
-       }
-
-// If the button is a toggle update it's state.
-       if (element.TB_TYPE == 'toggle' && element.tb_state != 'off') {
-               element.className = "menu_item_mouseoverdown"
-               image.className   = 'icon_down';
-       }
-
-// else put the image back to it's normal state.
-       else {
-               element.className  = "tb_menu_item";
-               image.className    = "tb_icon";
-       }
-
-       return this.cancel_event();
-}
-Editor.prototype.tb_mouseout = tb_mouseout;
-
-function tb_mousedown () {
-/* ---------------------------------------------------------
- * MouseDown event handler for toolbar buttons.
- */
-
-       this.debug ("MouseDown event caught for", event.srcElement.title);
- // The source tag must be an image.
-       if (event.srcElement.tagName != "IMG") { 
-               this.debug ("Source was not an image"); 
-               return this.cancel_event();
-       }
-       var image   = event.srcElement;
-       var element = image.parentElement;
-
-// If we are in "text mode" and the button is not supported in
-// "text mode" cancel the event and return false.
-       if (element.state == 'disabled') { 
-               this.debug (element.title, "disabled"); 
-               return this.cancel_event();
-       }
-
-// If the button is a toggle update it's state.
-
-       if (element.TB_TYPE == 'toggle') {
-               this.debug (element.title, "is toggle. Updating toggle");
-               this.update_toggle (element, image);
-       }
-       else {
-
-// Else set the button to the mosedown state.
-               element.className = "menu_item_mouseoverdown";
-               image.className   = "icon_down";
-       }
-
-// We disabled the click function and saved it in this.
-// Eval it here and run it.
-       this.debug ("Calling code", element.YUSERONCLICK);
-       if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
-       return this.cancel_event();
-}
-Editor.prototype.tb_mousedown = tb_mousedown;
-
-function tb_mouseup () {
-/* ---------------------------------------------------------
- * MouseUp event handler function for toolbar buttons.
- */
- // The source element must be an image type.
-//     this.debug ("Caught mouseup event for", event.srcElement.title);
-       if (event.srcElement.tagName != "IMG") {
-//             this.debug ("Source is not an image");
-               return this.cancel_event();
-       }
-       var image   = event.srcElement;
-       var element = image.parentElement;
-
-// If we are in "text mode" and the field is disabled in that
-// mode return and cancel the event.
-       if (element.state == 'disabled') {
-//             this.debug ("State is disabled");
-               return this.cancel_event();
-       }
-
-// It the icons to the mouseUp state.
-       element.className = "menu_item_mouseoverup";
-       image.className   = "tb_icon";
-
-// Refocus the compose window here.
-       DHTMLSafe.focus();
-
-       return this.cancel_event();
-
-}
-Editor.prototype.tb_mouseup = tb_mouseup;
-
-/* Help VIM out
-vim:ts=4:shiftwidth=4:syntax=javascript
-*/
-
Index: common/globals.txt
===================================================================
RCS file: common/globals.txt
diff -N common/globals.txt
--- common/globals.txt  16 Dec 2001 21:30:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-# This file is auto generated and contains a perl hash of
-# your template globals for 'default' template set.
-# Generated on: Sun Dec 16 13:25:10 2001
-# vim: syn=perl
-{
-       'editor_base_color' => '#E6F5D7'
-}