]> bicyclesonthemoon.info Git - ott/mirror/commitdiff
Support more than 1 build target
authorb <rowerynaksiezycu@gmail.com>
Mon, 19 Feb 2024 19:59:48 +0000 (19:59 +0000)
committerb <rowerynaksiezycu@gmail.com>
Mon, 19 Feb 2024 19:59:48 +0000 (19:59 +0000)
29 files changed:
bb2html.1.awk [moved from bb2html.awk with 86% similarity]
bot2.1.awk
editor.1.js [moved from www/ott/prosilver/template/editor.js with 98% similarity]
end.1 [moved from www/ott/end with 88% similarity]
fix.pl [deleted file]
info.1.htm [moved from www/ott/info.htm with 81% similarity]
install.sh [new file with mode: 0755]
makefile
makefile.1.mak
mpview.1.c
mview.1.awk [moved from mview.awk with 60% similarity]
mview.1.c
np.end.1 [moved from www/ott/np/end with 87% similarity]
np.top.1 [moved from www/ott/np/top with 81% similarity]
ottmirror.1.conf
post.1.c
post.1.htm [moved from www/ott/post.htm with 81% similarity]
posted.1.awk [moved from posted.awk with 67% similarity]
posted.1.c
redirect.1.c [moved from redirect.c with 85% similarity]
settings-debug.txt [new file with mode: 0644]
settings-release.txt
settings.txt
style.php.1.css [moved from www/ott/prosilver/theme/style.php.css with 90% similarity]
top.1 [moved from www/ott/top with 85% similarity]
update.1.c
update.1.htm [moved from www/ott/update.htm with 64% similarity]
view.1.c
whymirror.1.htm [moved from www/ott/whymirror.htm with 80% similarity]

similarity index 86%
rename from bb2html.awk
rename to bb2html.1.awk
index fa590026ee4ef248599b7bf57fbd424311059bfe..ccf908a07bdfcfe4320c03ebaaf9d69ca9dd518c 100644 (file)
@@ -1,8 +1,7 @@
 # OTT mirror\r
-# Copyright (C) 2014 Balthasar Szczepański\r
-# bb2html.awk\r
+# Copyright (C) 2014, 2024 Balthasar Szczepański\r
+# bb2html.awk is generated from bb2html.1.awk\r
 # translate BBcode to HTML and add to post file.\r
-# 27.10.2014\r
 \r
 # This file is part of OTT mirror.\r
 #\r
@@ -22,6 +21,7 @@
 BEGIN{\r
        FS="="\r
        debug="debug=bb2html.awk:"\r
+       ###AWK_cgi_prosilver_path: cgi_prosilver_path = /ott/prosilver\r
 };\r
 {\r
        eq=index($0,"=")\r
@@ -466,29 +466,29 @@ function bb2html(text,   depth,count,bbtree,html,tag,tagstart,taglength,elm,tagv
                                gsub(/https?:\/\/[^\n\r\t<> ]+/,"<a href=\"&\" class=\"postlink\">&</a>",tag)\r
                        if(argtab["disable_smilies"]=="" && bbtree[indt(count,depth)".t"] !~ /^((code)|(img))$/)\r
                        {\r
-                               gsub(/(^|[\n\r\t ]):D($|[\n\r\t ])/," <img title=\"Very Happy\" alt=\":D\" src=\"/ott/prosilver/smilies/icon_biggrin.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):\)($|[\n\r\t ])/," <img title=\"Smile\" alt=\":)\" src=\"/ott/prosilver/smilies/icon_smile.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):\(($|[\n\r\t ])/," <img title=\"Sad\" alt=\":(\" src=\"/ott/prosilver/smilies/icon_sad.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):o($|[\n\r\t ])/," <img title=\"Surprised\" alt=\":o\" src=\"/ott/prosilver/smilies/icon_surprised.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):shock:($|[\n\r\t ])/," <img title=\"Shocked\" alt=\":shock:\" src=\"/ott/prosilver/smilies/icon_eek.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):\?($|[\n\r\t ])/," <img title=\"Confused\" alt=\":?\" src=\"/ott/prosilver/smilies/icon_confused.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ])8-\)($|[\n\r\t ])/," <img title=\"Cool\" alt=\"8-)\" src=\"/ott/prosilver/smilies/icon_cool.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):lol:($|[\n\r\t ])/," <img title=\"Laughing\" alt=\":lol:\" src=\"/ott/prosilver/smilies/icon_lol.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):x($|[\n\r\t ])/," <img title=\"Mad\" alt=\":x\" src=\"/ott/prosilver/smilies/icon_mad.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):P($|[\n\r\t ])/," <img title=\"Razz\" alt=\":P\" src=\"/ott/prosilver/smilies/icon_razz.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):oops:($|[\n\r\t ])/," <img title=\"Embarassed\" alt=\":oops:\" src=\"/ott/prosilver/smilies/icon_redface.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):cry:($|[\n\r\t ])/," <img title=\"Crying or Very Sad\" alt=\":cry:\" src=\"/ott/prosilver/smilies/icon_cry.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):evil:($|[\n\r\t ])/," <img title=\"Evil or Very Mad\" alt=\":evil:\" src=\"/ott/prosilver/smilies/icon_evil.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):twisted:($|[\n\r\t ])/," <img title=\"Twisted Evil\" alt=\":twisted:\" src=\"/ott/prosilver/smilies/icon_twisted.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):roll:($|[\n\r\t ])/," <img title=\"Rolling Eyes\" alt=\":roll:\" src=\"/ott/prosilver/smilies/icon_rolleyes.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):wink:($|[\n\r\t ])/," <img title=\"Wink\" alt=\":wink:\" src=\"/ott/prosilver/smilies/icon_wink.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]);\)($|[\n\r\t ])/," <img title=\"Wink\" alt=\":wink:\" src=\"/ott/prosilver/smilies/icon_wink.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):!:($|[\n\r\t ])/," <img title=\"Exclamation\" alt=\":!:\" src=\"/ott/prosilver/smilies/icon_exclaim.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):\?:($|[\n\r\t ])/," <img title=\"Question\" alt=\":?:\" src=\"/ott/prosilver/smilies/icon_question.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):idea:($|[\n\r\t ])/," <img title=\"Idea\" alt=\":idea:\" src=\"/ott/prosilver/smilies/icon_idea.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):arrow:($|[\n\r\t ])/," <img title=\"Arrow\" alt=\":arrow:\" src=\"/ott/prosilver/smilies/icon_arrow.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):\|($|[\n\r\t ])/," <img title=\"Neutral\" alt=\":|\" src=\"/ott/prosilver/smilies/icon_neutral.gif\" /> ",tag)\r
-                               gsub(/(^|[\n\r\t ]):mrgreen:($|[\n\r\t ])/," <img title=\"Mr. Green\" alt=\":mrgreen:\" src=\"/ott/prosilver/smilies/icon_mrgreen.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):D($|[\n\r\t ])/," <img title=\"Very Happy\" alt=\":D\" src=\""cgi_prosilver_path"/smilies/icon_biggrin.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):\)($|[\n\r\t ])/," <img title=\"Smile\" alt=\":)\" src=\""cgi_prosilver_path"/smilies/icon_smile.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):\(($|[\n\r\t ])/," <img title=\"Sad\" alt=\":(\" src=\""cgi_prosilver_path"/smilies/icon_sad.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):o($|[\n\r\t ])/," <img title=\"Surprised\" alt=\":o\" src=\""cgi_prosilver_path"/smilies/icon_surprised.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):shock:($|[\n\r\t ])/," <img title=\"Shocked\" alt=\":shock:\" src=\""cgi_prosilver_path"/smilies/icon_eek.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):\?($|[\n\r\t ])/," <img title=\"Confused\" alt=\":?\" src=\""cgi_prosilver_path"/smilies/icon_confused.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ])8-\)($|[\n\r\t ])/," <img title=\"Cool\" alt=\"8-)\" src=\""cgi_prosilver_path"/smilies/icon_cool.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):lol:($|[\n\r\t ])/," <img title=\"Laughing\" alt=\":lol:\" src=\""cgi_prosilver_path"/smilies/icon_lol.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):x($|[\n\r\t ])/," <img title=\"Mad\" alt=\":x\" src=\""cgi_prosilver_path"/smilies/icon_mad.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):P($|[\n\r\t ])/," <img title=\"Razz\" alt=\":P\" src=\""cgi_prosilver_path"/smilies/icon_razz.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):oops:($|[\n\r\t ])/," <img title=\"Embarassed\" alt=\":oops:\" src=\""cgi_prosilver_path"/smilies/icon_redface.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):cry:($|[\n\r\t ])/," <img title=\"Crying or Very Sad\" alt=\":cry:\" src=\""cgi_prosilver_path"/smilies/icon_cry.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):evil:($|[\n\r\t ])/," <img title=\"Evil or Very Mad\" alt=\":evil:\" src=\""cgi_prosilver_path"/smilies/icon_evil.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):twisted:($|[\n\r\t ])/," <img title=\"Twisted Evil\" alt=\":twisted:\" src=\""cgi_prosilver_path"/smilies/icon_twisted.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):roll:($|[\n\r\t ])/," <img title=\"Rolling Eyes\" alt=\":roll:\" src=\""cgi_prosilver_path"/smilies/icon_rolleyes.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):wink:($|[\n\r\t ])/," <img title=\"Wink\" alt=\":wink:\" src=\""cgi_prosilver_path"/smilies/icon_wink.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]);\)($|[\n\r\t ])/," <img title=\"Wink\" alt=\":wink:\" src=\""cgi_prosilver_path"/smilies/icon_wink.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):!:($|[\n\r\t ])/," <img title=\"Exclamation\" alt=\":!:\" src=\""cgi_prosilver_path"/smilies/icon_exclaim.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):\?:($|[\n\r\t ])/," <img title=\"Question\" alt=\":?:\" src=\""cgi_prosilver_path"/smilies/icon_question.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):idea:($|[\n\r\t ])/," <img title=\"Idea\" alt=\":idea:\" src=\""cgi_prosilver_path"/smilies/icon_idea.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):arrow:($|[\n\r\t ])/," <img title=\"Arrow\" alt=\":arrow:\" src=\""cgi_prosilver_path"/smilies/icon_arrow.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):\|($|[\n\r\t ])/," <img title=\"Neutral\" alt=\":|\" src=\""cgi_prosilver_path"/smilies/icon_neutral.gif\" /> ",tag)\r
+                               gsub(/(^|[\n\r\t ]):mrgreen:($|[\n\r\t ])/," <img title=\"Mr. Green\" alt=\":mrgreen:\" src=\""cgi_prosilver_path"/smilies/icon_mrgreen.gif\" /> ",tag)\r
                        }\r
                        \r
                        html = html tag\r
index c455deaad93de6acdbb9e8ffd8ce1568bfde96e8..a06b903165a14a9d32c597c06bd196eb38236a98 100644 (file)
@@ -1,8 +1,7 @@
 # OTT mirror
-# Copyright (C) 2014-2016, 2022 Balthasar Szczepański
+# Copyright (C) 2014-2016, 2022, 2024 Balthasar Szczepański
 # bot2.awk (bothasar_t) automatically generated from bot2.1.awk
 # relinking, archiving avatars, attachments, images.
-# 29.09.2022
 
 # This file is part of OTT mirror.
 #
@@ -29,17 +28,23 @@ BEGIN {
        related6=0
        np=0
        p=0
-###AWK_useragent_2: useragent="\"bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)\""
+       ###AWK_useragent_2: useragent="\"bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)\""
        arr[0]=0
        arr2[0]=0
-###AWK_findpost_path:  findpost_path="/eizm/pro/ottmirror/findpost"
-###AWK_imgformat_path: imgformat_path="/eizm/pro/ottmirror/image"
-###AWK_wayback:        wayback="http://web.archive.org/web/"
-###AWK_fora:           fora="http://forums.xkcd.com"
-###AWK_wget:           wget=/usr/bin/wget
-###AWK_mkdir:          mv=/usr/bin/mkdir
-###AWK_mv:             mv=/usr/bin/mv
-###AWK_sleep:          mv=/usr/bin/sleep
+       ###AWK_findpost_path:  findpost_path  = "/eizm/pro/ottmirror/findpost"
+       ###AWK_imgformat_path: imgformat_path = "/eizm/pro/ottmirror/image"
+       ###AWK_wayback:        wayback        = "http://web.archive.org/web/"
+       ###AWK_fora:           fora           = "http://forums.xkcd.com"
+       ###AWK_wget:           wget           = /usr/bin/wget
+       ###AWK_mkdir:          mv             = /usr/bin/mkdir
+       ###AWK_mv:             mv             = /usr/bin/mv
+       ###AWK_sleep:          mv             = /usr/bin/sleep
+       ###AWK_cgi_attachment_path:             /ott/attachment
+       ###AWK_cgi_avatar_path:cgi_avatar_path= /ott/avatar
+       ###AWK_cgi_image_path: cgi_image_path = /ott/image
+       ###AWK_cgi_post_path:  cgi_post_path  = /ott/post
+       ###AWK_cgi_prosilver_path:              /ott/prosilver
+       ###AWK_cgi_view_path:  cgi_view_path  = /ott/cgi
        
        if (wait=="")
        {
@@ -352,7 +357,7 @@ BEGIN {
                # apply the prepared changes
                if (related==1)
                {
-                       printf("href=\"/ott/view") >> outfile
+                       printf("href=\""cgi_view_path) >> outfile
                        if(np>0)
                        {
                                printf("?np=%s",np) >> outfile
@@ -365,23 +370,23 @@ BEGIN {
                }
                else if (related2==1)
                {
-                       printf("%s/ott/prosilver%s",arr[1],arr[2]) >> outfile
+                       printf("%s"cgi_prosilver_path"%s",arr[1],arr[2]) >> outfile
                }
                else if (related5==1)
                {
-                       printf("%s/ott/prosilver/smilies%s",arr[1],arr[2]) >> outfile
+                       printf("%s"cgi_prosilver_path"smilies%s",arr[1],arr[2]) >> outfile
                }
                else if (related3==1)
                {
-                       printf("%s\"/ott/avatar/%s\"%s", arr[1],arr2[2],arr[3]) >> outfile
+                       printf("%s\""cgi_avatar_path"/%s\"%s", arr[1],arr2[2],arr[3]) >> outfile
                }
                else if (related4==1)
                {
-                       printf("%s\"/ott/attachment/%s\"\n",arr[1],arr2[2]) >> outfile
+                       printf("%s\""cgi_attachment_path"/%s\"\n",arr[1],arr2[2]) >> outfile
                }
                else if (related6==1)
                {
-                       printf("%s\"/ott/image/%s\"\n",arr[1],imgdir imgname) >>outfile
+                       printf("%s\""cgi_image_path"/%s\"\n",arr[1],imgdir imgname) >>outfile
                }
                else if(noquot != 0)
                {
@@ -402,7 +407,7 @@ BEGIN {
        {
                print "<ul class=\"profile-icons\" >" >> outfile
                print "<li class=\"quote-icon\" ><a title=\"Reply with quote\" href=\"" fora "/posting.php?mode=quote&amp;f=7&amp;p=" id "\" ></a></li>" >> outfile
-               print "<li class=\"quote-icon-mustard\" ><a title=\"Reply with quote\" href=\"/ott/post?q=p" id "\" ></a></li>" >> outfile
+               print "<li class=\"quote-icon-mustard\" ><a title=\"Reply with quote\" href=\""cgi_post_path"?q=p" id "\" ></a></li>" >> outfile
                print "</ul>" >> outfile
        }
 };
similarity index 98%
rename from www/ott/prosilver/template/editor.js
rename to editor.1.js
index ff4d0fd314c50a1f50495dc1fe8b14797fe27cce..23b7f01b0f2057d5dffd918eb522eb1b28c6517e 100644 (file)
@@ -388,7 +388,7 @@ function colorPalette(dir, width, height)
                        {
                                color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
                                document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
-                               document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="/ott/prosilver/imageset/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+                               document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="###cgi_path;/prosilver/imageset/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
                                document.writeln('</td>');
                        }
 
similarity index 88%
rename from www/ott/end
rename to end.1
index d925ac7788d6888940550a9b5da184660e11d431..a5fcc7eb1142a3bed7e22f0493829ea4337662b1 100644 (file)
+++ b/end.1
@@ -7,11 +7,11 @@
 <div class="topic-actions" >
 
 <div class="buttons" >
-<div class="mustardreply-icon" ><a href="/ott/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>
+<div class="mustardreply-icon" ><a href="###cgi_path;/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>
 <div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&amp;f=7&amp;t=101043" title="Post a reply" ><span></span>Post a reply</a></div>
 </div>
 <div class="search-box"> 
-<form method="get" action="/ott/view" >
+<form method="get" action="###cgi_path;/view" >
 <div>go to newpage:
 <input class="inputbox tiny np" type="text" name="np" size="6" /> 
 <input class="button2" type="submit" value="goto" /> 
@@ -26,7 +26,7 @@
 
 </div>
 <p></p><!-- <p><a href="http://forums.xkcd.com/index.php" class="left-box left" >Return to Board index</a></p> -->
-<form method="post" id="jumpbox" action="/ott/redirect" onsubmit="if(this.f.value == -1){return false;}" >
+<form method="post" id="jumpbox" action="###cgi_path;/redirect" onsubmit="if(this.f.value == -1){return false;}" >
 
 <fieldset class="jumpbox" >
 
@@ -34,7 +34,7 @@
 <select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }" >
 
 <option value="http://chirpingmustard.com" >Chirping Mustard (.com)</option>
-<option value="/ott" >------------------</option>
+<option value="###cgi_path;" >------------------</option>
 <option value="http://xkcd.com/1190" >the OTC</option>
 <option value="http://xkcd.mscha.org">&nbsp; &nbsp;mscha</option>
 <option value="http://geekwagon.net/projects/xkcd1190/" >&nbsp; &nbsp;geekwagon</option>
@@ -113,17 +113,17 @@ Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/">
        <div class="quotecontent">
                <div style="display: none;">
                        <ul>
-                               <li><a href="/ott/attachment">attachment</a></li>
-                               <li><a href="/ott/avatar">avatar</a></li>
-                               <li><a href="/ott/image">image</a></li>
-                               <li><a href="/ott/log">log</a></li>
-                               <li><a href="/ott/np">np</a></li>
-                               <li><a href="/ott/otterinf">otterinf</a></li>
-                               <li><a href="/ott/postlist">postlist</a></li>
-                               <li><a href="/ott/prosilver">prosilver</a></li>
-                               <li><a href="/ott/sig">sig</a></li>
-                               <li><a href="/ott/test">test</a></li>
-                               <li><a href="/ott/update.htm">update</a></li>
+                               <li><a href="###cgi_path;/attachment">attachment</a></li>
+                               <li><a href="###cgi_path;/avatar">avatar</a></li>
+                               <li><a href="###cgi_path;/image">image</a></li>
+                               <li><a href="###cgi_path;/log">log</a></li>
+                               <li><a href="###cgi_path;/np">np</a></li>
+                               <li><a href="###cgi_path;/otterinf">otterinf</a></li>
+                               <li><a href="###cgi_path;/postlist">postlist</a></li>
+                               <li><a href="###cgi_path;/prosilver">prosilver</a></li>
+                               <li><a href="###cgi_path;/sig">sig</a></li>
+                               <li><a href="###cgi_path;/test">test</a></li>
+                               <li><a href="###cgi_path;/update.htm">update</a></li>
                        </ul>
                </div>
        </div>
diff --git a/fix.pl b/fix.pl
deleted file mode 100644 (file)
index 5b0912d..0000000
--- a/fix.pl
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright (C) 2023 Balthasar Szczepański
-# bot2m.pl automatically generated from bot2m.1.pl
-
-# This file is part of OTT mirror.
-#
-# OTT mirror is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affreo General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# OTT mirror is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affreo General Public License for more details.
-# 
-# You should have received a copy of the GNU Affreo General Public License
-# along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.
-
-use strict;
-use utf8;
-use Encode::Locale ('decode_argv');
-use Encode ('encode', 'decode');
-
-use lib '/botm/lib/test-post';
-use botm_common (
-       'read_data_file', 'write_data_file',
-       'join_path', 'dir_path', 'make_temp_path',
-       'html_entity_decode',
-       'url_decode',
-       'merge_url',
-       'system_encoded'
-);
-use post_common (
-       'wget'
-);
-
-use constant MPOST_PATH => '/botm/data/ottmirror/mpost';
-# use constant BKUP_PATH => '!!!!!!!!!!!BKUPPPPP';
-use constant OWN_DOMAIN => '1190.bicyclesonthemoon.info';
-use constant WWW_IMG_PATH => '/botm/www/1190/ott/image';
-use constant IMG_URL => 'http://1190.bicyclesonthemoon.info/ott/image';
-use constant TMP_PATH => '/botm/tmp/ottmirror';
-use constant WAYBACK => 'http://web.archive.org/web/';
-use constant BIN_IMG_PATH => '/botm/bin/ottmirror/image';
-use constant MKDIR => '/usr/bin/mkdir';
-use constant MV => '/usr/bin/mv';
-use constant SENDPOST => '/botm/bin/post/sendpost';
-
-
-binmode STDIN,  ':encoding(console_in)';
-binmode STDOUT, ':encoding(console_out)';
-binmode STDERR, ':encoding(console_out)';
-decode_argv();
-
-my $dh;
-if (opendir $dh, encode('locale_fs', MPOST_PATH)) {
-       my @fl = readdir $dh;  # <-- encoding???
-       closedir $dh;
-       
-       foreach my $fn (@fl) {
-               if ($fn =~ /^[0-9]+$/) {
-                       my %post = read_data_file(join_path('/',MPOST_PATH,$fn), 'utf8');
-                       # my %bkup = read_data_file(join_path('/',BKUP_PATH,$fn), 'utf8');
-                       
-                       my $message = $post{'bb'};
-                       $message =~ s/<br\/>/\n/gs;
-                       $message = html_entity_decode($message);
-                       my $subject = url_decode($post{'subject'});
-                       my $password = url_decode($post{'password'});
-                       if ($subject eq $password) {
-                               $subject = ''
-                       }
-                       
-                       my $tmp_file = make_temp_path(TMP_PATH, 'bot2m.mpost.txt');
-                       
-                       my %new_post = ();
-                       $new_post{'content'} = $message;
-                       $new_post{'username'} = url_decode($post{'username'});
-                       $new_post{'password'}  = $password;
-                       if ($subject ne ''){
-                               $new_post{'subject'}  = $subject;
-                       }
-                       if ($post{'disable_bbcode'}) {
-                               $new_post{'bbcode'} = '0';
-                       }
-                       else {
-                               $new_post{'bbcode'} = '1';
-                       }
-                       if ($post{'disable_smilies'}) {
-                               $new_post{'smilies'} = '0';
-                       }
-                       else {
-                               $new_post{'smilies'} = '1';
-                       }
-                       if ($post{'disable_magic_url'}) {
-                               $new_post{'urls'} = '0';
-                       }
-                       else {
-                               $new_post{'urls'} = '1';
-                       }
-                       if ($post{'attach_sig'}) {
-                               $new_post{'signature'} = '1';
-                       }
-                       else {
-                               $new_post{'signature'} = '0';
-                       }
-                       if ($post{'notify'}) {
-                               $new_post{'notify'} = '1';
-                       }
-                       else {
-                               $new_post{'notify'} = '0';
-                       }
-                       write_data_file($tmp_file, 'utf8', 0, \%new_post);
-                       my $r = system_encoded(SENDPOST, (SENDPOST, '-v', '--mirror', '--edit=m'.$fn, $tmp_file));
-                       unlink $tmp_file;
-               }
-       }
-}
-
-sub save_img {
-       (my $url) = @_;
-       if ($url !~ /^https?:\/\//) {
-               return $url;
-       }
-       if ($url =~ ("^https?://".OWN_DOMAIN)) {
-               return $url;
-       }
-       
-       my $escaped = img_save_url($url);
-       my $path = join_path('/',WWW_IMG_PATH, $escaped);
-       my $new_url = merge_url(IMG_URL, $escaped);
-       
-       my $findpath = encode('locale_fs', $path.'.*');
-       if (my @gfp = glob($findpath)) {
-               print "Already saved $url\n";
-               return $new_url;
-       }
-       else {
-               print "not yet saved $findpath\n";
-               my $tmp_path = make_temp_path(TMP_PATH, 'bot2m.img.tmp');
-               my %wget_options = ('no-check-certificate' => 1);
-               my $r;
-               my $ext = '';
-               print "GET $url\n";
-               $r = wget($url, $tmp_path, \%wget_options);
-               if ($r != 0) {
-                       my $wayback_url =  join_path('/',WAYBACK, $url);
-                       print "GET $wayback_url\n";
-                       $r = wget($wayback_url, $tmp_path, \%wget_options,);
-                       if ($r != 0) {
-                               print "Failed to get $url\n";
-                               unlink $tmp_path;
-                               return $url;
-                       }
-               }
-               $r = system_encoded(BIN_IMG_PATH, (BIN_IMG_PATH, $tmp_path)) >> 8;
-               if ($r == 1) {
-                       $ext = '.gif';
-               }
-               elsif ($r == 2) {
-                       $ext = '.png';
-               }
-               elsif ($r == 3) {
-                       $ext = '.jpg';
-               }
-               elsif ($r == 4) {
-                       $ext = '.bmp';
-               }
-               else {
-                       print "unknown format\n";
-                       unlink $tmp_path;
-                       return $url;
-               }
-               $path .= $ext;
-               (my $dir, my $fn) = dir_path('/',$path);
-               
-               if ($dir ne '') {
-                       system_encoded(MKDIR, (MKDIR, '-p', $dir));
-               }
-               $r = system_encoded(MV, (MV, '-n', $tmp_path, $path));
-               
-               if ($r != 0) {
-                       print "Failed to mv $tmp_path $path\n";
-                       unlink $tmp_path;
-                       return $url;
-               }
-               print "SAVED $path\n";
-               unlink $tmp_path;
-               return $new_url;
-       }
-}
-
-sub img_save_url {
-       (my $url) = @_;
-       
-       my $escaped = '';
-       my $final = '';
-       
-       for my $i (0 .. length($url)-1) {
-               my $ch = substr($url, $i, 1);
-               if ($ch =~ /[A-Za-z0-9]/) {
-                       $escaped .= $ch;
-               }
-               else {
-                       $ch = encode('utf8', $ch);
-                       $ch =~ s/(.)/sprintf('_%02X',ord($1))/egs;
-                       $escaped .= $ch;
-               }
-       }
-       while (length($escaped) > 240) {
-               $final = join_path('/',$final, substr($escaped, 0, 200));
-               $escaped = substr($escaped, 200);
-       }
-       $final = join_path('/',$final, $escaped);
-       
-       return $final;
-}
similarity index 81%
rename from www/ott/info.htm
rename to info.1.htm
index 76e1bdd764d8cd8134e298a901fc0aa69db546ac..f0db2451c2b46db622c296e6e8b8628412d18645 100644 (file)
 
 // ]]>
 </script>
-<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
-<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
-<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
-<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
-<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
-<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
-<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<script type="text/javascript" src="###cgi_path;/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="###cgi_path;/prosilver/template/forum_fn.js" ></script>
+<link href="###cgi_path;/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="###cgi_path;/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="###cgi_path;/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="###cgi_path;/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="###cgi_path;/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
 <link rel="icon" type="image/png" href="/img/favicon.png"/>
 
 
@@ -96,8 +96,8 @@
 <div class="headerbar">
 <div class="inner"><span class="corners-top"><span></span></span>
 <div id="site-description">
-<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
-<h1>  <a href="/ott/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
+<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="###cgi_path;/botmlogo3.png" alt="" title="" />  </a> 
+<h1>  <a href="###cgi_path;/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
 </div>
 <div class="inner"><span class="corners-top"><span></span></span>
 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="###cgi_path;/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
 <!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
@@ -168,17 +168,17 @@ Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/">
        <div class="quotecontent">
                <div style="display: none;">
                        <ul>
-                               <li><a href="/ott/attachment">attachment</a></li>
-                               <li><a href="/ott/avatar">avatar</a></li>
-                               <li><a href="/ott/image">image</a></li>
-                               <li><a href="/ott/log">log</a></li>
-                               <li><a href="/ott/np">np</a></li>
-                               <li><a href="/ott/otterinf">otterinf</a></li>
-                               <li><a href="/ott/postlist">postlist</a></li>
-                               <li><a href="/ott/prosilver">prosilver</a></li>
-                               <li><a href="/ott/sig">sig</a></li>
-                               <li><a href="/ott/test">test</a></li>
-                               <li><a href="/ott/update.htm">update</a></li>
+                               <li><a href="###cgi_path;/attachment">attachment</a></li>
+                               <li><a href="###cgi_path;/avatar">avatar</a></li>
+                               <li><a href="###cgi_path;/image">image</a></li>
+                               <li><a href="###cgi_path;/log">log</a></li>
+                               <li><a href="###cgi_path;/np">np</a></li>
+                               <li><a href="###cgi_path;/otterinf">otterinf</a></li>
+                               <li><a href="###cgi_path;/postlist">postlist</a></li>
+                               <li><a href="###cgi_path;/prosilver">prosilver</a></li>
+                               <li><a href="###cgi_path;/sig">sig</a></li>
+                               <li><a href="###cgi_path;/test">test</a></li>
+                               <li><a href="###cgi_path;/update.htm">update</a></li>
                        </ul>
                </div>
        </div>
diff --git a/install.sh b/install.sh
new file mode 100755 (executable)
index 0000000..27f5a30
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+make clean
+make -B TARGET=release makefile
+make install
+make clean
index 29e570b351c8e504ea7d1b737f08d87b05e95e85..c6678fafbce75036fe6cac4f686809db72bf1107 100644 (file)
--- a/makefile
+++ b/makefile
@@ -18,9 +18,9 @@
 # along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.
 
 # TODO: create a debug target and make it default
-DEFAULT_TARGET = release
+DEFAULT_TARGET = debug
 ifndef TARGET
-TARGET    =release
+TARGET    =debug
 # when want to change target run this first:
 # make -B TARGET=target_name makefile
 endif
@@ -46,31 +46,32 @@ RM   =/usr/bin/rm
 CHMOD=/usr/bin/chmod
 SUDO =sudo
 
-BIN_PATH      = /botm/bin/ottmirror
-LOG_PATH      = /botm/log/ottmirror
-MEM_PATH      = /botm/data/ottmirror
-MEM_LIST_PATH = /botm/data/ottmirror/mlist
-MEM_POST_PATH = /botm/data/ottmirror/mpost
-MEM_OK_PATH   = /botm/data/ottmirror/mpost/ok
-MEM_PM_PATH   = /botm/data/ottmirror/mpost/pm
-MEM_FAIL_PATH = /botm/data/ottmirror/mpost/fail
-TMP_PATH      = /botm/tmp/ottmirror
-WWW_PATH      = /botm/www/1190/ott
-WWW_ATT_PATH  = /botm/www/1190/ott/attachment
-WWW_AV_PATH   = /botm/www/1190/ott/avatar
-WWW_IMG_PATH  = /botm/www/1190/ott/image
-WWW_INF_PATH  = /botm/www/1190/ott/otterinf
-WWW_LIST_PATH = /botm/www/1190/ott/postlist
-WWW_SIG_PATH  = /botm/www/1190/ott/sig
-WWW_SRC_PATH  = /botm/www/1190/ott/src
-WWW_UP_PATH   = /botm/www/1190/ott/np
-WWW_DESC_PATH = /botm/www/1190/ottmirror
-
-CONF = /botm/etc/www/conf/1190/ottmirror.conf
-CRON = /etc/cron.d/ottmirror
+BIN_PATH      = /botm/bin/test-ottmirror
+LOG_PATH      = /botm/log/test-ottmirror
+MEM_PATH      = /botm/data/test-ottmirror
+MEM_LIST_PATH = /botm/data/test-ottmirror/mlist
+MEM_POST_PATH = /botm/data/test-ottmirror/mpost
+MEM_OK_PATH   = /botm/data/test-ottmirror/mpost/ok
+MEM_PM_PATH   = /botm/data/test-ottmirror/mpost/pm
+MEM_FAIL_PATH = /botm/data/test-ottmirror/mpost/fail
+TMP_PATH      = /botm/tmp/test-ottmirror
+WWW_PATH      = /botm/www/1190/ottest
+WWW_ATT_PATH  = /botm/www/1190/ottest/attachment
+WWW_AV_PATH   = /botm/www/1190/ottest/avatar
+WWW_IMG_PATH  = /botm/www/1190/ottest/image
+WWW_INF_PATH  = /botm/www/1190/ottest/otterinf
+WWW_LIST_PATH = /botm/www/1190/ottest/postlist
+WWW_SIG_PATH  = /botm/www/1190/ottest/sig
+WWW_SRC_PATH  = /botm/www/1190/ottest/src
+WWW_UP_PATH   = /botm/www/1190/ottest/np
+WWW_DESC_PATH = /botm/www/1190/ottest/desc
+
+CONF = /botm/etc/www/conf/1190/test-ottmirror.conf
+CRON = /etc/cron.d/test-ottmirror
 
 # keep these 2 lists in the same order!:
 GENERATE_FROM=\
+bb2html.1.awk\
 bot2.1.awk\
 bot2.1.c\
 bot3.1.c\
@@ -78,19 +79,33 @@ findpost.1.c\
 index.1.awk\
 index.1.c\
 mpview.1.c\
+mview.1.awk\
 mview.1.c\
 ottmirror.1.conf\
 ottmirror.1.cron\
 pm.1.awk\
 post.1.awk\
 post.1.c\
+posted.1.awk\
 posted.1.c\
 preview.1.awk\
+redirect.1.c\
 update.1.c\
 view.1.awk\
 view.1.c\
-bot2m.1.pl
+bot2m.1.pl\
+info.1.htm\
+post.1.htm\
+update.1.htm\
+whymirror.1.htm\
+top.1\
+end.1\
+np.top.1\
+np.end.1\
+editor.1.js\
+style.php.1.css
 TO_GENERATE=\
+bb2html.awk\
 bot2.awk\
 bot2.c\
 bot3.c\
@@ -98,18 +113,31 @@ findpost.c\
 index.awk\
 index.c\
 mpview.c\
+mview.awk\
 mview.c\
 ottmirror.conf\
 ottmirror.cron\
 pm.awk\
 post.awk\
 post.c\
+posted.awk\
 posted.c\
 preview.awk\
+redirect.c\
 update.c\
 view.awk\
 view.c\
-bot2m.pl
+bot2m.pl\
+www/ott/info.htm\
+www/ott/post.htm\
+www/ott/update.htm\
+www/ott/whymirror.htm\
+www/ott/top\
+www/ott/end\
+www/ott/np/top\
+www/ott/np/end\
+www/ott/prosilver/template/editor.js\
+www/ott/prosilver/theme/style.php.css
 
 C=\
 bot2\
@@ -166,7 +194,7 @@ bot2m.pl
 
 SRC=\
 agpl.txt\
-bb2html.awk\
+bb2html.1.awk\
 bot2.1.awk\
 bot2.1.c\
 bot3.1.c\
index ab5c974ff5bf74f06dfd12ea2b2cea76691fbbd5..d3148d5ad7c1ee041c8113a23606e98da5223b90 100644 (file)
@@ -18,7 +18,7 @@
 # along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.
 
 # TODO: create a debug target and make it default
-DEFAULT_TARGET = release
+DEFAULT_TARGET = debug
 ifndef TARGET
 TARGET = $(DEFAULT_TARGET) ###MAKE_TARGET:
 # when want to change target run this first:
@@ -71,6 +71,7 @@ CONFIGURE_CMD = $(PERL) ./configure.pl $(CONFIGFILE)
 
 # keep these 2 lists in the same order!:
 GENERATE_FROM=\
+bb2html.1.awk\
 bot2.1.awk\
 bot2.1.c\
 bot3.1.c\
@@ -78,19 +79,33 @@ findpost.1.c\
 index.1.awk\
 index.1.c\
 mpview.1.c\
+mview.1.awk\
 mview.1.c\
 ottmirror.1.conf\
 ottmirror.1.cron\
 pm.1.awk\
 post.1.awk\
 post.1.c\
+posted.1.awk\
 posted.1.c\
 preview.1.awk\
+redirect.1.c\
 update.1.c\
 view.1.awk\
 view.1.c\
-bot2m.1.pl
+bot2m.1.pl\
+info.1.htm\
+post.1.htm\
+update.1.htm\
+whymirror.1.htm\
+top.1\
+end.1\
+np.top.1\
+np.end.1\
+editor.1.js\
+style.php.1.css
 TO_GENERATE=\
+bb2html.awk\
 bot2.awk\
 bot2.c\
 bot3.c\
@@ -98,18 +113,31 @@ findpost.c\
 index.awk\
 index.c\
 mpview.c\
+mview.awk\
 mview.c\
 ottmirror.conf\
 ottmirror.cron\
 pm.awk\
 post.awk\
 post.c\
+posted.awk\
 posted.c\
 preview.awk\
+redirect.c\
 update.c\
 view.awk\
 view.c\
-bot2m.pl
+bot2m.pl\
+www/ott/info.htm\
+www/ott/post.htm\
+www/ott/update.htm\
+www/ott/whymirror.htm\
+www/ott/top\
+www/ott/end\
+www/ott/np/top\
+www/ott/np/end\
+www/ott/prosilver/template/editor.js\
+www/ott/prosilver/theme/style.php.css
 
 C=\
 bot2\
@@ -166,7 +194,7 @@ bot2m.pl
 
 SRC=\
 agpl.txt\
-bb2html.awk\
+bb2html.1.awk\
 bot2.1.awk\
 bot2.1.c\
 bot3.1.c\
index 4a5f5a959d50cd68c2eb67104dd3b7aa42312089..ea571e0b39ffe3b096ccc3739b2dc7dc39624e6d 100644 (file)
@@ -1,8 +1,7 @@
 // OTT mirror
-// Copyright (C) 2014, 2022 Balthasar Szczepański
+// Copyright (C) 2014, 2022, 2024 Balthasar Szczepański
 // mpview.c automatically generated from mpview.1.c
 // view a post from the mirror.
-// 29.09.2022
 //
 // This file is part of OTT mirror.
 //
@@ -44,6 +43,8 @@
 // ###C_AWK_MVIEW:        #define AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
 // ###C_TEMP_PATH_MPVIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/mpview."
 
+// ###C_CGI_POSTED: #define CGI_POSTED "/ott/posted"
+
 #define N_STRBUF    256
 #define N_STRBUF_SH  32
 
@@ -124,7 +125,7 @@ int main(int argc, char **argv)
        sub=fork();
        if(sub==0)
        {
-               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\"/ott/posted\" >Posted from the ЯOЯЯIM TTO</a></h2>",NP_TOP_PATH,(char *)0);
+               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\""CGI_POSTED"\" >Posted from the ЯOЯЯIM TTO</a></h2>",NP_TOP_PATH,(char *)0);
                exit(r);
        }
        waitpid(sub,&r,0);
similarity index 60%
rename from mview.awk
rename to mview.1.awk
index 6141e1bb246f271181c077dbbd435998f80f49e7..186c8009935c8b35e2792e421884ff7f917682cd 100644 (file)
--- a/mview.awk
@@ -1,8 +1,7 @@
 # OTT mirror
-# Copyright (C) 2014 Balthasar Szczepański
-# mview.awk
+# Copyright (C) 2014, 2024 Balthasar Szczepański
+# mview.awk is automatically generated from mview.1.awk
 # view the contents of posts from the mirror.
-# 24.09.2014
 
 # This file is part of OTT mirror.
 #
 
 BEGIN{
        FS="="
+       ###AWK_cgi_mpview_path:    cgi_mpview_path    = /ott/mpview
+       ###AWK_cgi_mview_path:     cgi_mview_path     = /ott/mview
+       ###AWK_cgi_post_path:      cgi_post_path      = /ott/post
+       ###AWK_cgi_prosilver_path: cgi_prosilver_path = /ott/prosilver
 };
 {
        eq=index($0,"=")
@@ -30,12 +33,12 @@ END{
        print "<div id=\""cat argtab["timenumber"]"\" class=\"post bg"bg"\">"
        print "<div class=\"inner\"><span class=\"corners-top\"><span></span></span>"
        print "<div class=\"postbody\">"
-       print "<ul class=\"profile-icons\">"((s=="")?("<li class=\"edit-icon\"><a href=\"/ott/post?e="cat argtab["timenumber"]"\" title=\"Edit post\"><span>Edit post</span></a></li>"):"")"<li class=\"quote-icon-mustard\"><a href=\"/ott/post?q="cat argtab["timenumber"]"&attach_sig=on\" title=\"Reply with quote\"></a></li></ul>"
+       print "<ul class=\"profile-icons\">"((s=="")?("<li class=\"edit-icon\"><a href=\""chi_post_path"?e="cat argtab["timenumber"]"\" title=\"Edit post\"><span>Edit post</span></a></li>"):"")"<li class=\"quote-icon-mustard\"><a href=\""cgi_post_path"?q="cat argtab["timenumber"]"&attach_sig=on\" title=\"Reply with quote\"></a></li></ul>"
        print "<h3><a href=\""cat argtab["timenumber"]"\">"argtab["subject_h"]"</a></h3>"
        if(s=="")
-               print "<p class=\"author\"><a href=\"/ott/mview?np="np"&amp;p="argtab["timenumber"]"#"cat argtab["timenumber"]"\"><img src=\"/ott/prosilver/imageset/icon_post_target.gif\" alt=\"Post\" title=\"Post\" width=\"11\" height=\"9\"></a>by <strong><a href=\"#\">"argtab["username_h"]"</a></strong> » "argtab["timetext"]" </p>"
+               print "<p class=\"author\"><a href=\""cgi_mview_path"?np="np"&amp;p="argtab["timenumber"]"#"cat argtab["timenumber"]"\"><img src=\""cgi_prosilver_path"/imageset/icon_post_target.gif\" alt=\"Post\" title=\"Post\" width=\"11\" height=\"9\"></a>by <strong><a href=\"#\">"argtab["username_h"]"</a></strong> » "argtab["timetext"]" </p>"
        else
-               print "<p class=\"author\"><a href=\"/ott/mpview?v="cat argtab["timenumber"]"#"cat argtab["timenumber"]"\"><img src=\"/ott/prosilver/imageset/icon_post_target.gif\" alt=\"Post\" title=\"Post\" width=\"11\" height=\"9\"></a>by <strong><a href=\"#\">"argtab["username_h"]"</a></strong> » "argtab["timetext"]" </p>"
+               print "<p class=\"author\"><a href=\""cgi_mpview_path"?v="cat argtab["timenumber"]"#"cat argtab["timenumber"]"\"><img src=\""cgi_prosilver"/imageset/icon_post_target.gif\" alt=\"Post\" title=\"Post\" width=\"11\" height=\"9\"></a>by <strong><a href=\"#\">"argtab["username_h"]"</a></strong> » "argtab["timetext"]" </p>"
        print "<div class=\"content\">"((argtab["HTML"]!="")?argtab["HTML"]:argtab["BBHTML"])"</div>\n</div>"
        print "<dl class=\"postprofile\" id=\"profile"argtab["timenumber"]"\"><dt><a href=\"#\">"argtab["username_h"]"</a></dt></dl>"
        print "<div class=\"back2top\"><a href=\"#wrap\" class=\"top\" title=\"Top\">Top</a></div>\n<span class=\"corners-bottom\"><span></span></span></div>\n</div>"
index dcbcafbc9f6454db895a3a56552a6b118ac92834..591cddf403b53cf4b18a2c797634228d96b36600 100644 (file)
--- a/mview.1.c
+++ b/mview.1.c
@@ -1,8 +1,7 @@
 // OTT mirror
-// Copyright (C) 2014, 2022 Balthasar Szczepański
+// Copyright (C) 2014, 2022, 2024 Balthasar Szczepański
 // mview.c automatically generated from mview.1.c
 // view posts from the mirror.
-// 29.09.2022
 //
 // This file is part of OTT mirror.
 //
 #include <errno.h>
 #include <sys/wait.h>
 
-// ###C_RM_PATH:   #define RM_PATH "/bin/rm"
-// ###C_CAT_PATH:  #define CAT_PATH "/bin/cat"
+// ###C_RM_PATH:   #define RM_PATH   "/bin/rm"
+// ###C_CAT_PATH:  #define CAT_PATH  "/bin/cat"
 // ###C_MAWK_PATH: #define MAWK_PATH "/usr/bin/mawk"
 
 // ###C_NP_TOP_PATH: #define NP_TOP_PATH "/eizm/www/time/ott/np/top"
 // ###C_NP_END_PATH: #define NP_END_PATH "/eizm/www/time/ott/np/end"
-// ###C_INFO_PATH: #define INFO_PATH "/eizm/www/time/ott/info.htm"
-// ###C_POST_PATH_3: #define POST_PATH "/eizm/mem/ottmirror/mpost/"
-// ###C_LIST_PATH_3: #define LIST_PATH "/eizm/mem/ottmirror/mlist/"
-// ###C_LAST_PATH_3: #define LAST_PATH "/eizm/mem/ottmirror/mlist/last"
+// ###C_INFO_PATH:   #define INFO_PATH   "/eizm/www/time/ott/info.htm"
+// ###C_POST_PATH_3: #define POST_PATH   "/eizm/mem/ottmirror/mpost/"
+// ###C_LIST_PATH_3: #define LIST_PATH   "/eizm/mem/ottmirror/mlist/"
+// ###C_LAST_PATH_3: #define LAST_PATH   "/eizm/mem/ottmirror/mlist/last"
 
-// ###C_AWK_VIEW:        #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
+// ###C_AWK_VIEW:        #define AWK_VIEW  "/eizm/pro/ottmirror/view.awk"
 // ###C_AWK_MVIEW:       #define AWK_MVIEW "/eizm/pro/ottmirror/mview.awk"
 // ###C_TEMP_PATH_MVIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/mview."
 
+// ###C_CGI_:      #define CGI_      "/ott"
+// ###C_CGI_MVIEW: #define CGI_MVIEW "/ott/mview"
+// ###C_CGI_POST:  #define CGI_POST  "/ott/mview"
+
 #define N_STRBUF    256
 #define N_STRBUF_SHH 16
 
@@ -138,7 +141,7 @@ int main(int argc, char **argv)
        else
        {
                printf("Content-type: text/html\nStatus: 404 Not Found\n\n");
-               snprintf(path,N_STRBUF,"info=<p>There are no posts in this Otherthread.<br /><br /><a href=\"/ott/\">Return to the ЯOЯЯIM TTO</a></p>");
+               snprintf(path,N_STRBUF,"info=<p>There are no posts in this Otherthread.<br /><br /><a href=\""CGI_"/\">Return to the ЯOЯЯIM TTO</a></p>");
                
                fflush(stdout);
                sub=fork();
@@ -181,11 +184,11 @@ int main(int argc, char **argv)
        if(np>last)
                np=last;
        if(np<last)
-               snprintf(right,N_STRBUF,"right=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+               snprintf(right,N_STRBUF,"right=<a href=\\\""CGI_MVIEW"?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
        else
                snprintf(right,N_STRBUF,"%s","right=<!-- -->");
        if(np>1)
-               snprintf(left,N_STRBUF,"left=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+               snprintf(left,N_STRBUF,"left=<a href=\\\""CGI_MVIEW"?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
        else
                snprintf(left,N_STRBUF,"%s","left=<!-- -->");
        
@@ -200,18 +203,18 @@ int main(int argc, char **argv)
                fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a>  &bull; <span>",np,last);
                if(np>1)
                {
-                       fprintf(file,"<a href=\"/ott/mview?np=1\" >1</a>");
+                       fprintf(file,"<a href=\""CGI_MVIEW"?np=1\" >1</a>");
                        fprintf(file,(np>6)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
                }
                for(unsigned long i=((np>6)?((np<last)?(np-3):(np-4)):2);i<np;++i)
-                       fprintf(file,"<a href=\"/ott/mview?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+                       fprintf(file,"<a href=\""CGI_MVIEW"?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
                fprintf(file,"<strong>%lu</strong>",np);
                for(unsigned long i=np+1;i<=((np+6<=last)?((np==1)?(np+4):(np+3)):(last-1));++i)
-                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/mview?np=%lu\" >%lu</a>",i,i);
+                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\""CGI_MVIEW"?np=%lu\" >%lu</a>",i,i);
                if(np<last)
                {
                        fprintf(file,(np+6<=last)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
-                       fprintf(file,"<a href=\"/ott/mview?np=%lu\" >%lu</a>",last,last);
+                       fprintf(file,"<a href=\""CGI_MVIEW"?np=%lu\" >%lu</a>",last,last);
                }
                fprintf(file,"</span>\n</div>\n");
                fclose(file);
@@ -221,7 +224,7 @@ int main(int argc, char **argv)
        sub=fork();
        if(sub==0)
        {
-               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\"/ott/mview?np=1\" >Mustardtime Otherthread</a></h2>",NP_TOP_PATH,(char *)0);
+               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\""CGI_MVIEW"?np=1\" >Mustardtime Otherthread</a></h2>",NP_TOP_PATH,(char *)0);
                exit(r);
        }
        waitpid(sub,&r,0);
similarity index 87%
rename from www/ott/np/end
rename to np.end.1
index 57b3c1f2c5cdbb2dc95226848ec5667bd57b16a5..1db2f5fe2bc30839c1c2c7691b2e1756395bfa65 100644 (file)
+++ b/np.end.1
@@ -9,11 +9,11 @@
 <hr />\r
 <div class="topic-actions" >\r
 <div class="buttons" >\r
-<div class="mustardreply-icon" ><a href="/ott/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
+<div class="mustardreply-icon" ><a href="###cgi_path;/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
 <div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&amp;f=7&amp;t=101043" title="Post a reply" ><span></span>Post a reply</a></div>\r
 </div>\r
 <div class="search-box"> \r
-<form method="get" action="/ott/view" >\r
+<form method="get" action="###cgi_path;/view" >\r
 go to newpage:\r
 <input class="inputbox tiny np" type="text" name="np" size="6" /> \r
 <input class="button2" type="submit" value="goto" /> \r
@@ -22,7 +22,7 @@ go to newpage:
 ###links\r
 </div>\r
 <p></p><!-- <p><a href="http://forums.xkcd.com/viewforum.php?f=7" class="left-box left" >Return to Individual XKCD Comic Threads</a></p> -->\r
-<form method="post" id="jumpbox" action="/ott/redirect" onsubmit="if(this.f.value == -1){return false;}" >\r
+<form method="post" id="jumpbox" action="###cgi_path;/redirect" onsubmit="if(this.f.value == -1){return false;}" >\r
 \r
 <fieldset class="jumpbox" >\r
 \r
@@ -30,7 +30,7 @@ go to newpage:
 <select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }" >\r
 \r
 <option value="http://chirpingmustard.com" >Chirping Mustard (.com)</option>\r
-<option value="/ott" >------------------</option>\r
+<option value="###cgi_path;" >------------------</option>\r
 <option value="http://xkcd.com/1190" >the OTC</option>\r
 <option value="http://xkcd.mscha.org">&nbsp; &nbsp;mscha</option>\r
 <option value="http://geekwagon.net/projects/xkcd1190/" >&nbsp; &nbsp;geekwagon</option>\r
@@ -108,17 +108,17 @@ Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/">
        <div class="quotecontent">\r
                <div style="display: none;">\r
                        <ul>\r
-                               <li><a href="/ott/attachment">attachment</a></li>\r
-                               <li><a href="/ott/avatar">avatar</a></li>\r
-                               <li><a href="/ott/image">image</a></li>\r
-                               <li><a href="/ott/log">log</a></li>\r
-                               <li><a href="/ott/np">np</a></li>\r
-                               <li><a href="/ott/otterinf">otterinf</a></li>\r
-                               <li><a href="/ott/postlist">postlist</a></li>\r
-                               <li><a href="/ott/prosilver">prosilver</a></li>\r
-                               <li><a href="/ott/sig">sig</a></li>\r
-                               <li><a href="/ott/test">test</a></li>\r
-                               <li><a href="/ott/update.htm">update</a></li>\r
+                               <li><a href="###cgi_path;/attachment">attachment</a></li>\r
+                               <li><a href="###cgi_path;/avatar">avatar</a></li>\r
+                               <li><a href="###cgi_path;/image">image</a></li>\r
+                               <li><a href="###cgi_path;/log">log</a></li>\r
+                               <li><a href="###cgi_path;/np">np</a></li>\r
+                               <li><a href="###cgi_path;/otterinf">otterinf</a></li>\r
+                               <li><a href="###cgi_path;/postlist">postlist</a></li>\r
+                               <li><a href="###cgi_path;/prosilver">prosilver</a></li>\r
+                               <li><a href="###cgi_path;/sig">sig</a></li>\r
+                               <li><a href="###cgi_path;/test">test</a></li>\r
+                               <li><a href="###cgi_path;/update.htm">update</a></li>\r
                        </ul>\r
                </div>\r
        </div>\r
similarity index 81%
rename from www/ott/np/top
rename to np.top.1
index f2dfea00542c10209dfca684f79fa1246dba1cd1..cf448902bcfec455050e2f61bed5b37c120995fd 100644 (file)
+++ b/np.top.1
@@ -21,7 +21,7 @@ Modified by:
 var jump_page = 'Go to newpage:';\r
 var on_page = '0';\r
 var per_page = '40';\r
-var base_url = '/ott/view?f=7&amp;t=101043';\r
+var base_url = '###cgi_path;/view?f=7&amp;t=101043';\r
 var style_cookie = 'phpBBstyle';\r
 var style_cookie_settings = '; path=/';\r
 var onload_functions = new Array();\r
@@ -53,13 +53,13 @@ eval(onunload_functions[i]);
 };\r
 // ]]>\r
 </script>\r
-<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>\r
-<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>\r
-<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />\r
-<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />\r
-<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />\r
-<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />\r
-<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />\r
+<script type="text/javascript" src="###cgi_path;/prosilver/template/styleswitcher.js" ></script>\r
+<script type="text/javascript" src="###cgi_path;/prosilver/template/forum_fn.js" ></script>\r
+<link href="###cgi_path;/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />\r
+<link href="###cgi_path;/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />\r
+<link href="###cgi_path;/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />\r
+<link href="###cgi_path;/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />\r
+<link href="###cgi_path;/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />\r
 <link rel="icon" type="image/png" href="/img/favicon.png"/>\r
 \r
 </head>\r
@@ -70,8 +70,8 @@ eval(onunload_functions[i]);
 <div class="headerbar" >\r
 <div class="inner" ><span class="corners-top" ><span></span></span>\r
 <div id="site-description" >\r
-<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> \r
-<h1>  <a href="/ott/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> \r
+<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="###cgi_path;/botmlogo3.png" alt="" title="" />  </a> \r
+<h1>  <a href="###cgi_path;/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> \r
 <p>Redundant copy of the needle-pulled thing</p> \r
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> \r
 </div>\r
@@ -89,7 +89,7 @@ eval(onunload_functions[i]);
 <div class="navbar"> \r
 <div class="inner"> <span class="corners-top"> <span> </span> </span> \r
 <ul class="linklist navlinks"> \r
-<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> \r
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="###cgi_path;/"> ЯOЯЯIM TTO </a> </li> \r
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> \r
 <!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->\r
 </ul> \r
@@ -114,7 +114,7 @@ eval(onunload_functions[i]);
 </p>\r
 <div class="topic-actions" >\r
 <div class="buttons" >\r
-<div class="mustardreply-icon" ><a href="/ott/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
+<div class="mustardreply-icon" ><a href="###cgi_path;/post?attach_sig=on" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
 <div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&amp;f=7&amp;t=101043" title="Post a reply" ><span></span>Post a reply</a></div>\r
 </div>\r
 <div class="search-box" >\r
@@ -128,7 +128,7 @@ eval(onunload_functions[i]);
 </form>\r
 </div>\r
 <div class="search-box"> \r
-<form method="get" action="/ott/view" >\r
+<form method="get" action="###cgi_path;/view" >\r
 <div>go to newpage:\r
 <input class="inputbox tiny np" type="text" name="np" size="6" /> \r
 <input class="button2" type="submit" value="goto" />\r
index 125ff6da3dd646723e9d23047b7dfb8782b0e64d..442e12a4ac9ff2a5afa6b34d5e56e8dfd9439558 100644 (file)
@@ -1,6 +1,6 @@
 # The OTT mirror
 
-Alias /ott/log ###CONF_log;
+Alias ###CONF_cgi_log; ###CONF_log;
 <Directory ###CONF_log;>
        Require all granted
        Options Indexes
@@ -12,19 +12,20 @@ Alias /ott/log ###CONF_log;
        Options Indexes MultiViews
 </Directory>
 
-ScriptAlias /ott/index ###CONF_index;
-ScriptAlias /ott/mpview ###CONF_mpview;
-ScriptAlias /ott/mview ###CONF_mview;
-ScriptAlias /ott/post ###CONF_post;
-ScriptAlias /ott/posted ###CONF_posted;
-ScriptAlias /ott/redirect ###CONF_redirect;
-ScriptAlias /ott/update ###CONF_update;
-ScriptAlias /ott/view ###CONF_view;
-ScriptAliasMatch ^/ott/?$ ###CONF_index;
+ScriptAlias ###CONF_cgi_index;    ###CONF_bin_index;
+ScriptAlias ###CONF_cgi_mpview;   ###CONF_bin_mpview;
+ScriptAlias ###CONF_cgi_mview;    ###CONF_bin_mview;
+ScriptAlias ###CONF_cgi_post;     ###CONF_bin_post;
+ScriptAlias ###CONF_cgi_posted;   ###CONF_bin_posted;
+ScriptAlias ###CONF_cgi_redirect; ###CONF_bin_redirect;
+ScriptAlias ###CONF_cgi_update;   ###CONF_bin_update;
+ScriptAlias ###CONF_cgi_view;     ###CONF_bin_view;
+ScriptAliasMatch ^###CONF_cgi;/?$ ###CONF_bin_index;
 
 <Directory ###CONF_bin;>
        Require all granted
 </Directory>
 
 # legacy redirections
-Redirect permanent /ott/src http://bicyclesonthemoon.info/git-projects?p=ott/mirror;
+# TODO: no hardcode here
+Redirect permanent ###CONF_cgi_src; http://bicyclesonthemoon.info/git-projects?p=ott/mirror;
index 3ab643c20f83504ce5a6bd0ace3e3bbca4873589..a6ac4216c0eed4c49d03b15aafb0e3c7c053f07c 100644 (file)
--- a/post.1.c
+++ b/post.1.c
 // ###C_BOT3NAME_ENCODED: #define BOT3NAME_ENCODED "bothasar_p"
 // ###C_BOT3_URL: #define BOT3_URL "http://1190.bicyclesonthemoon.info/bothasar_p/"
 
+// ###C_CGI_:      #define CGI_      "/ott"
+// ###C_CGI_MVIEW: #define CGI_MVIEW "/ott/mview"
+// ###C_CGI_PROSILVER:               "/ott/prosilver"
+// ###C_CGI_POST:  #define CGI_POST  "/ott/post"
+
 #define N_STRBUF    256
 #define N_STRBUF_SH  32
 #define MIN_EDIT_TIME 5
@@ -386,30 +391,30 @@ void submit()
                if(tempfile!=NULL)
                {
                        fprintf(tempfile,"<li class=\"row bg2\" >\n");
-                       fprintf(tempfile,"<dl class=\"icon\" style=\"background-image: url(/ott/prosilver/imageset/topic_mustard.gif); background-repeat: no-repeat;\" >\n");
-                       fprintf(tempfile,"<dt title=\"No unread posts\" ><a href=\"/ott/mview\" class=\"topictitle\" >Mustardtime Otherthread</a>\n");
+                       fprintf(tempfile,"<dl class=\"icon\" style=\"background-image: url("CGI_PROSILVER"/imageset/topic_mustard.gif); background-repeat: no-repeat;\" >\n");
+                       fprintf(tempfile,"<dt title=\"No unread posts\" ><a href=\""CGI_MVIEW"\" class=\"topictitle\" >Mustardtime Otherthread</a>\n");
                        fprintf(tempfile,"<br />\nMustardtime posts will be shown here, before they are posted to the OTT.<br />\n");
                        fprintf(tempfile,"<strong class=\"pagination\" ><span>");
                        if(lastpage>5)
-                               fprintf(tempfile,"<a href=\"/ott/mview\" >1</a><span class=\"page-dots\" > ... </span>");
+                               fprintf(tempfile,"<a href=\""CGI_MVIEW"\" >1</a><span class=\"page-dots\" > ... </span>");
                        for(unsigned long i=((lastpage>5)?(lastpage-2):1);i<lastpage;++i)
-                               fprintf(tempfile,"<a href=\"/ott/mview?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
-                       fprintf(tempfile,"<a href=\"/ott/mview?np=%lu\" >%lu</a>",lastpage,lastpage);
-                       fprintf(tempfile,"</span></strong><img src=\"/ott/prosilver/imageset/icon_topic_attach.gif\" width=\"7\" height=\"10\" alt=\"Attachment(s)\" title=\"Attachment(s)\" /> by <a href=\"%s\" >%s</a> &raquo; Sat Apr 05, 2014 9:40 pm UTC</dt>\n", BOT3_URL, BOT3NAME_ENCODED);
+                               fprintf(tempfile,"<a href=\""CGI_MVIEW"?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+                       fprintf(tempfile,"<a href=\""CGI_MVIEW"?np=%lu\" >%lu</a>",lastpage,lastpage);
+                       fprintf(tempfile,"</span></strong><img src=\""CGI_PROSILVER"/imageset/icon_topic_attach.gif\" width=\"7\" height=\"10\" alt=\"Attachment(s)\" title=\"Attachment(s)\" /> by <a href=\"%s\" >%s</a> &raquo; Sat Apr 05, 2014 9:40 pm UTC</dt>\n", BOT3_URL, BOT3NAME_ENCODED);
                        fprintf(tempfile,"<dd class=\"posts\" >%lu <dfn>Replies</dfn></dd>\n",(unsigned long)((lastpage-1)*40+postslast));
                        fprintf(tempfile,"<dd class=\"views\" >NaN <dfn>Views</dfn></dd>\n");
                        fprintf(tempfile,"<dd class=\"lastpost\" ><span><dfn>Last post </dfn>by <a href=\"#\" >");
                        writeArgH(tempfile,username);
-                       fprintf(tempfile,"</a>\n<a href=\"/ott/mview?np=%lu&amp;p=%s#m%s\" ><img src=\"/ott/prosilver/imageset/icon_topic_latest.gif\" width=\"11\" height=\"9\" alt=\"View the latest post\" title=\"View the latest post\" /></a> <br />%s</span>\n",lastpage,timenumber,timenumber,timetext);
+                       fprintf(tempfile,"</a>\n<a href=\""CGI_MVIEW"?np=%lu&amp;p=%s#m%s\" ><img src=\""CGI_PROSILVER"/imageset/icon_topic_latest.gif\" width=\"11\" height=\"9\" alt=\"View the latest post\" title=\"View the latest post\" /></a> <br />%s</span>\n",lastpage,timenumber,timenumber,timetext);
                        fprintf(tempfile,"</dd>\n</dl>\n</li>\n");
                }
                fclose(tempfile);
-               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?np=%lu&amp;p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the ЯOЯЯIM TTO</a></p>",lastpage,timenumber,timenumber);
+               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\""CGI_MVIEW"?np=%lu&amp;p=%s#m%s\">View your submitted message</a><br /><br /><a href=\""CGI_"/\">Return to the ЯOЯЯIM TTO</a></p>",lastpage,timenumber,timenumber);
 
        }
        else
-               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the ЯOЯЯIM TTO</a></p>",timenumber,timenumber);
-       snprintf(arg2,N_STRBUF,"refresh=<meta http-equiv=\"refresh\" content=\"6; URL=/ott/mview?p=%s#m%s\" />",timenumber,timenumber);
+               snprintf(arg1,N_STRBUF,"info=<p>This message has been posted successfully.<br /><br /><a href=\""CGI_MVIEW"?p=%s#m%s\">View your submitted message</a><br /><br /><a href=\""CGI_"/\">Return to the ЯOЯЯIM TTO</a></p>",timenumber,timenumber);
+       snprintf(arg2,N_STRBUF,"refresh=<meta http-equiv=\"refresh\" content=\"6; URL="CGI_MVIEW"?p=%s#m%s\" />",timenumber,timenumber);
        
        printf("Content-type: text/html\n\n");
        fflush(stdout);
similarity index 81%
rename from www/ott/post.htm
rename to post.1.htm
index 166e0d8aef76d0941d967119558e80ea6d79990d..51e253406def000003fea879e59fd214fd8d218a 100644 (file)
 
 // ]]>
 </script>
-<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
-<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
-<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
-<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
-<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
-<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
-<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<script type="text/javascript" src="###cgi_path;/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="###cgi_path;/prosilver/template/forum_fn.js" ></script>
+<link href="###cgi_path;/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="###cgi_path;/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="###cgi_path;/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="###cgi_path;/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="###cgi_path;/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
 <link rel="icon" type="image/png" href="/img/favicon.png"/>
 
 
@@ -96,8 +96,8 @@
 <div class="headerbar">
 <div class="inner"><span class="corners-top"><span></span></span>
 <div id="site-description">
-<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
-<h1>  <a href="/ott/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
+<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="###cgi_path;/botmlogo3.png" alt="" title="" />  </a> 
+<h1>  <a href="###cgi_path;/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
 </div>
 <div class="inner"><span class="corners-top"><span></span></span>
 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="###cgi_path;/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
 <!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
 
 <h2>Post during mustardtime.</h2>
 
-<form id="postform" method="post" action="/ott/post" >
+<form id="postform" method="post" action="###cgi_path;/post" >
 
 ###HTML
 
 
 // ]]>
 </script>
-<script type="text/javascript" src="/ott/prosilver/template/editor.js"></script>
+<script type="text/javascript" src="###cgi_path;/prosilver/template/editor.js"></script>
 <div id="colour_palette" style="display: none;">
        <dl style="clear: left;">
                <dt><label>Font colour:</label></dt>
                
                        <strong>Smilies</strong><br />
                        
-                               <a href="#" onclick="insert_text(':D', true); return false;"><img src="/ott/prosilver/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy" /></a>
+                               <a href="#" onclick="insert_text(':D', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy" /></a>
                        
-                               <a href="#" onclick="insert_text(':)', true); return false;"><img src="/ott/prosilver/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile" /></a>
+                               <a href="#" onclick="insert_text(':)', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile" /></a>
                        
-                               <a href="#" onclick="insert_text(':(', true); return false;"><img src="/ott/prosilver/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad" /></a>
+                               <a href="#" onclick="insert_text(':(', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad" /></a>
                        
-                               <a href="#" onclick="insert_text(':o', true); return false;"><img src="/ott/prosilver/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised" /></a>
+                               <a href="#" onclick="insert_text(':o', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised" /></a>
                        
-                               <a href="#" onclick="insert_text(':shock:', true); return false;"><img src="/ott/prosilver/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked" /></a>
+                               <a href="#" onclick="insert_text(':shock:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked" /></a>
                        
-                               <a href="#" onclick="insert_text(':?', true); return false;"><img src="/ott/prosilver/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused" /></a>
+                               <a href="#" onclick="insert_text(':?', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused" /></a>
                        
-                               <a href="#" onclick="insert_text('8-)', true); return false;"><img src="/ott/prosilver/smilies/icon_cool.gif" width="15" height="15" alt="8-)" title="Cool" /></a>
+                               <a href="#" onclick="insert_text('8-)', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_cool.gif" width="15" height="15" alt="8-)" title="Cool" /></a>
                        
-                               <a href="#" onclick="insert_text(':lol:', true); return false;"><img src="/ott/prosilver/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing" /></a>
+                               <a href="#" onclick="insert_text(':lol:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing" /></a>
                        
-                               <a href="#" onclick="insert_text(':x', true); return false;"><img src="/ott/prosilver/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad" /></a>
+                               <a href="#" onclick="insert_text(':x', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad" /></a>
                        
-                               <a href="#" onclick="insert_text(':P', true); return false;"><img src="/ott/prosilver/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz" /></a>
+                               <a href="#" onclick="insert_text(':P', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz" /></a>
                        
-                               <a href="#" onclick="insert_text(':oops:', true); return false;"><img src="/ott/prosilver/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed" /></a>
+                               <a href="#" onclick="insert_text(':oops:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed" /></a>
                        
-                               <a href="#" onclick="insert_text(':cry:', true); return false;"><img src="/ott/prosilver/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad" /></a>
+                               <a href="#" onclick="insert_text(':cry:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad" /></a>
                        
-                               <a href="#" onclick="insert_text(':evil:', true); return false;"><img src="/ott/prosilver/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad" /></a>
+                               <a href="#" onclick="insert_text(':evil:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad" /></a>
                        
-                               <a href="#" onclick="insert_text(':twisted:', true); return false;"><img src="/ott/prosilver/smilies/icon_twisted.gif" width="15" height="15" alt=":twisted:" title="Twisted Evil" /></a>
+                               <a href="#" onclick="insert_text(':twisted:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_twisted.gif" width="15" height="15" alt=":twisted:" title="Twisted Evil" /></a>
                        
-                               <a href="#" onclick="insert_text(':roll:', true); return false;"><img src="/ott/prosilver/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes" /></a>
+                               <a href="#" onclick="insert_text(':roll:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes" /></a>
                        
-                               <a href="#" onclick="insert_text(':wink:', true); return false;"><img src="/ott/prosilver/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink" /></a>
+                               <a href="#" onclick="insert_text(':wink:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink" /></a>
                        
-                               <a href="#" onclick="insert_text(':!:', true); return false;"><img src="/ott/prosilver/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation" /></a>
+                               <a href="#" onclick="insert_text(':!:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation" /></a>
                        
-                               <a href="#" onclick="insert_text(':?:', true); return false;"><img src="/ott/prosilver/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question" /></a>
+                               <a href="#" onclick="insert_text(':?:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question" /></a>
                        
-                               <a href="#" onclick="insert_text(':idea:', true); return false;"><img src="/ott/prosilver/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea" /></a>
+                               <a href="#" onclick="insert_text(':idea:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea" /></a>
                        
-                               <a href="#" onclick="insert_text(':arrow:', true); return false;"><img src="/ott/prosilver/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow" /></a>
+                               <a href="#" onclick="insert_text(':arrow:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow" /></a>
                        
-                               <a href="#" onclick="insert_text(':|', true); return false;"><img src="/ott/prosilver/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral" /></a>
+                               <a href="#" onclick="insert_text(':|', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral" /></a>
                        
-                               <a href="#" onclick="insert_text(':mrgreen:', true); return false;"><img src="/ott/prosilver/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green" /></a>
+                               <a href="#" onclick="insert_text(':mrgreen:', true); return false;"><img src="###cgi_path;/prosilver/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green" /></a>
                        
                <!-- <a href="./faq.php?mode=bbcode">BBCode</a> is <em>ON</em><br />
                
@@ -497,17 +497,17 @@ Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/">
        <div class="quotecontent">
                <div style="display: none;">
                        <ul>
-                               <li><a href="/ott/attachment">attachment</a></li>
-                               <li><a href="/ott/avatar">avatar</a></li>
-                               <li><a href="/ott/image">image</a></li>
-                               <li><a href="/ott/log">log</a></li>
-                               <li><a href="/ott/np">np</a></li>
-                               <li><a href="/ott/otterinf">otterinf</a></li>
-                               <li><a href="/ott/postlist">postlist</a></li>
-                               <li><a href="/ott/prosilver">prosilver</a></li>
-                               <li><a href="/ott/sig">sig</a></li>
-                               <li><a href="/ott/test">test</a></li>
-                               <li><a href="/ott/update.htm">update</a></li>
+                               <li><a href="###cgi_path;/attachment">attachment</a></li>
+                               <li><a href="###cgi_path;/avatar">avatar</a></li>
+                               <li><a href="###cgi_path;/image">image</a></li>
+                               <li><a href="###cgi_path;/log">log</a></li>
+                               <li><a href="###cgi_path;/np">np</a></li>
+                               <li><a href="###cgi_path;/otterinf">otterinf</a></li>
+                               <li><a href="###cgi_path;/postlist">postlist</a></li>
+                               <li><a href="###cgi_path;/prosilver">prosilver</a></li>
+                               <li><a href="###cgi_path;/sig">sig</a></li>
+                               <li><a href="###cgi_path;/test">test</a></li>
+                               <li><a href="###cgi_path;/update.htm">update</a></li>
                        </ul>
                </div>
        </div>
similarity index 67%
rename from posted.awk
rename to posted.1.awk
index 9e3318242df9ec34fea72c4aa53719039c20913a..0dd36cec1249f0d1a64a3a55f2e144fad9fc3225 100644 (file)
@@ -1,8 +1,7 @@
 # OTT mirror\r
-# Copyright (C) 2014 Balthasar Szczepański\r
-# posted.awk\r
+# Copyright (C) 2014, 2024 Balthasar Szczepański\r
+# posted.awk is automatically generated from posted.1.awk\r
 # one post recently sent from the mirror\r
-#  2.08.2014\r
 \r
 # This file is part of OTT mirror.\r
 #\r
@@ -21,6 +20,8 @@
 \r
 BEGIN{\r
        FS="="\r
+       ###AWK_cgi_mpview_path: cgi_mpview_path = /ott/mpview\r
+       ###AWK_cgi_post_path:   cgi_post_path   = /ott/post\r
 };\r
 {\r
        eq=index($0,"=")\r
@@ -32,5 +33,5 @@ END{
        else\r
                class="plv"\r
        \r
-       print "<tr class=\""class"\"><td class=\"plk\">"argtab["timetext"]"</td><td class=\"plk\">"argtab["username_h"]"</td><td class=\"plk\">"argtab["subject_h"]"</td><td class=\"plk\"><a href=\"/ott/mpview?v="cat argtab["timenumber"]"\">view</a> <a href=\"/ott/post?q="cat argtab["timenumber"]"&amp;attach_sig=on\">quote</a></td></tr>"\r
+       print "<tr class=\""class"\"><td class=\"plk\">"argtab["timetext"]"</td><td class=\"plk\">"argtab["username_h"]"</td><td class=\"plk\">"argtab["subject_h"]"</td><td class=\"plk\"><a href=\""cgi_mpview_path"?v="cat argtab["timenumber"]"\">view</a> <a href=\""cgi_post_path"?q="cat argtab["timenumber"]"&amp;attach_sig=on\">quote</a></td></tr>"\r
 }
\ No newline at end of file
index 7643708728e42fef72c31ea4ee093573a8849153..ed5f2c15487abaa51bc622697c113001c28c4af2 100644 (file)
@@ -1,5 +1,5 @@
 // OTT mirror\r
-// Copyright (C) 2014, 2022, 2023 Balthasar Szczepański\r
+// Copyright (C) 2014, 2022, 2023, 2024 Balthasar Szczepański\r
 // posted.c automatically generated from posted.1.c\r
 // posts recently sent from the mirror.\r
 //\r
@@ -35,6 +35,8 @@
 // ###C_MAWK_PATH:        #define MAWK_PATH  "/usr/bin/mawk"\r
 // ###C_AWK_POSTED:       #define AWK_POSTED "/eizm/pro/ottmirror/posted.awk"\r
 \r
+// ###C_CGI_: #define CGI_      "/ott"\r
+\r
 // ###C_OWN_DOMAIN_ENCODED: #define "1190.bicyclesonthemoon.info"\r
 \r
 #define N_STRBUF    256\r
@@ -199,7 +201,7 @@ int main(int argc, char **argv)
                \r
                printf("</table><br>\n");\r
        }\r
-       printf("<a href=\"/ott\">back to the ЯOЯЯIM TTO</a><br><br>\n");\r
+       printf("<a href=\""CGI_"\">back to the ЯOЯЯIM TTO</a><br><br>\n");\r
        printf("<a href=\"/\">%s</a></body></html>\n", OWN_DOMAIN_ENCODED);\r
        \r
        fflush(stdout);\r
similarity index 85%
rename from redirect.c
rename to redirect.1.c
index a3fb23009ea95b84ff9a375cd7437718cf82906e..d85c067a03e00e862d40fa80f0bddf5c098b476b 100644 (file)
@@ -1,7 +1,7 @@
 // OTT mirror\r
 // Copyright (C) 2014, 2024 Balthasar Szczepański\r
-// redirect.c\r
-// redirect srevice for the "Jump to:" list.\r
+// redirect.c is automaticaly generated from redirect.1.c\r
+// redirect service for the "Jump to:" list.\r
 //\r
 // This file is part of OTT mirror.\r
 //\r
@@ -18,6 +18,8 @@
 // You should have received a copy of the GNU Affreo General Public License\r
 // along with OTT mirror. If not, see <http://www.gnu.org/licenses/>.\r
 \r
+// ###C_CGI_: #define CGI_ "/ott"\r
+\r
 #include <cgi.h>\r
 #include <stdio.h>\r
 #include <string.h>\r
@@ -38,7 +40,7 @@ int main(int argc, char **argv, char **env)
        }\r
        \r
        if (post) {\r
-               cgiRedirect(f?f:"/ott");\r
+               cgiRedirect(f?f:CGI_);\r
        }\r
        else {\r
                printf("Status: 405 Method Not Allowed\n");\r
diff --git a/settings-debug.txt b/settings-debug.txt
new file mode 100644 (file)
index 0000000..175d767
--- /dev/null
@@ -0,0 +1,85 @@
+# Name must be unique, not shared with other projects / targets.
+# otherwise config files will collide
+name: test-ottmirror
+
+# target name. settings file (THIS FILE) is "settings-TARGET_NAME.txt"
+# where TARGET_NAME is the value
+target: debug
+
+
+useragent2: bothasar_t (http://1190.bicyclesonthemoon.info/otttest/; Time thread mirror bot)
+useragent3: bothasar_p (http://1190.bicyclesonthemoon.info/otttest/; Time thread post bot)
+
+postlib_path: /botm/lib/post
+
+bin_path     : /botm/bin/test-ottmirror
+cgi_path     : /ottest
+conf_path    : /botm/etc/www/conf/1190
+cron_path    : /etc/cron.d
+log_path     : /botm/log/test-ottmirror
+mem_path     : /botm/data/test-ottmirror
+tmp_path     : /botm/tmp/test-ottmirror
+www_path     : /botm/www/1190/ottest
+www_desc_path: /botm/www/1190/ottest/desc
+
+ict_addr    : http://forums.xkcd.com/viewforum.php?f=7
+ott_addr    : http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=
+fora_addr   : http://forums.xkcd.com
+wayback_addr: http://web.archive.org/web/
+
+thread_id: 101043
+links_regexp     : href=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/viewtopic\.php
+prosilver_regexp : ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/styles\/prosilver
+prosilver_regexp2: ((\.)|(http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/styles\/prosilver
+smiley_regexp    : ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
+smiley_regexp2   : ((\.)|(http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
+avatar_regexp    : ((src)|(href))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/download\/file.php\?avatar=
+attachment_regexp: ((src)|(href))=.http:\/\/(www\.)?((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/download\/file.php\?(mode=view\&amp;)?id=
+own_image_regexp : ((1190.bicyclesonthemoon.(dnsd.)?info)|(1190-botm.dnsdynamic.com))\/ott\/image\/
+
+own_domain     : 1190.bicyclesonthemoon.info
+own_url        : http://1190.bicyclesonthemoon.info/ott
+bot3name       : bothasar_p
+bot3_url       : http://1190.bicyclesonthemoon.info/bothasar_p/
+default_subject: Re: 1190: "Time"
+
+sendpost: /botm/bin/post/sendpost
+
+awk  : /usr/bin/mawk
+cat  : /usr/bin/cat
+chmod: /usr/bin/chmod
+cp   : /usr/bin/cp
+ls   : /usr/bin/ls
+mkdir: /usr/bin/mkdir
+mv   : /usr/bin/mv
+perl : /usr/bin/perl
+rm   : /usr/bin/rm
+sleep: /usr/bin/sleep
+sudo : sudo
+wget : /usr/bin/wget
+
+CC   : gcc
+CF   : -g -Wall -Wno-format-truncation
+L_CGI: -lcgi
+
+
+# "#" in schedule to disable
+cron_user: b
+
+cron_blitz_schedule: ###2,17,32,47 * * * *
+cron_blitz_options: -o0 -m15 -w9 -d -a -b
+
+cron_past_reketchup_schedule: #23 * * * *
+cron_past_reketchup_options: -o0 -m3 -p2 -w9 -v5 -d -a -b
+
+cron_present_ketchup_schedule: #20,50 * * * *
+cron_present_ketchup_options: -r -o1 -m5 -w9 -v5 -d -a
+
+cron_present_reketchup_schedule: #26 23 * * *
+cron_present_reketchup_options: -r -o5 -m10 -p2 -w9 -v5 -d -a -b
+
+cron_mustard_post_schedule: #26 23 * * *
+
+cron_mustard_reketchup_schedule: 32 4 * * *
+
+cron_log_relocation_schedule: 0 0 * * 1
index b35de8bd0698f12b56f20e2eddb6d0142fadb18e..f2f6e5cc7ae2af8bd19a276901a96c12a47553b8 100644 (file)
@@ -12,54 +12,54 @@ useragent3: bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread pos
 
 postlib_path: /botm/lib/post
 
-bin_path: /botm/bin/ottmirror
-conf_path: /botm/etc/www/conf/1190
-cron_path: /etc/cron.d
-log_path: /botm/log/ottmirror
-mem_path: /botm/data/ottmirror
-src_path: /botm/src/ottmirror
-tmp_path: /botm/tmp/ottmirror
-www_path: /botm/www/1190/ott
+bin_path     : /botm/bin/ottmirror
+cgi_path     : /ott
+conf_path    : /botm/etc/www/conf/1190
+cron_path    : /etc/cron.d
+log_path     : /botm/log/ottmirror
+mem_path     : /botm/data/ottmirror
+tmp_path     : /botm/tmp/ottmirror
+www_path     : /botm/www/1190/ott
 www_desc_path: /botm/www/1190/ottmirror
 
-ict_addr: http://forums.xkcd.com/viewforum.php?f=7
-ott_addr: http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=
-fora_addr: http://forums.xkcd.com
+ict_addr    : http://forums.xkcd.com/viewforum.php?f=7
+ott_addr    : http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=
+fora_addr   : http://forums.xkcd.com
 wayback_addr: http://web.archive.org/web/
 
 thread_id: 101043
-links_regexp: href=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/viewtopic\.php
-prosilver_regexp: ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/styles\/prosilver
+links_regexp     : href=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/viewtopic\.php
+prosilver_regexp : ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/styles\/prosilver
 prosilver_regexp2: ((\.)|(http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/styles\/prosilver
-smiley_regexp: ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
-smiley_regexp2: ((\.)|(http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
-avatar_regexp: ((src)|(href))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/download\/file.php\?avatar=
+smiley_regexp    : ((url.\.)|(((href)|(src))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
+smiley_regexp2   : ((\.)|(http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)))\/images\/smilies
+avatar_regexp    : ((src)|(href))=.http:\/\/((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/download\/file.php\?avatar=
 attachment_regexp: ((src)|(href))=.http:\/\/(www\.)?((for(ums3?|a)\.xkcd\.com)|echochamber\.me)\/download\/file.php\?(mode=view\&amp;)?id=
-own_image_regexp: ((1190.bicyclesonthemoon.(dnsd.)?info)|(1190-botm.dnsdynamic.com))\/ott\/image\/
+own_image_regexp : ((1190.bicyclesonthemoon.(dnsd.)?info)|(1190-botm.dnsdynamic.com))\/ott\/image\/
 
-own_domain: 1190.bicyclesonthemoon.info
-own_url: http://1190.bicyclesonthemoon.info/ott
-bot3name: bothasar_p
-bot3_url: http://1190.bicyclesonthemoon.info/bothasar_p/
+own_domain     : 1190.bicyclesonthemoon.info
+own_url        : http://1190.bicyclesonthemoon.info/ott
+bot3name       : bothasar_p
+bot3_url       : http://1190.bicyclesonthemoon.info/bothasar_p/
 default_subject: Re: 1190: "Time"
 
 sendpost: /botm/bin/post/sendpost
 
-awk: /usr/bin/mawk
-cat: /usr/bin/cat
+awk  : /usr/bin/mawk
+cat  : /usr/bin/cat
 chmod: /usr/bin/chmod
-cp: /usr/bin/cp
-ls: /usr/bin/ls
+cp   : /usr/bin/cp
+ls   : /usr/bin/ls
 mkdir: /usr/bin/mkdir
-mv: /usr/bin/mv
-perl: /usr/bin/perl
-rm: /usr/bin/rm
+mv   : /usr/bin/mv
+perl : /usr/bin/perl
+rm   : /usr/bin/rm
 sleep: /usr/bin/sleep
-sudo: sudo
-wget: /usr/bin/wget
+sudo : sudo
+wget : /usr/bin/wget
 
-CC: gcc
-CF: -g -Wall -Wno-format-truncation
+CC   : gcc
+CF   : -g -Wall -Wno-format-truncation
 L_CGI: -lcgi
 
 
@@ -80,6 +80,6 @@ cron_present_reketchup_options: -r -o5 -m10 -p2 -w9 -v5 -d -a -b
 
 cron_mustard_post_schedule: #26 23 * * *
 
-cron_mustard_reketchup_schedule: 32 4 * * *
+cron_mustard_reketchup_schedule: #32 4 * * *
 
 cron_log_relocation_schedule: 0 0 * * 1
index 847fb68bda444ef8af48127289f54fc652886f40..71fe976bac7e1b3ea7f57d06ef907fbc85ef54a5 100644 (file)
@@ -1,5 +1,5 @@
 # OTT mirror
-# Copyright (C) 2022, 2023 Balthasar Szczepański
+# Copyright (C) 2022, 2023, 2024 Balthasar Szczepański
 # settings.txt
 
 # This file is part of OTT mirror.
@@ -60,6 +60,22 @@ _bin_redirect_path   = @_PATH($bin_path, redirect)
 _bin_update_path     = @_PATH($bin_path, update)
 _bin_view_path       = @_PATH($bin_path, view)
 
+_cgi_attachment_path = @_PATH($cgi_path, attachment)
+_cgi_avatar_path     = @_PATH($cgi_path, avatar)
+_cgi_image_path      = @_PATH($cgi_path, image)
+_cgi_index_path      = @_PATH($cgi_path, index)
+_cgi_log_path        = @_PATH($cgi_path, log)
+_cgi_mpview_path     = @_PATH($cgi_path, mpview)
+_cgi_mview_path      = @_PATH($cgi_path, mview)
+_cgi_post_path       = @_PATH($cgi_path, post)
+_cgi_posted_path     = @_PATH($cgi_path, posted)
+_cgi_prosilver_path  = @_PATH($cgi_path, prosilver)
+_cgi_redirect_path   = @_PATH($cgi_path, redirect)
+_cgi_src_path        = @_PATH($cgi_path, src)
+_cgi_update_path     = @_PATH($cgi_path, update)
+_cgi_update_htm_path = @_PATH($cgi_path, update.htm)
+_cgi_view_path       = @_PATH($cgi_path, view)
+
 _url_img             = @_PATH($own_url, image)
 
 _conf_path = @_PATH($conf_path, $name\.conf)
@@ -166,18 +182,29 @@ MAKE_WWW_UP_PATH   = WWW_UP_PATH   = $_www_up_path
 MAKE_WWW_DESC_PATH = WWW_DESC_PATH = $www_desc_path
 
 
-CONF_log      = $log_path
-CONF_bin      = $bin_path
-CONF_index    = $_bin_index_path
-CONF_mpview   = $_bin_mpview_path
-CONF_mview    = $_bin_mview_path
-CONF_post     = $_bin_post_path
-CONF_posted   = $_bin_posted_path
-CONF_redirect = $_bin_redirect_path
-CONF_update   = $_bin_update_path
-CONF_view     = $_bin_view_path
-#CONF_att      = $_www_att_path
-CONF_www      = $www_path
+CONF_log         = $log_path
+CONF_bin         = $bin_path
+CONF_bin_index   = $_bin_index_path
+CONF_bin_mpview  = $_bin_mpview_path
+CONF_bin_mview   = $_bin_mview_path
+CONF_bin_post    = $_bin_post_path
+CONF_bin_posted  = $_bin_posted_path
+CONF_bin_redirect= $_bin_redirect_path
+CONF_bin_update  = $_bin_update_path
+CONF_bin_view    = $_bin_view_path
+CONF_cgi         = $cgi_path
+CONF_cgi_index   = $_cgi_index_path
+CONF_cgi_log     = $_cgi_log_path
+CONF_cgi_mpview  = $_cgi_mpview_path
+CONF_cgi_mview   = $_cgi_mview_path
+CONF_cgi_post    = $_cgi_post_path
+CONF_cgi_posted  = $_cgi_posted_path
+CONF_cgi_redirect= $_cgi_redirect_path
+CONF_cgi_src     = $_cgi_src_path
+CONF_cgi_update  = $_cgi_update_path
+CONF_cgi_view    = $_cgi_view_path
+#CONF_att        = $_www_att_path
+CONF_www         = $www_path
 
 
 AWK_cat            = \t@_AWK_DEFINE_STR(cat,            $cat)
@@ -209,6 +236,16 @@ AWK_smiley_regexp     = /$smiley_regexp/
 AWK_smiley_regexp2    = /$smiley_regexp2/
 AWK_thread_id         = @_ESCAPE($thread_id)
 
+AWK_cgi_path            =\t@_AWK_DEFINE_STR(cgi_path           , $cgi_path)
+AWK_cgi_attachment_path =\t@_AWK_DEFINE_STR(cgi_attachment_path, $_cgi_attachment_path)
+AWK_cgi_avatar_path     =\t@_AWK_DEFINE_STR(cgi_avatar_path    , $_cgi_avatar_path)
+AWK_cgi_image_path      =\t@_AWK_DEFINE_STR(cgi_image_path     , $_cgi_image_path)
+AWK_cgi_mpview_path     =\t@_AWK_DEFINE_STR(cgi_mpview_path    , $_cgi_mpview_path)
+AWK_cgi_mview_path      =\t@_AWK_DEFINE_STR(cgi_mview_path     , $_cgi_mview_path)
+AWK_cgi_post_path       =\t@_AWK_DEFINE_STR(cgi_post_path      , $_cgi_post_path)
+AWK_cgi_prosilver_path  =\t@_AWK_DEFINE_STR(cgi_prosilver_path , $_cgi_prosilver_path)
+AWK_cgi_view_path       =\t@_AWK_DEFINE_STR(cgi_view           , $_cgi_view_path)
+
 # data
 C_BOT3NAME_ENCODED   = @_C_DEFINE_STR(BOT3NAME_ENCODED,   $_bot3name_encoded)
 C_OWN_DOMAIN_ENCODED = @_C_DEFINE_STR(OWN_DOMAIN_ENCODED, $_own_domain_encoded)
@@ -302,6 +339,16 @@ C_AWK_VERIFY  = @_C_DEFINE_STR(AWK_VERIFY,  $_bin_awk_verify_path)
 C_AWK_VIEW    = @_C_DEFINE_STR(AWK_VIEW,    $_bin_awk_view_path)
 C_BOT_PATH_2  = @_C_DEFINE_STR(BOT_PATH,    $bin_bot2_path)
 
+# cgi
+C_CGI_          = @_C_DEFINE_STR(CGI_          , $cgi_path)
+C_CGI_MVIEW     = @_C_DEFINE_STR(CGI_MVIEW     , $_cgi_mview_path)
+C_CGI_PROSILVER = @_C_DEFINE_STR(CGI_PROSILVER , $_cgi_prosilver_path)
+C_CGI_POST      = @_C_DEFINE_STR(CGI_POST      , $_cgi_post_path)
+C_CGI_POSTED    = @_C_DEFINE_STR(CGI_POSTED    , $_cgi_posted_path)
+C_CGI_UPDATE_HTM= @_C_DEFINE_STR(CGI_UPDATE_HTM, $_cgi_update_htm_path)
+C_CGI_VIEW      = @_C_DEFINE_STR(CGI_VIEW      , $_cgi_view_path)
+
+
 #C_ = @_C_DEFINE_STR(uvw, $xyz)
 
 
similarity index 90%
rename from www/ott/prosilver/theme/style.php.css
rename to style.php.1.css
index eec483522d2402e94113383a423741bbe49293ca..1d54152b80d80ed5ab5d9c26786f06ddab095c01 100644 (file)
@@ -2726,8 +2726,8 @@ tweaks required due to its poor CSS support.
 
 * html table, * html select, * html input { font-size: 100%; }
 * html hr { margin: 0; }
-* html span.corners-top, * html span.corners-bottom { background-image: url("/ott/prosilver/theme/images/corners_left.gif"); }
-* html span.corners-top span, * html span.corners-bottom span { background-image: url("/ott/prosilver/theme/images/corners_right.gif"); }
+* html span.corners-top, * html span.corners-bottom { background-image: url("###cgi_path;/prosilver/theme/images/corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("###cgi_path;/prosilver/theme/images/corners_right.gif"); }
 
 table.table1 {
        width: 99%;             /* IE < 6 browsers */
@@ -2876,7 +2876,7 @@ hr.dashed {
 ---------------------------------------- */
 .headerbar {
        background-color: #12A3EB;
-       background-image: url("/ott/prosilver/theme/images/bg_header.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_header.gif");
        color: #FFFFFF;
 }
 
@@ -2886,12 +2886,12 @@ hr.dashed {
 
 .forabg {
        background-color: #0076b1;
-       background-image: url("/ott/prosilver/theme/images/bg_list.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_list.gif");
 }
 
 .forumbg {
        background-color: #12A3EB;
-       background-image: url("/ott/prosilver/theme/images/bg_header.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_header.gif");
 }
 
 .panel {
@@ -2920,19 +2920,19 @@ hr.dashed {
 }
 
 span.corners-top {
-       background-image: url("/ott/prosilver/theme/images/corners_left.png");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left.png");
 }
 
 span.corners-top span {
-       background-image: url("/ott/prosilver/theme/images/corners_right.png");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right.png");
 }
 
 span.corners-bottom {
-       background-image: url("/ott/prosilver/theme/images/corners_left.png");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left.png");
 }
 
 span.corners-bottom span {
-       background-image: url("/ott/prosilver/theme/images/corners_right.png");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right.png");
 }
 
 /* Horizontal lists
@@ -3018,7 +3018,7 @@ dl.details dd {
 
 /* Pagination in viewforum for multipage topics */
 .row .pagination {
-       background-image: url("/ott/prosilver/theme/images/icon_pages.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/icon_pages.gif");
 }
 
 .row .pagination span a, li.pagination span a {
@@ -3165,18 +3165,18 @@ a.topictitle:active {
 
 /* Back to top of page */
 a.top {
-       background-image: url("/ott/prosilver/imageset/icon_back_top.gif");
+       background-image: url("###cgi_path;/prosilver/imageset/icon_back_top.gif");
 }
 
 a.top2 {
-       background-image: url("/ott/prosilver/imageset/icon_back_top.gif");
+       background-image: url("###cgi_path;/prosilver/imageset/icon_back_top.gif");
 }
 
 /* Arrow links  */
-a.up           { background-image: url("/ott/prosilver/theme/images/arrow_up.gif") }
-a.down         { background-image: url("/ott/prosilver/theme/images/arrow_down.gif") }
-a.left         { background-image: url("/ott/prosilver/theme/images/arrow_left.gif") }
-a.right                { background-image: url("/ott/prosilver/theme/images/arrow_right.gif") }
+a.up           { background-image: url("###cgi_path;/prosilver/theme/images/arrow_up.gif") }
+a.down         { background-image: url("###cgi_path;/prosilver/theme/images/arrow_down.gif") }
+a.left         { background-image: url("###cgi_path;/prosilver/theme/images/arrow_left.gif") }
+a.right                { background-image: url("###cgi_path;/prosilver/theme/images/arrow_right.gif") }
 
 a.up:hover {
        background-color: transparent;
@@ -3198,7 +3198,7 @@ Colours and backgrounds for content.css
 
 ul.forums {
        background-color: #eef5f9;
-       background-image: url("/ott/prosilver/theme/images/gradient.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/gradient.gif");
 }
 
 ul.topiclist li {
@@ -3215,11 +3215,11 @@ ul.topiclist dd {
 }
 
 ul.topiclist li.row dt a.subforum.read {
-       background-image: url("/ott/prosilver/imageset/subforum_read.gif");
+       background-image: url("###cgi_path;/prosilver/imageset/subforum_read.gif");
 }
 
 ul.topiclist li.row dt a.subforum.unread {
-       background-image: url("/ott/prosilver/imageset/subforum_unread.gif");
+       background-image: url("###cgi_path;/prosilver/imageset/subforum_unread.gif");
 }
 
 li.row {
@@ -3294,12 +3294,12 @@ dl.faq dt {
 /* Quote block */
 blockquote {
        background-color: #EBEADD;
-       background-image: url("/ott/prosilver/theme/images/quote.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/quote.gif");
        border-color:#DBDBCE;
 }
 
 .rtl blockquote {
-       background-image: url("/ott/prosilver/theme/images/quote_rtl.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/quote_rtl.gif");
 }
 
 blockquote blockquote {
@@ -3479,7 +3479,7 @@ fieldset.polls dd div {
 }
 
 .online {
-       background-image: url("/ott/prosilver/imageset/en/icon_user_online.gif");
+       background-image: url("###cgi_path;/prosilver/imageset/en/icon_user_online.gif");
 }
 
 /*     
@@ -3488,60 +3488,60 @@ Colours and backgrounds for buttons.css
 -------------------------------------------------------------- */
 
 /* Big button images */
-.reply-icon span       { background-image: url("/ott/prosilver/imageset/en/button_topic_reply.gif"); }
-.mustardreply-icon span        { background-image: url("/ott/prosilver/imageset/en/button_topic_reply_mustard.gif"); }
-.post-icon span                { background-image: url("/ott/prosilver/imageset/en/button_topic_new.gif"); }
-.locked-icon span      { background-image: url("/ott/prosilver/imageset/en/button_topic_locked.gif"); }
-.pmreply-icon span     { background-image: url("/ott/prosilver/imageset/en/button_pm_reply.gif") ;}
-.newpm-icon span       { background-image: url("/ott/prosilver/imageset/en/button_pm_new.gif") ;}
-.forwardpm-icon span   { background-image: url("/ott/prosilver/imageset/en/button_pm_forward.gif") ;}
+.reply-icon span       { background-image: url("###cgi_path;/prosilver/imageset/en/button_topic_reply.gif"); }
+.mustardreply-icon span        { background-image: url("###cgi_path;/prosilver/imageset/en/button_topic_reply_mustard.gif"); }
+.post-icon span                { background-image: url("###cgi_path;/prosilver/imageset/en/button_topic_new.gif"); }
+.locked-icon span      { background-image: url("###cgi_path;/prosilver/imageset/en/button_topic_locked.gif"); }
+.pmreply-icon span     { background-image: url("###cgi_path;/prosilver/imageset/en/button_pm_reply.gif") ;}
+.newpm-icon span       { background-image: url("###cgi_path;/prosilver/imageset/en/button_pm_new.gif") ;}
+.forwardpm-icon span   { background-image: url("###cgi_path;/prosilver/imageset/en/button_pm_forward.gif") ;}
 
 a.print {
-       background-image: url("/ott/prosilver/theme/images/icon_print.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/icon_print.gif");
 }
 
 a.sendemail {
-       background-image: url("/ott/prosilver/theme/images/icon_sendemail.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/icon_sendemail.gif");
 }
 
 a.fontsize {
-       background-image: url("/ott/prosilver/theme/images/icon_fontsize.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/icon_fontsize.gif");
 }
 
 /* Icon images
 ---------------------------------------- */
-.sitehome                                              { background-image: url("/ott/prosilver/theme/images/icon_home.gif"); }
-.icon-faq                                              { background-image: url("/ott/prosilver/theme/images/icon_faq.gif"); }
-.icon-members                                  { background-image: url("/ott/prosilver/theme/images/icon_members.gif"); }
-.icon-home                                             { background-image: url("/ott/prosilver/theme/images/icon_home.gif"); }
-.icon-ucp                                              { background-image: url("/ott/prosilver/theme/images/icon_ucp.gif"); }
-.icon-register                                 { background-image: url("/ott/prosilver/theme/images/icon_register.gif"); }
-.icon-logout                                   { background-image: url("/ott/prosilver/theme/images/icon_logout.gif"); }
-.icon-bookmark                                 { background-image: url("/ott/prosilver/theme/images/icon_bookmark.gif"); }
-.icon-bump                                             { background-image: url("/ott/prosilver/theme/images/icon_bump.gif"); }
-.icon-subscribe                                        { background-image: url("/ott/prosilver/theme/images/icon_subscribe.gif"); }
-.icon-unsubscribe                              { background-image: url("/ott/prosilver/theme/images/icon_unsubscribe.gif"); }
-.icon-pages                                            { background-image: url("/ott/prosilver/theme/images/icon_pages.gif"); }
-.icon-search                                   { background-image: url("/ott/prosilver/theme/images/icon_search.gif"); }
+.sitehome                                              { background-image: url("###cgi_path;/prosilver/theme/images/icon_home.gif"); }
+.icon-faq                                              { background-image: url("###cgi_path;/prosilver/theme/images/icon_faq.gif"); }
+.icon-members                                  { background-image: url("###cgi_path;/prosilver/theme/images/icon_members.gif"); }
+.icon-home                                             { background-image: url("###cgi_path;/prosilver/theme/images/icon_home.gif"); }
+.icon-ucp                                              { background-image: url("###cgi_path;/prosilver/theme/images/icon_ucp.gif"); }
+.icon-register                                 { background-image: url("###cgi_path;/prosilver/theme/images/icon_register.gif"); }
+.icon-logout                                   { background-image: url("###cgi_path;/prosilver/theme/images/icon_logout.gif"); }
+.icon-bookmark                                 { background-image: url("###cgi_path;/prosilver/theme/images/icon_bookmark.gif"); }
+.icon-bump                                             { background-image: url("###cgi_path;/prosilver/theme/images/icon_bump.gif"); }
+.icon-subscribe                                        { background-image: url("###cgi_path;/prosilver/theme/images/icon_subscribe.gif"); }
+.icon-unsubscribe                              { background-image: url("###cgi_path;/prosilver/theme/images/icon_unsubscribe.gif"); }
+.icon-pages                                            { background-image: url("###cgi_path;/prosilver/theme/images/icon_pages.gif"); }
+.icon-search                                   { background-image: url("###cgi_path;/prosilver/theme/images/icon_search.gif"); }
 
 /* Profile & navigation icons */
-.email-icon, .email-icon a             { background-image: url("/ott/prosilver/imageset/icon_contact_email.gif"); }
-.aim-icon, .aim-icon a                 { background-image: url("/ott/prosilver/imageset/icon_contact_aim.gif"); }
-.yahoo-icon, .yahoo-icon a             { background-image: url("/ott/prosilver/imageset/icon_contact_yahoo.gif"); }
-.web-icon, .web-icon a                 { background-image: url("/ott/prosilver/imageset/icon_contact_www.gif"); }
-.msnm-icon, .msnm-icon a                       { background-image: url("/ott/prosilver/imageset/icon_contact_msnm.gif"); }
-.icq-icon, .icq-icon a                 { background-image: url("/ott/prosilver/imageset/icon_contact_icq.gif"); }
-.jabber-icon, .jabber-icon a           { background-image: url("/ott/prosilver/imageset/icon_contact_jabber.gif"); }
-.pm-icon, .pm-icon a                           { background-image: url("/ott/prosilver/imageset/en/icon_contact_pm.gif"); }
-.quote-icon, .quote-icon a             { background-image: url("/ott/prosilver/imageset/en/icon_post_quote.gif"); }
-.quote-icon-mustard, .quote-icon-mustard a             { background-image: url("/ott/prosilver/imageset/en/icon_post_quote_mustard.gif"); }
+.email-icon, .email-icon a             { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_email.gif"); }
+.aim-icon, .aim-icon a                 { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_aim.gif"); }
+.yahoo-icon, .yahoo-icon a             { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_yahoo.gif"); }
+.web-icon, .web-icon a                 { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_www.gif"); }
+.msnm-icon, .msnm-icon a                       { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_msnm.gif"); }
+.icq-icon, .icq-icon a                 { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_icq.gif"); }
+.jabber-icon, .jabber-icon a           { background-image: url("###cgi_path;/prosilver/imageset/icon_contact_jabber.gif"); }
+.pm-icon, .pm-icon a                           { background-image: url("###cgi_path;/prosilver/imageset/en/icon_contact_pm.gif"); }
+.quote-icon, .quote-icon a             { background-image: url("###cgi_path;/prosilver/imageset/en/icon_post_quote.gif"); }
+.quote-icon-mustard, .quote-icon-mustard a             { background-image: url("###cgi_path;/prosilver/imageset/en/icon_post_quote_mustard.gif"); }
 
 /* Moderator icons */
-.report-icon, .report-icon a           { background-image: url("/ott/prosilver/imageset/icon_post_report.gif"); }
-.edit-icon, .edit-icon a                       { background-image: url("/ott/prosilver/imageset/en/icon_post_edit.gif"); }
-.delete-icon, .delete-icon a           { background-image: url("/ott/prosilver/imageset/icon_post_delete.gif"); }
-.info-icon, .info-icon a                       { background-image: url("/ott/prosilver/imageset/icon_post_info.gif"); }
-.warn-icon, .warn-icon a                       { background-image: url("/ott/prosilver/imageset/icon_user_warn.gif"); } /* Need updated warn icon */
+.report-icon, .report-icon a           { background-image: url("###cgi_path;/prosilver/imageset/icon_post_report.gif"); }
+.edit-icon, .edit-icon a                       { background-image: url("###cgi_path;/prosilver/imageset/en/icon_post_edit.gif"); }
+.delete-icon, .delete-icon a           { background-image: url("###cgi_path;/prosilver/imageset/icon_post_delete.gif"); }
+.info-icon, .info-icon a                       { background-image: url("###cgi_path;/prosilver/imageset/icon_post_info.gif"); }
+.warn-icon, .warn-icon a                       { background-image: url("###cgi_path;/prosilver/imageset/icon_user_warn.gif"); } /* Need updated warn icon */
 
 /*     
 --------------------------------------------------------------
@@ -3581,11 +3581,11 @@ ul.cplist {
 /* CP tabbed menu
 ----------------------------------------*/
 #tabs a {
-       background-image: url("/ott/prosilver/theme/images/bg_tabs1.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_tabs1.gif");
 }
 
 #tabs a span {
-       background-image: url("/ott/prosilver/theme/images/bg_tabs2.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_tabs2.gif");
        color: #536482;
 }
 
@@ -3626,11 +3626,11 @@ ul.cplist {
 #navigation a {
        color: #333;
        background-color: #B2C2CF;
-       background-image: url("/ott/prosilver/theme/images/bg_menu.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_menu.gif");
 }
 
 .rtl #navigation a {
-       background-image: url("/ott/prosilver/theme/images/bg_menu_rtl.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_menu_rtl.gif");
        background-position: 0 100%;
 }
 
@@ -3665,36 +3665,36 @@ ul.cplist {
 }
 
 #cp-main span.corners-top, #cp-menu span.corners-top {
-       background-image: url("/ott/prosilver/theme/images/corners_left2.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left2.gif");
 }
 
 #cp-main span.corners-top span, #cp-menu span.corners-top span {
-       background-image: url("/ott/prosilver/theme/images/corners_right2.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right2.gif");
 }
 
 #cp-main span.corners-bottom, #cp-menu span.corners-bottom {
-       background-image: url("/ott/prosilver/theme/images/corners_left2.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left2.gif");
 }
 
 #cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
-       background-image: url("/ott/prosilver/theme/images/corners_right2.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right2.gif");
 }
 
 /* Topicreview */
 #cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
-       background-image: url("/ott/prosilver/theme/images/corners_left.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left.gif");
 }
 
 #cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
-       background-image: url("/ott/prosilver/theme/images/corners_right.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right.gif");
 }
 
 #cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
-       background-image: url("/ott/prosilver/theme/images/corners_left.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_left.gif");
 }
 
 #cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
-       background-image: url("/ott/prosilver/theme/images/corners_right.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/corners_right.gif");
 }
 
 /* Friends list */
@@ -3816,7 +3816,7 @@ fieldset.quick-login input.inputbox {
 a.button1, input.button1, input.button3, a.button2, input.button2 {
        color: #000;
        background-color: #FAFAFA;
-       background-image: url("/ott/prosilver/theme/images/bg_button.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/bg_button.gif");
 }
 
 a.button1, input.button1 {
@@ -3844,7 +3844,7 @@ a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, inpu
 }
 
 input.search {
-       background-image: url("/ott/prosilver/theme/images/icon_textbox_search.gif");
+       background-image: url("###cgi_path;/prosilver/theme/images/icon_textbox_search.gif");
 }
 
 input.disabled {
@@ -3853,7 +3853,7 @@ input.disabled {
 
 
 .imageset.icon_post_target {
-    background-image: url("/ott/prosilver/imageset/icon_post_target.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/icon_post_target.gif");
     padding-left: 11px;
     padding-top: 9px;
 }
@@ -3868,15 +3868,15 @@ span.imageset {
 }
 
 .topic_read_hot {
-    background-image: url("/ott/prosilver/imageset/topic_read_hot.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/topic_read_hot.gif");
 }
 
 .topic_read {
-    background-image: url("/ott/prosilver/imageset/topic_read.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/topic_read.gif");
 }
 
 .topic_read_locked {
-    background-image: url("/ott/prosilver/imageset/topic_read_locked.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/topic_read_locked.gif");
 }
 
 
@@ -3933,12 +3933,12 @@ ul.topiclist li {
     padding: 0px;
 }
 .imageset.icon_topic_attach {
-    background-image: url("/ott/prosilver/imageset/icon_topic_attach.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/icon_topic_attach.gif");
     padding-left: 7px;
     padding-top: 10px;
 }
 .imageset.icon_topic_latest {
-    background-image: url("/ott/prosilver/imageset/icon_topic_latest.gif");
+    background-image: url("###cgi_path;/prosilver/imageset/icon_topic_latest.gif");
     padding-left: 11px;
     padding-top: 9px;
 }
similarity index 85%
rename from www/ott/top
rename to top.1
index ad2f7701bee6b87e5bd8b3269b9f0b1bf321ae1d..3e9461707d3af147dfa4f20867299e2e737046a9 100644 (file)
+++ b/top.1
@@ -21,7 +21,7 @@ Modified by:
 var jump_page = 'Enter the page number you wish to go to:';
 var on_page = '1';
 var per_page = '40';
-var base_url = '/ott/view?f=7&amp;t=101043';
+var base_url = '###cgi_path;/view?f=7&amp;t=101043';
 var style_cookie = 'phpBBstyle';
 var style_cookie_settings = '; path=/';
 var onload_functions = new Array();
@@ -54,13 +54,13 @@ eval(onunload_functions[i]);
 };
 // ]]>
 </script>
-<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
-<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
-<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
-<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
-<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
-<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
-<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<script type="text/javascript" src="###cgi_path;/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="###cgi_path;/prosilver/template/forum_fn.js" ></script>
+<link href="###cgi_path;/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="###cgi_path;/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="###cgi_path;/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="###cgi_path;/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="###cgi_path;/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
 <link rel="icon" type="image/png" href="/img/favicon.png"/>
 
 </head>
@@ -71,8 +71,8 @@ eval(onunload_functions[i]);
 <div class="headerbar" >
 <div class="inner" ><span class="corners-top" ><span></span></span>
 <div id="site-description" >
-<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
-<h1>  <a href="/ott/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
+<a href="http://1190.bicyclesonthemoon.info" title="index" id="logo">  <img src="###cgi_path;/botmlogo3.png" alt="" title="" />  </a> 
+<h1>  <a href="###cgi_path;/" title="the OTT MIRROR"> the ЯOЯЯIM TTO </a>  </h1> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
 </div>
@@ -93,7 +93,7 @@ eval(onunload_functions[i]);
 <div class="navbar"> 
 <div class="inner"> <span class="corners-top"> <span> </span> </span> 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="###cgi_path;/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
 <!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
@@ -109,7 +109,7 @@ eval(onunload_functions[i]);
 <a name="start_here" ></a>
 <div id="page-body" >
 
-<h2><a href="/ott/" >The ЯOЯЯIM TTO</a></h2>
+<h2><a href="###cgi_path;/" >The ЯOЯЯIM TTO</a></h2>
 <!-- <b style="font-size: 180%;">We're in Madness Mode. Don't worry, <strike>eat must</strike> feed squirpies!</b> -->
 <!-- <b style="font-size: 180%;">I'm trying to fix the css to work correctly with the new OTT. May appear broken temporarily!</b> -->
 
index ba764b895a33e3157886f4c20cc90c7c179fe0c9..bd89068294233ffa6715ae470a2a5df5a079cf9b 100644 (file)
@@ -1,8 +1,7 @@
 // OTT mirror
-// Copyright (C) 2014, 2022 Balthasar Szczepański
+// Copyright (C) 2014, 2022, 2024 Balthasar Szczepański
 // update.c automatically generated from update.1.c
 // update a page.
-// 29.09.2022
 //
 // This file is part of OTT mirror.
 //
@@ -26,8 +25,8 @@
 #include <errno.h>
 #include <sys/wait.h>
 
-// ###C_BOT_PATH_2: #define BOT_PATH "/eizm/pro/ottmirror/bot2"
-#define UPDATE_PATH "/ott/update.htm"
+// ###C_BOT_PATH_2:     #define BOT_PATH       "/eizm/pro/ottmirror/bot2"
+// ###C_CGI_UPDATE_HTM: #define CGI_UPDATE_HTM "/ott/update.htm"
 
 int main(int argc, char **argv)
 {
@@ -67,7 +66,7 @@ int main(int argc, char **argv)
        }
        else
        {
-               cgiRedirect(UPDATE_PATH);
+               cgiRedirect(CGI_UPDATE_HTM);
        }
        return 0;
 }
similarity index 64%
rename from www/ott/update.htm
rename to update.1.htm
index b517b040d42174ab00dc058358ee155f32a7d6b4..2beaf16f57d378ee363390bc276f965b91ade171 100644 (file)
@@ -6,9 +6,9 @@
                <link rel="icon" type="image/png" href="/img/favicon.png">
        </head>
        <body>
-               <a href="http://1190.bicyclesonthemoon.info"><img src="/ott/botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>
-               <h1><a href="/ott">The ЯOЯЯIM TTO</a></h1>
-               <form method="get" action="/ott/update">
+               <a href="http://1190.bicyclesonthemoon.info"><img src="###cgi_path;/botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>
+               <h1><a href="###cgi_path;">The ЯOЯЯIM TTO</a></h1>
+               <form method="get" action="###cgi_path;/update">
                        Update a Newpage<br>
                        NP =    <input type="text" name="np">
                        <input type="submit" value="Update">
index 3b36cc2fd254c03935bc848a7049f2f2ba68ba75..fefaa422386792ccdde1088b6990b5895cc21f7c 100644 (file)
--- a/view.1.c
+++ b/view.1.c
@@ -1,8 +1,7 @@
 // OTT mirror
-// Copyright (C) 2014, 2022 Balthasar Szczepański
+// Copyright (C) 2014, 2022, 2024 Balthasar Szczepański
 // view.c automatically generated from view.1.c
 // view a page.
-// 29.09.2022
 //
 // This file is part of OTT mirror.
 //
 // ###C_AWK_VIEW:       #define AWK_VIEW "/eizm/pro/ottmirror/view.awk"
 // ###C_TEMP_PATH_VIEW: #define TEMP_PATH "/eizm/tmp/ottmirror/view."
 
+// ###C_CGI_MVIEW: #define CGI_MVIEW "/ott/mview"
+// ###C_CGI_PROSILVER:               "/ott/prosilver"
+// ###C_CGI_VIEW:  #define CGI_VIEW  "/ott/view"
+
 #define N_STRBUF 256
 
 unsigned long p2np(unsigned long p)
@@ -169,11 +172,11 @@ int main(int argc, char **argv)
        if(np>last)
                np=last;
        if(np<last)
-               snprintf(right,N_STRBUF,"right=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+               snprintf(right,N_STRBUF,"right=<a href=\\\""CGI_VIEW"?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
        else
-               snprintf(right,N_STRBUF,"%s",mustard?"right=<a href=\\\"/ott/mview\\\" class=\\\"right-box right\\\" >Mustardtime Otherthread</a>":"right=<!-- -->");
+               snprintf(right,N_STRBUF,"%s",mustard?"right=<a href=\\\""CGI_MVIEW"\\\" class=\\\"right-box right\\\" >Mustardtime Otherthread</a>":"right=<!-- -->");
        if(np>1)
-               snprintf(left,N_STRBUF,"left=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+               snprintf(left,N_STRBUF,"left=<a href=\\\""CGI_VIEW"?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
        else
                snprintf(left,N_STRBUF,"%s","left=<!-- -->");
        
@@ -188,22 +191,22 @@ int main(int argc, char **argv)
                fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a>  &bull; <span>",np,last);
                if(np>1)
                {
-                       fprintf(file,"<a href=\"/ott/view?np=1\" >1</a>");
+                       fprintf(file,"<a href=\""CGI_VIEW"?np=1\" >1</a>");
                        fprintf(file,(np>6)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
                }
                for(unsigned long i=((np>6)?((np<last)?(np-3):(np-4)):2);i<np;++i)
-                       fprintf(file,"<a href=\"/ott/view?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+                       fprintf(file,"<a href=\""CGI_VIEW"?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
                fprintf(file,"<strong>%lu</strong>",np);
                for(unsigned long i=np+1;i<=((np+6<=last)?((np==1)?(np+4):(np+3)):(last-1));++i)
-                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/view?np=%lu\" >%lu</a>",i,i);
+                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\""CGI_VIEW"?np=%lu\" >%lu</a>",i,i);
                if(np<last)
                {
                        fprintf(file,(np+6<=last)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
-                       fprintf(file,"<a href=\"/ott/view?np=%lu\" >%lu</a>",last,last);
+                       fprintf(file,"<a href=\""CGI_VIEW"?np=%lu\" >%lu</a>",last,last);
                }
                if(mustard)
                {
-                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/mview\" ><img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"Mustardtime\" /> <img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"Otherthread\" /> <img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"\" /></a>");
+                       fprintf(file,"<span class=\"page-sep\" >, </span><a href=\""CGI_MVIEW"\" ><img src=\""CGI_PROSILVER"/imageset/mustard_smaller.gif\" alt=\"Mustardtime\" /> <img src=\""CGI_PROSILVER"/imageset/mustard_smaller.gif\" alt=\"Otherthread\" /> <img src=\""CGI_PROSILVER"/imageset/mustard_smaller.gif\" alt=\"\" /></a>");
                }
                fprintf(file,"</span>\n</div>\n");
                fclose(file);
@@ -213,7 +216,7 @@ int main(int argc, char **argv)
        sub=fork();
        if(sub==0)
        {
-               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",SIG_PATH,"-v",INF_PATH,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\"/ott/view?np=1\" >1190: &quot;Time&quot;</a></h2>",NP_TOP_PATH,(char *)0);
+               r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",SIG_PATH,"-v",INF_PATH,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\""CGI_VIEW"?np=1\" >1190: &quot;Time&quot;</a></h2>",NP_TOP_PATH,(char *)0);
                exit(r);
        }
        waitpid(sub,&r,0);
similarity index 80%
rename from www/ott/whymirror.htm
rename to whymirror.1.htm
index c37dcb171106437d3d00fad446261741ff72ea82..8584439b35273e72752cb29bd5fafcbad88e2afb 100644 (file)
@@ -7,10 +7,10 @@
                <link rel="stylesheet" href="/css/botm.css">
        </head>
        <body>
-               <a href="http://1190.bicyclesonthemoon.info"><img src="/ott/botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>
+               <a href="http://1190.bicyclesonthemoon.info"><img src="###cgi_path;/botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>
                <h1>Why the mirror?</h1>
                <h2>The mirror</h2>
-               <p><a href="/ott">The mirror</a> is a redundant copy of the Time thread on the xkcd fora. The
+               <p><a href="###cgi_path;">The mirror</a> is a redundant copy of the Time thread on the xkcd fora. The
                posts and attachments and avatars and images are archived. It's more
                comfortable to read the real thread than the mirror. But sometimes you might
                prefer the mirror.</p>