# 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
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
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
# 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.
#
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=="")
{
# 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
}
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)
{
{
print "<ul class=\"profile-icons\" >" >> outfile
print "<li class=\"quote-icon\" ><a title=\"Reply with quote\" href=\"" fora "/posting.php?mode=quote&f=7&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
}
};
{
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>');
}
<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&f=7&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" />
</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" >
<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"> mscha</option>
<option value="http://geekwagon.net/projects/xkcd1190/" > geekwagon</option>
<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>
+++ /dev/null
-# 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;
-}
// ]]>
</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"/>
<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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> -->
</ul>
<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>
--- /dev/null
+#!/bin/sh
+make clean
+make -B TARGET=release makefile
+make install
+make clean
# 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
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\
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\
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\
SRC=\
agpl.txt\
-bb2html.awk\
+bb2html.1.awk\
bot2.1.awk\
bot2.1.c\
bot3.1.c\
# 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:
# keep these 2 lists in the same order!:
GENERATE_FROM=\
+bb2html.1.awk\
bot2.1.awk\
bot2.1.c\
bot3.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\
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\
SRC=\
agpl.txt\
-bb2html.awk\
+bb2html.1.awk\
bot2.1.awk\
bot2.1.c\
bot3.1.c\
// 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.
//
// ###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
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);
# 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,"=")
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"&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"&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>"
// 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
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();
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=<!-- -->");
fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a> • <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);
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);
<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&f=7&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
###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
<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"> mscha</option>\r
<option value="http://geekwagon.net/projects/xkcd1190/" > geekwagon</option>\r
<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
var jump_page = 'Go to newpage:';\r
var on_page = '0';\r
var per_page = '40';\r
-var base_url = '/ott/view?f=7&t=101043';\r
+var base_url = '###cgi_path;/view?f=7&t=101043';\r
var style_cookie = 'phpBBstyle';\r
var style_cookie_settings = '; path=/';\r
var onload_functions = new Array();\r
};\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
<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
<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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> -->\r
</ul> \r
</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&f=7&t=101043" title="Post a reply" ><span></span>Post a reply</a></div>\r
</div>\r
<div class="search-box" >\r
</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
# The OTT mirror
-Alias /ott/log ###CONF_log;
+Alias ###CONF_cgi_log; ###CONF_log;
<Directory ###CONF_log;>
Require all granted
Options Indexes
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;
// ###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
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> » 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> » 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&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&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&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&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);
// ]]>
</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"/>
<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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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&t=101043&start=67120&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 />
<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>
# 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
\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
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"]"&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"]"&attach_sig=on\">quote</a></td></tr>"\r
}
\ No newline at end of file
// 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
// ###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
\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
// 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
// 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
}\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
--- /dev/null
+# 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\&)?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
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\&)?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
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
# 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.
_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)
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)
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)
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)
* 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 */
---------------------------------------- */
.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;
}
.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 {
}
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
/* 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 {
/* 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;
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 {
}
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 {
/* 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 {
}
.online {
- background-image: url("/ott/prosilver/imageset/en/icon_user_online.gif");
+ background-image: url("###cgi_path;/prosilver/imageset/en/icon_user_online.gif");
}
/*
-------------------------------------------------------------- */
/* 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 */
/*
--------------------------------------------------------------
/* 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;
}
#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%;
}
}
#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 */
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 {
}
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 {
.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;
}
}
.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");
}
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;
}
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&t=101043';
+var base_url = '###cgi_path;/view?f=7&t=101043';
var style_cookie = 'phpBBstyle';
var style_cookie_settings = '; path=/';
var onload_functions = new Array();
};
// ]]>
</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>
<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="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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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> ‹ </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> ‹ </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&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> -->
</ul>
<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> -->
// 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.
//
#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)
{
}
else
{
- cgiRedirect(UPDATE_PATH);
+ cgiRedirect(CGI_UPDATE_HTM);
}
return 0;
}
<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">
// 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)
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=<!-- -->");
fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a> • <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);
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: "Time"</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: "Time"</a></h2>",NP_TOP_PATH,(char *)0);
exit(r);
}
waitpid(sub,&r,0);
<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>