Reducing length of URLs
authorjongfoster <jongfoster@users.sourceforge.net>
Wed, 23 Jan 2002 00:26:45 +0000 (00:26 +0000)
committerjongfoster <jongfoster@users.sourceforge.net>
Wed, 23 Jan 2002 00:26:45 +0000 (00:26 +0000)
Where encoded and unencoded versions of a string existed, removing
the unencoded one.

templates/cgi-error-file
templates/cgi-error-modified
templates/cgi-error-parse
templates/edit-actions-add-url-form
templates/edit-actions-for-url
templates/edit-actions-list
templates/edit-actions-list-section
templates/edit-actions-list-url
templates/edit-actions-remove-url-form
templates/edit-actions-url-form

index ffd0b70..591eff4 100644 (file)
       <td bgcolor=#eeeeee>
         <h2>Actions file not found</h2>
         <blockquote>
-          <p>The actions file you are trying to edit (<code>@filename@.action</code>)
+          <p>The actions file you are trying to edit (<code>@f@.action</code>)
              does not exist, or cannot be read.</p>
         </blockquote>
       </td>
index 97494e4..7ebe20d 100644 (file)
           </ul>
           <p>You can go back into the edit interface using the menu below,
              or by clicking <a 
-             href="@default-cgi@edit-actions-list?filename=@filename@"
+             href="edit-actions-list?f=@f@"
              >here</a>.</p>
         </blockquote>
       </td>
index 969f170..8f7bf16 100644 (file)
              badly using the web-based editor, please file a bug report!</p>
           <p>When you've fixed the problem, you can go back into the edit
              interface using the menu below, or by clicking <a 
-             href="@default-cgi@edit-actions-list?filename=@filename@"
-             >here</a>.</p>
+             href="edit-actions-list?f=@f@">here</a>.</p>
         </blockquote>
       </td>
     </tr>
index 7351298..8983936 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-add-url-form,v $
+#    Revision 1.3  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.2  2002/01/17 21:21:03  jongfoster
 #    DOS->Unix line endings
 #
@@ -124,16 +128,16 @@ function validate(text)
   <tr>
     <td class="light">
       <h2>Add URL Pattern</h2>
-      <form method="GET" action="@default-cgi@edit-actions-add-url"
-            onSubmit="return validate(newval.value);">
+      <form method="GET" action="edit-actions-add-url"
+            onSubmit="return validate(u.value);">
         <p>
-          <input type="hidden" name="filename" value="@filename@">
-          <input type="hidden" name="ver" value="@ver@">
-          <input type="hidden" name="section" value="@section@">
-          <input type="text" name="newval" value="" size="78"><br>
+          <input type="hidden" name="f" value="@f@">
+          <input type="hidden" name="v" value="@v@">
+          <input type="hidden" name="s" value="@s@">
+          <input type="text" name="u" value="" size="78"><br>
           <input type="submit" value="Submit"> &nbsp;
           <input type="reset" value="Reset"> &nbsp;
-          <a href="@default-cgi@edit-actions-list?filename=@filename@">Cancel</a>
+          <a href="edit-actions-list?f=@f@">Cancel</a>
         </p>
       </form>
     </td>
index 2004c16..5b6e13b 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-for-url,v $
+#    Revision 1.8  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.7  2002/01/17 21:21:03  jongfoster
 #    DOS->Unix line endings
 #
@@ -286,7 +290,7 @@ function show_wafer_opts(tf)
 
 <body>
 
-<form method="GET" action="@default-cgi@edit-actions-submit" id="myform" name="myform">
+<form method="GET" action="edit-actions-submit" id="myform" name="myform">
 
   <table cellpadding="20" cellspacing="10" border="0" width="100%">
     <tr>
@@ -318,9 +322,9 @@ function show_wafer_opts(tf)
     <tr>
       <td class="light">
         <h2>Edit Actions
-          <input type="hidden" name="filename" value="@filename@">
-          <input type="hidden" name="ver" value="@ver@">
-          <input type="hidden" name="section" value="@section@">
+          <input type="hidden" name="f" value="@f@">
+          <input type="hidden" name="v" value="@v@">
+          <input type="hidden" name="s" value="@s@">
         </h2>
       </td>
     </tr>
index 863cd1c..3cc0aff 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-list,v $
+#    Revision 1.6  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.5  2002/01/17 21:21:05  jongfoster
 #    DOS->Unix line endings
 #
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta name="robots" content="noindex,nofollow">
 
-<title>JunkBuster: Edit actions file - @filename@.action</title>
+<title>JunkBuster: Edit actions file - @f@.action</title>
 
 <style type="text/css">
-body         { font-family: Helvetica, Helv, Arial, Sans-Serif, sans-serif;
-               background-color: #ffffff;
-               color: #000000;            }
-td.light     { background-color: #eeeeee; }
-td.dark      { background-color: #dddddd; }
-table.wide   { border-color: white;
-               border-style: solid;
-               border-left-width: 10px;
-               border-right-width: 10px;
-               border-top-width: 0px;
-               border-bottom-width: 0px;  }
-tr.actions   { background-color: #eeffee; }
-tr.url1      { background-color: #d0d0ff; }
-tr.url2      { background-color: #eeeeff; }
-tr.rule      { background-color: #c0c0c0;
-               height: 3px;
-               max-height: 3px;
-               font-size: 1px             }
-tr.adv       { background-color: #FFFFD0; }
-td.header    { font-weight: bold;         }
-td.url       { font-weight: bold;         }
-td.action    { font-weight: bold;
-               font-style: italic;        }
-td.nobreak   { white-space: nowrap; }
-a.cmd        { white-space: nowrap;
-               width: auto;
-               padding: 2px;
-               background-color: #dddddd;
-               color:            #000000;
-               text-decoration: none;
-               border-top:    1px solid #ffffff;
-               border-left:   1px solid #ffffff;
-               border-bottom: 1px solid #000000;
-               border-right:  1px solid #000000; }
-a.cmd:hover  { background-color: #eeeeee;        }
-a.cmd:active { border-top:    1px solid #000000;
-               border-left:   1px solid #000000;
-               border-bottom: 1px solid #ffffff;
-               border-right:  1px solid #ffffff; }
+body {
+  font-family: Helvetica, Helv, Arial, Sans-Serif, sans-serif;
+  background-color: #ffffff;
+  color: #000000;
+}
+td.light {
+  background-color: #eeeeee;
+}
+td.dark {
+  background-color: #dddddd;
+}
+table.wide {
+  border-color: white;
+  border-style: solid;
+  border-left-width: 10px;
+  border-right-width: 10px;
+  border-top-width: 0px;
+  border-bottom-width: 0px;
+}
+tr.actions {
+  background-color: #eeffee;
+}
+tr.url1 {
+  background-color: #d0d0ff;
+}
+tr.url2 {
+  background-color: #eeeeff;
+}
+tr.rule {
+  background-color: #c0c0c0;
+  height: 3px;
+  max-height: 3px;
+  font-size: 1px
+}
+tr.adv {
+  background-color: #FFFFD0;
+}
+td.header {
+  font-weight: bold;
+}
+td.url {
+  font-weight: bold;
+}
+td.action {
+  font-weight: bold;
+  font-style: italic;
+}
+td.nbr {
+  white-space: nowrap;
+}
+a.cmd, div.buttons a {
+  white-space: nowrap;
+  width: auto;
+  padding: 2px;
+  background-color: #dddddd;
+  color:            #000000;
+  text-decoration: none;
+  border-top:    1px solid #ffffff;
+  border-left:   1px solid #ffffff;
+  border-bottom: 1px solid #000000;
+  border-right:  1px solid #000000;
+}
+a.cmd:hover, div.buttons a:hover {
+  background-color: #eeeeee;
+}
+a.cmd:active, div.buttons a:active {
+  border-top:    1px solid #000000;
+  border-left:   1px solid #000000;
+  border-bottom: 1px solid #ffffff;
+  border-right:  1px solid #ffffff;
+}
 
 </style>
 
@@ -139,10 +175,10 @@ function not_yet()
 // JavaScript-capable browsers will call this function, which does a
 // client-side prompt for speed.  It may kick off the delete directly.
 // It always returns false to cancel following the link.
-function remove_pattern(section,pattern,curtext)
+function rm_p(pattern,curtext)
 {
    if (window.confirm("Are you sure you want to delete this URL pattern?\nPattern is: "+unescape(curtext)))
-   { window.location.href="@default-cgi@edit-actions-remove-url?filename=@filename@&ver=@ver@&section="+section+"&pattern="+pattern+"#s"+section+"urls"; }
+   { window.location.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern+"#l"+pattern; }
    return false;
 }
 
@@ -178,19 +214,23 @@ function remove_pattern(section,pattern,curtext)
     </td>
   </tr>
 <!-- if-unstable-end@ -->
+</table>
+
+<div class="buttons">
 
+<table cellpadding="20" cellspacing="10" border="0" width="100%">
   <tr>
     <td class="light">
-      <h2>Editing Actions File - @filename@.action</h2>
-      <p>
-        <span><a class="cmd" href="@default-cgi@edit-actions-section-add?filename=@filename@&amp;ver=@ver@&amp;section=0">Insert new section at top</a></span>
-      </p>
+      <h2>Editing Actions File - @f@.action</h2>
+      <p><a class="cmd" href="edit-actions-section-add?f=@f@&amp;v=@v@&amp;s=0">Insert new section at top</a></p>
     </td>
   </tr>
 </table>
 
 @sections@
 
+</div>
+
 <table cellpadding="20" cellspacing="10" border="0" width="100%">
   <tr>
     <td class="dark">
index 68ea814..2bd6ba9 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-list-section,v $
+#    Revision 1.4  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.3  2001/11/13 00:58:18  jongfoster
 #    New version of actions file editor templates
 #
 # urls
 #
 #############################################################################
+#
+# ** Important note: **
+#
+# It is important to keep this file small.  That's why all the
+# identifiers in the HTML are short and cryptic.  Currently, the main
+# edit-actions page is ~300k.  Before it was optimized, it was ~550k.
+#
+#############################################################################
 <table border="0" width="100%" cellspacing="0" cellpadding="3" class="wide">
 <tr class="actions" valign="top">
-  <td class="header" align="right"><a name="s@sectionid@"></a>Actions:</td>
-  <td align="center"><a class="cmd" href="@default-cgi@edit-actions-for-url?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@"
-    >Edit</a></td>
-  <td class="action" align="left">@actions@</td>
+ <td class="header" align="right">Actions:</td>
+ <td align="center"><a name="l@s@" href="eas?f=@f@&amp;v=@v@&amp;s=@s@">Edit</a></td>
+ <td class="action" align="left">@actions@</td>
 </tr>
 <tr class="rule">
-  <td colspan="3"><img src="@default-cgi@send-banner?type=trans" width="2"
-    height="1" alt="----"></td>
+ <td colspan="3"><img src="t" width="2" height="1" alt="----"></td>
 </tr>
 <tr class="url1" valign="top">
-  <td class="header" align="right"><a name="s@sectionid@urls">URLs:</a></td>
-  <td align="center"><a class="cmd" href="@default-cgi@edit-actions-add-url-form?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@"
-  >Add</a></td>
-  <td align="left">&nbsp;</td>
+ <td class="header" align="right">URLs:</a></td>
+ <td align="center"><a href="eaa?f=@f@&amp;v=@v@&amp;s=@s@">Add</a></td>
+ <td align="left">&nbsp;</td>
 </tr>
-
 @urls@
-
 <tr class="rule">
-  <td colspan="3"><img src="@default-cgi@send-banner?type=trans" width="2"
-    height="1" alt="-"></td>
+ <td colspan="3"><img src="t" width="2" height="1" alt="-"></td>
 </tr>
 <tr class="adv" valign="top">
-  <td class="header" align="right"><b>Advanced:</b></td>
-  <td colspan="2">
-    <table border="0" cellspacing="0" cellpadding="4">
-      <tr valign="middle" align="center">
-        <td class="nobreak"> &nbsp; <a class="cmd" href="javascript:not_yet()">Move section up</a> &nbsp; </td>
-        <td class="nobreak"> &nbsp; 
-        <a class="cmd" href="@default-cgi@edit-actions-section-add?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@"
-        >Insert new section below</a> &nbsp; </td>
-      </tr>
-      <tr valign="middle" align="center">
-        <td class="nobreak"> &nbsp; <a class="cmd" href="javascript:not_yet()">Move section down</a> &nbsp; </td>
-        <td class="nobreak"><!-- @if-empty-section-start --> &nbsp; 
-        <a class="cmd" href="@default-cgi@edit-actions-section-remove?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@"
-        >Delete whole section</a><!-- if-empty-section-end@ --> &nbsp; </td>
-      </tr>
-    </table>
-  </td>
+ <td class="header" align="right"><b>Advanced:</b></td>
+ <td colspan="2">
+  <table border="0" cellspacing="0" cellpadding="4">
+   <tr valign="middle" align="center">
+    <td class="nbr"> &nbsp; @if-s-prev-exists-start@<a href="eass?f=@f@&amp;v=@v@&amp;s1=@s-prev@&amp;s2=@s@">Move section up</a> &nbsp; @if-s-prev-exists-end@</td>
+    <td class="nbr"> &nbsp; <a href="easa?f=@f@&amp;v=@v@&amp;s=@s@">Insert new section below</a> &nbsp; </td>
+   </tr>
+   <tr valign="middle" align="center">
+    <td class="nbr"> &nbsp; @if-s-next-exists-start@<a href="eass?f=@f@&amp;v=@v@&amp;s1=@s@&amp;s2=@s-next@">Move section down</a> &nbsp; @if-s-next-exists-end@</td>
+    <td class="nbr"> &nbsp; @if-empty-section-start@<a href="easr?f=@f@&amp;v=@v@&amp;s=@s@">Delete whole section</a>&nbsp; @if-empty-section-end@</td>
+   </tr>
+  </table>
+ </td>
 </tr>
 </table>
 <p>&nbsp;</p>
 
-
-
index c3a99dd..7c83f9b 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-list-url,v $
+#    Revision 1.4  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.3  2001/11/13 00:58:18  jongfoster
 #    New version of actions file editor templates
 #
 # urls
 #
 #############################################################################
-<tr class="url@url-1-2@" valign="top">
-<td align="left">&nbsp;</td>
-<td align="center" class="nobreak"><a name="s@sectionid@url@urlid@"></a
-><a class="cmd" href="@default-cgi@edit-actions-remove-url-form?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@&amp;pattern=@urlid@&amp;oldval=@url@"
-onclick="return remove_pattern(@sectionid@,@urlid@,'@url@');">Remove</a>&nbsp;&nbsp;&nbsp;<a
-class="cmd" href="@default-cgi@edit-actions-url-form?filename=@filename@&amp;ver=@ver@&amp;section=@sectionid@&amp;pattern=@urlid@&amp;oldval=@url@">Edit</a>&nbsp;</td>
+#
+# ** Important note: **
+#
+# It is *extremely* important to keep this file small.  That's why all the
+# identifiers in the HTML are short and cryptic.  Currently, the main
+# edit-actions page is ~300k.  Before it was optimized, it was ~550k.
+#
+#############################################################################
+<tr class="url@url-1-2@" valign="top"><td align="left">&nbsp;</td>
+<td align="center" class="nbr"><a name="l@p@"
+href="ear?f=@f@&amp;v=@v@&amp;p=@p@" onclick="return rm_p(@p@,'@url@');">Remove</a>&nbsp;&nbsp;&nbsp;<a
+href="eau?f=@f@&amp;v=@v@&amp;p=@p@">Edit</a>&nbsp;</td>
 <td class="url" align="left">@url-html@</td>
 </tr>
-
index c7e9de7..46adcb3 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-remove-url-form,v $
+#    Revision 1.3  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.2  2002/01/17 21:21:05  jongfoster
 #    DOS->Unix line endings
 #
@@ -114,11 +118,11 @@ td.dark      { background-color: #dddddd }
     <td class="light">
       <h2>Remove URL Pattern</h2>
       <p>Are you sure you want to delete this URL pattern?  The pattern is:</p>
-      <p><b>@oldval@</b></p>
+      <p><b>@u@</b></p>
       <p>
-        <a href="@default-cgi@edit-actions-remove-url?filename=@filename@&amp;ver=@ver@&amp;section=@section@&amp;pattern=@pattern@">OK</a>
+        <a href="edit-actions-remove-url?f=@f@&amp;v=@v@&amp;p=@p@">OK</a>
         &nbsp;
-        <a href="@default-cgi@edit-actions-list?filename=@filename@">Cancel</a>
+        <a href="edit-actions-list?f=@f@">Cancel</a>
       </p>
     </td>
   </tr>
index 0bec38f..bd25c2f 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-url-form,v $
+#    Revision 1.3  2002/01/17 21:33:00  jongfoster
+#    Replacing all references to the URL of the config interface
+#    with @default-cgi@
+#
 #    Revision 1.2  2002/01/17 21:21:05  jongfoster
 #    DOS->Unix line endings
 #
 #
 # Available variables include:
 #
-# filename
-# ver
-# section
-# pattern
-# oldval
+# f - filename
+# v - version
+# s - section
+# p - pattern
+# u - old value of URL
 #
 #############################################################################
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
@@ -126,17 +130,16 @@ function validate(text)
   <tr>
     <td class="light">
       <h2>Edit URL Pattern</h2>
-      <form method="GET" action="@default-cgi@edit-actions-url"
-            onSubmit="return validate(newval.value);">
+      <form method="GET" action="edit-actions-url"
+            onSubmit="return validate(u.value);">
         <p>
-          <input type="hidden" name="filename" value="@filename@">
-          <input type="hidden" name="ver" value="@ver@">
-          <input type="hidden" name="section" value="@section@">
-          <input type="hidden" name="pattern" value="@pattern@">
-          <input type="text" name="newval" value="@oldval@" size="78"><br>
+          <input type="hidden" name="f" value="@f@">
+          <input type="hidden" name="v" value="@v@">
+          <input type="hidden" name="p" value="@p@">
+          <input type="text" name="u" value="@u@" size="78"><br>
           <input type="submit" value="Submit"> &nbsp;
           <input type="reset" value="Reset"> &nbsp;
-          <a href="@default-cgi@edit-actions-list?filename=@filename@">Cancel</a>
+          <a href="edit-actions-list?f=@f@">Cancel</a>
         </p>
       </form>
     </td>