]> bicyclesonthemoon.info Git - ott/mirror/commitdiff
v.1.3 v1.3
authorb <b@23ac2ed3-cec8-4626-8109-7118d8ca9799>
Wed, 8 Apr 2015 19:11:37 +0000 (19:11 +0000)
committerb <b@23ac2ed3-cec8-4626-8109-7118d8ca9799>
Wed, 8 Apr 2015 19:11:37 +0000 (19:11 +0000)
Improved form reading in mustardtime posting
Fixed small bugs in:
bbcode to html conversion
post editing
verifying passwords for post editing

git-svn-id: svn://botcastle1b/ottmirror@4 23ac2ed3-cec8-4626-8109-7118d8ca9799

20 files changed:
botmlogo2.png
index.htm
ott.zip/botmlogo2.png
ott.zip/botmlogo3.png
ott.zip/end
ott.zip/info.htm
ott.zip/np/end
ott.zip/np/top
ott.zip/post.htm
ott.zip/top
ott.zip/update.htm
ott.zip/whymirror.htm [new file with mode: 0644]
pro.zip/bb2html.awk
pro.zip/bot2.1.awk
pro.zip/post.1.awk
pro.zip/post.1.cpp
pro.zip/posted.1.cpp
pro.zip/preview.1.awk
pro.zip/re.awk
pro.zip/verify.awk

index 520f68accaa38c9a2407e7ba234ffbaca774cc10..35614830ea10c465dabf08bc3dfd4f5a3309f324 100644 (file)
Binary files a/botmlogo2.png and b/botmlogo2.png differ
index a4227aad08035ea69bf064b9917a95fe9077bd13..3b440b324924bd2fe78571fa899a750269268298 100644 (file)
--- a/index.htm
+++ b/index.htm
@@ -1,18 +1,18 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
 <html lang="en"><head>\r
 <title>The mirror • Bicycles on the Moon</title>\r
-<link rel="home" title="1190" href="http://1190.bicyclesonthemoon.dnsd.info/">\r
-<link rel="icon" type="image/png" href="http://1190.bicyclesonthemoon.dnsd.info/img/favicon.png">\r
-<link rel="stylesheet" href="http://1190.bicyclesonthemoon.dnsd.info/css/botm.css">\r
+<link rel="home" title="1190" href="http://1190.bicyclesonthemoon.info/">\r
+<link rel="icon" type="image/png" href="http://1190.bicyclesonthemoon.info/img/favicon.png">\r
+<link rel="stylesheet" href="http://1190.bicyclesonthemoon.info/css/botm.css">\r
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8"></head>\r
 <body>\r
-<a href="http://1190.bicyclesonthemoon.dnsd.info/"><img src="botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>\r
+<a href="http://1190.bicyclesonthemoon.info/"><img src="botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>\r
 <h1>You can have your own OTT mirror now!</h1>\r
 <div style="max-width: 600000px">\r
-<p>If you want to run your own copy of the <a href="http://1190.bicyclesonthemoon.dnsd.info/ott/">ЯOЯЯIM TTO</a>, you\r
+<p>If you want to run your own copy of the <a href="http://1190.bicyclesonthemoon.info/ott/">ЯOЯЯIM TTO</a>, you\r
 can, because I made it available. Follow these instructions to download and\r
 setup your own ЯOЯЯIM TTO.</p>\r
-<p>This is about version 1, iteration 2.</p>\r
+<p>This is about version 1.3.</p>\r
 <h2>Dependencies</h2>\r
 The mirror depends on some things:\r
 <ul>\r
@@ -44,10 +44,10 @@ mirror <b>must</b> be hosted at "<code>something.example.com/<b>ott</b></code>"
 <li>Create a directory for the source. Download <a href="pro.zip">pro.zip</a>\r
 and put its contents there. Don't build it yet.</li></ul>\r
 <p>This and earlier versions can also be downloaded from <a href=\r
-"svn://bicyclesonthemoon.dnsd.info/ottmirror">svn://bicyclesonthemoon.dnsd.info/ottmirror</a>.\r
+"svn://bicyclesonthemoon.info/ottmirror">svn://bicyclesonthemoon.info/ottmirror</a>.\r
 Use "e" for read-only access.<br>\r
 If you want the source as it is right now, get it from <a href=\r
-"http://1190.bicyclesonthemoon.dnsd.info/ott/src/">http://1190.bicyclesonthemoon.dnsd.info/ott/src/</a>.\r
+"http://1190.bicyclesonthemoon.info/ott/src/">http://1190.bicyclesonthemoon.info/ott/src/</a>.\r
 </p>\r
 \r
 <h2>Preparing the enviroment</h2>\r
@@ -256,13 +256,20 @@ This moves the log files once in a week. Otherwise they would grow to infinity.
 </p>\r
 \r
 <!-- <h2>Bugs</h2>\r
-In line 180 of <code>bot2.1.awk</code> change "<code>if(arr3[2]==404)</code>" to\r
-"<code>if(arr3[2]&gt;=400&amp;&amp;arr3[2]&lt;500)</code>". This will be fixed\r
-in next update.\r
- -->\r
+-->\r
+\r
 <h2>Changes</h2>\r
 <ul>\r
-       <li>v.1, i.2 (25.09.2014):\r
+       <li>v.1.3 (8.03.2015)\r
+       <ul>\r
+               <li>Improved form reading in mustardtime posting</li>\r
+               <li>Fixed small bugs in:<ul>\r
+                       <li>bbcode to html conversion</li>\r
+                       <li>post editing</li>\r
+                       <li>verifying passwords for post editing</li>\r
+               </ul></li>\r
+       </ul></li>\r
+       <li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.1">v.1.2 (25.09.2014):</a>\r
        <ul>\r
                <li>Posts sent from the mirror are now quotable.</li>\r
                <li>Posts sent from the mirror are now editable.</li>\r
@@ -271,13 +278,13 @@ in next update.
                <li>Added a relinking interface.</li>\r
                <li>Improved related URL relinking</li>\r
        </ul></li>\r
-       <li><a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/1.1">v.1, i.1 (12.08.2014):</a>\r
+       <li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.1">v.1.1 (12.08.2014):</a>\r
        <ul>\r
                <li>Added AGPL license.</li>\r
                <li>Added BBcode to HTML translation.</li>\r
                <li>Fixed a bug causing bot2 to stop on 403 error when downloading attachments.</li>\r
        </ul></li>\r
-       <li><a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/1.0">v.1, i.0 (17.07.2014):</a>\r
+       <li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.0">v.1.0 (17.07.2014):</a>\r
        <ul>\r
                <li>First publicly available version</li>\r
        </ul></li>\r
@@ -286,8 +293,8 @@ in next update.
 <h2>Copyright, license, etc.</h2>\r
 <p>The code (in pro.zip) is written by me, Balthasar Szczepański and is released\r
 under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL 3</a> license\r
-since version 1, iteration 0.<br>\r
-Version.1, iteration.0 doesn't have any license defined.</p>\r
+since version 1.1.<br>\r
+Version.1.0 doesn't have any license defined.</p>\r
 <p>The resources in ott.zip contain HTML, CSS, Javascript and images from <a\r
 href="http://www.phpbb.com/">phpBB</a> which is released under the <a\r
 href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GPL 2</a> license. \r
@@ -300,6 +307,6 @@ TTO. Now <b>wait for it</b> until it catches the whole thread.<br>
 Balthasar<br>\r
 <br>\r
 </div>\r
-<a href="http://1190.bicyclesonthemoon.dnsd.info/">1190.bicyclesonthemoon.dnsd.info</a>\r
+<a href="http://1190.bicyclesonthemoon.info/">1190.bicyclesonthemoon.info</a>\r
 \r
 </body></html>
\ No newline at end of file
index 520f68accaa38c9a2407e7ba234ffbaca774cc10..35614830ea10c465dabf08bc3dfd4f5a3309f324 100644 (file)
Binary files a/ott.zip/botmlogo2.png and b/ott.zip/botmlogo2.png differ
index 543c64b28986b0f44ada9c19506d5f65d6d3fce5..d0e440750b858a8e2197caae84e2804b3003da9b 100644 (file)
Binary files a/ott.zip/botmlogo3.png and b/ott.zip/botmlogo3.png differ
index ea3c80ed157719f3d5385c02ae5f8b3df7c65dd2..72a4713b45808a677aa869afc98e9d86fc71cc8d 100644 (file)
@@ -25,7 +25,7 @@
 </div>
 
 </div>
-<p></p><p><a href="http://forums.xkcd.com/index.php" class="left-box left" >Return to Board index</a></p>
+<p></p><!-- <p><a href="http://forums.xkcd.com/index.php" class="left-box left" >Return to Board index</a></p> -->
 <form method="get" id="jumpbox" action="/ott/redirect" onsubmit="if(this.f.value == -1){return false;}" >
 
 <fieldset class="jumpbox" >
 <option value="http://xkcd.mscha.org/vieweraftertime/bean2-001" >&nbsp; &nbsp;Beany 2</option>
 <option value="http://xkcd.mscha.org/vieweraftertime/t1i-0000" >&nbsp; &nbsp;t1i</option>
 <option value="http://" >meta time after Time</option>
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ongoing.htm?f=0" >&nbsp; &nbsp;bftf</option>
+<option value="http://1190.bicyclesonthemoon.info/ongoing.htm?f=0" >&nbsp; &nbsp;bftf</option>
 <option value="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043" >the OTT</option>
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ott">&nbsp; &nbsp;the ЯOЯЯIM TTO</option>
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ott/mview" >&nbsp; &nbsp;&nbsp; &nbsp;the Mustardtime Otherthread</option>
+<option value="http://1190.bicyclesonthemoon.info/ott">&nbsp; &nbsp;the ЯOЯЯIM TTO</option>
+<option value="http://1190.bicyclesonthemoon.info/ott/mview" >&nbsp; &nbsp;&nbsp; &nbsp;the Mustardtime Otherthread</option>
 <option value="http://contingency.chirpingmustard.com">&nbsp; &nbsp;the Raftcastle</option>
 <option value="http://xkcd-time.wikia.com/wiki/Useful_External_Links" >resources</option>
 <option value="http://wiki.chirpingmustard.com" >&nbsp; &nbsp;the Wiki</option>
 <p>You <strong>cannot</strong> read about your forum permissions<br /></p>
 </div>
 <div>
-<p><a href="http://1190.bicyclesonthemoon.dnsd.info" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.dnsd.info</a><br/></p>
+<p><a href="http://1190.bicyclesonthemoon.info" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.info</a><br/></p>
 </div>
 <div id="page-footer" >
-<div class="navbar" >
+<!-- <div class="navbar" >
 <div class="inner" ><span class="corners-top" ><span></span></span>
 <ul class="linklist" >
 <li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
 <li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> &bull; <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> &bull; All times are UTC </li>
 </ul>
 <span class="corners-bottom" ><span></span></span></div>
-</div>
+</div> -->
 <div class="copyright">
-Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a><br/>
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a><br/>
 OTT MIRROR by Balthasar Szczepański, 2014 <br/>
 Relaeased under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL3 license</a><br/>
-The sources and instructions are available <a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/">here</a><br/>
+The sources and instructions are available <a href="http://1190.bicyclesonthemoon.info/ottmirror/">here</a><br/>
 Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/"> phpBB </a> &reg; Forum Software &copy; phpBB Group<br/>
 
 </div>
index a59dfbc5b9286a4f5eb8e77fb8d806deaa22526c..31f65812690f01684052415f3384d9139f5090ab 100644 (file)
@@ -95,7 +95,7 @@
 <div class="headerbar">
 <div class="inner"><span class="corners-top"><span></span></span>
 <div id="site-description">
-<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
+<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> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
 <div class="inner"><span class="corners-top"><span></span></span>
 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.dnsd.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
 <ul class="linklist navlinks2"> 
-<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> xkcd Fora </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
 <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li> 
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>  -->
 </ul>
 <span class="corners-bottom"><span></span></span></div>
 </div>
 </div>
 
 <div id="page-footer" >
-<div class="navbar" >
+<!-- <div class="navbar" >
 <div class="inner" ><span class="corners-top" ><span></span></span>
 <ul class="linklist" >
 <li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
 <li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> &bull; <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> &bull; All times are UTC </li>
 </ul>
 <span class="corners-bottom" ><span></span></span></div>
-</div>
+</div> -->
 <div class="copyright">
 OTT MIRROR by Balthasar Szczepański, 2014 <br/>
 Relaeased under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL3 license</a><br/>
-The sources and instructions are available <a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/">here</a><br/>
+The sources and instructions are available <a href="http://1190.bicyclesonthemoon.info/ottmirror/">here</a><br/>
 Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/"> phpBB </a> &reg; Forum Software &copy; phpBB Group<br/>
 
 </div>
index e548c1513f5297bec518fad6350cc9e3789636a0..07d6c5dbe91502ec0ad5d1e0e3fd2550015a6a87 100644 (file)
@@ -21,7 +21,7 @@ go to newpage:
 </div>\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
+<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="get" id="jumpbox" action="/ott/redirect" onsubmit="if(this.f.value == -1){return false;}" >\r
 \r
 <fieldset class="jumpbox" >\r
@@ -44,10 +44,10 @@ go to newpage:
 <option value="http://xkcd.mscha.org/vieweraftertime/bean2-001" >&nbsp; &nbsp;Beany 2</option>\r
 <option value="http://xkcd.mscha.org/vieweraftertime/t1i-0000" >&nbsp; &nbsp;t1i</option>\r
 <option value="http://" >meta time after Time</option>\r
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ongoing.htm?f=0" >&nbsp; &nbsp;bftf</option>\r
+<option value="http://1190.bicyclesonthemoon.info/ongoing.htm?f=0" >&nbsp; &nbsp;bftf</option>\r
 <option value="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043" >the OTT</option>\r
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ott">&nbsp; &nbsp;the ЯOЯЯIM TTO</option>\r
-<option value="http://1190.bicyclesonthemoon.dnsd.info/ott/mview" >&nbsp; &nbsp;&nbsp; &nbsp;the Mustardtime Otherthread</option>\r
+<option value="http://1190.bicyclesonthemoon.info/ott">&nbsp; &nbsp;the ЯOЯЯIM TTO</option>\r
+<option value="http://1190.bicyclesonthemoon.info/ott/mview" >&nbsp; &nbsp;&nbsp; &nbsp;the Mustardtime Otherthread</option>\r
 <option value="http://contingency.chirpingmustard.com">&nbsp; &nbsp;the Raftcastle</option>\r
 <option value="http://xkcd-time.wikia.com/wiki/Useful_External_Links" >resources</option>\r
 <option value="http://wiki.chirpingmustard.com" >&nbsp; &nbsp;the Wiki</option>\r
@@ -79,22 +79,22 @@ go to newpage:
 <p> Users browsing this forum: NaN registered users and NaN guests</p>\r
 </div>\r
 <div>\r
-<p><a href="http://1190.bicyclesonthemoon.dnsd.info" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.dnsd.info</a><br/></p>\r
+<p><a href="http://1190.bicyclesonthemoon.info" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.info</a><br/></p>\r
 </div>\r
 <div id="page-footer" >\r
-<div class="navbar" >\r
+<!-- <div class="navbar" >\r
 <div class="inner" ><span class="corners-top" ><span></span></span>\r
 <ul class="linklist" >\r
 <li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>\r
 <li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> &bull; <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> &bull; All times are UTC </li>\r
 </ul>\r
 <span class="corners-bottom" ><span></span></span></div>\r
-</div>\r
+</div> -->\r
 <div class="copyright">\r
-Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a><br/>\r
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a><br/>\r
 OTT MIRROR by Balthasar Szczepański, 2014 <br/>\r
 Relaeased under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL3 license</a><br/>\r
-The sources and instructions are available <a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/">here</a><br/>\r
+The sources and instructions are available <a href="http://1190.bicyclesonthemoon.info/ottmirror/">here</a><br/>\r
 Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/"> phpBB </a> &reg; Forum Software &copy; phpBB Group<br/>\r
 \r
 </div>\r
index 413dcc92c01ebbf14d571bb552593bb4b4313b73..fbdf45253719d5fdc454b90cdac6f8deae6d2271 100644 (file)
@@ -70,7 +70,7 @@ eval(onunload_functions[i]);
 <div class="headerbar" >\r
 <div class="inner" ><span class="corners-top" ><span></span></span>\r
 <div id="site-description" >\r
-<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> \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
 <p>Redundant copy of the needle-pulled thing</p> \r
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> \r
@@ -89,15 +89,15 @@ eval(onunload_functions[i]);
 <div class="navbar"> \r
 <div class="inner"> <span class="corners-top"> <span> </span> </span> \r
 <ul class="linklist navlinks"> \r
-<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.dnsd.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> \r
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> \r
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> \r
-<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> \r
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->\r
 </ul> \r
 <ul class="linklist navlinks2">\r
-<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> \r
-<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> \r
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> xkcd Fora </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> \r
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> \r
 <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li> \r
-<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li> \r
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>  -->\r
 </ul> \r
 <span class="corners-bottom"> <span> </span> </span> </div> \r
 </div> \r
@@ -106,6 +106,7 @@ eval(onunload_functions[i]);
 <div id="page-body" >\r
 ###title\r
 <p>Wait for it.</p>\r
+<!-- <b style="font-size: 180%;">We're in Madness Mode. Don't worry, <strike>eat must</strike> feed squirpies!</b> -->\r
 <!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body --><div style="display: none !important;" >This forum is for the individual discussion thread that goes with each new comic.<br /></div>\r
 <p>\r
 <strong>Moderators:</strong> <a style="color:#006600;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=6592" >Moderators General</a>, <a style="color:#993399;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=7358" >Magistrates</a>, <a style="color:#CC6600;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=7357" >Prelates</a>\r
index 678b6080c107a3afcb7b25b55a544555f1d04007..fbc41efd888d5fd64f2d8676523f7c61dd7fdcd9 100644 (file)
@@ -96,7 +96,7 @@
 <div class="headerbar">
 <div class="inner"><span class="corners-top"><span></span></span>
 <div id="site-description">
-<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
+<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> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
 <div class="inner"><span class="corners-top"><span></span></span>
 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.dnsd.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
 <ul class="linklist navlinks2"> 
-<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> xkcd Fora </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
 <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li> 
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>  -->
 </ul>
 <span class="corners-bottom"><span></span></span></div>
 </div>
 <div class="panel" id="postingbox">
        <div class="inner"><span class="corners-top"><span></span></span>
        
-       <h3>Post a reply</h3>
+###title
 
        <script type="text/javascript">
 // <![CDATA[
 </div>
 
 <div id="page-footer" >
-<div class="navbar" >
+<!-- <div class="navbar" >
 <div class="inner" ><span class="corners-top" ><span></span></span>
 <ul class="linklist" >
 <li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
 <li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> &bull; <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> &bull; All times are UTC </li>
 </ul>
 <span class="corners-bottom" ><span></span></span></div>
-</div>
+</div> -->
 <div class="copyright">
-Mustardtime ptsting by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_p/"><b>bot</b>hasar_<b>p</b></a><br/>
+Mustardtime ptsting by <a href="http://1190.bicyclesonthemoon.info/bothasar_p/"><b>bot</b>hasar_<b>p</b></a><br/>
 OTT MIRROR by Balthasar Szczepański, 2014 <br/>
 Relaeased under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL3 license</a><br/>
-The sources and instructions are available <a href="http://1190.bicyclesonthemoon.dnsd.info/ottmirror/">here</a><br/>
+The sources and instructions are available <a href="http://1190.bicyclesonthemoon.info/ottmirror/">here</a><br/>
 Contains HTML, CSS, JavaScript and images from <a href="http://www.phpbb.com/"> phpBB </a> &reg; Forum Software &copy; phpBB Group<br/>
 
 </div>
index 306441f8ba0cdf45b553ee2906f09ad81c296061..54084d7ac3d624f2a827704deb0361507afb1167 100644 (file)
@@ -71,7 +71,7 @@ eval(onunload_functions[i]);
 <div class="headerbar" >
 <div class="inner" ><span class="corners-top" ><span></span></span>
 <div id="site-description" >
-<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo">  <img src="/ott/botmlogo3.png" alt="" title="" />  </a> 
+<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> 
 <p>Redundant copy of the needle-pulled thing</p> 
 <p class="skiplink">  <a href="#start_here"> Skip to content </a>  </p> 
@@ -93,15 +93,15 @@ eval(onunload_functions[i]);
 <div class="navbar"> 
 <div class="inner"> <span class="corners-top"> <span> </span> </span> 
 <ul class="linklist navlinks"> 
-<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.dnsd.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
+<li class="icon-home"> <a href="http://bicyclesonthemoon.info/" accesskey="h"> Bicycles on the Moon </a> <strong> &#8249; </strong> <a href="http://1190.bicyclesonthemoon.info" accesskey="h"> Time related </a> <strong> &#8249; </strong> <a href="/ott/"> ЯOЯЯIM TTO </a> </li> 
 <li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&amp;t=101043&amp;start=67120&amp;view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>  -->
 </ul> 
 <ul class="linklist navlinks2"> 
-<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> xkcd Fora </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> &#8249; </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> 
+<!-- <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> 
 <li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li> 
-<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li> 
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>  -->
 </ul> 
 <span class="corners-bottom"> <span> </span> </span> </div> 
 </div> 
@@ -110,6 +110,7 @@ eval(onunload_functions[i]);
 <div id="page-body" >
 
 <h2><a href="/ott/" >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> -->
 <div>
 <!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body --><div style="display: none !important;" >This forum is for the individual discussion thread that goes with each new comic.<br /></div><p><strong>Moderators:</strong> <a style="color:#006600;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=6592" >Moderators General</a>, <a style="color:#993399;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=7358" >Magistrates</a>, <a style="color:#CC6600;" href="http://forums.xkcd.com/memberlist.php?mode=group&amp;g=7357" >Prelates</a></p>
 </div>
index a24af5e934fc095273e7670075738de03457ea2e..b517b040d42174ab00dc058358ee155f32a7d6b4 100644 (file)
@@ -6,7 +6,7 @@
                <link rel="icon" type="image/png" href="/img/favicon.png">
        </head>
        <body>
-               <a href="http://1190.bicyclesonthemoon.dnsd.info"><img src="/ott/botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>
+               <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">
                        Update a Newpage<br>
diff --git a/ott.zip/whymirror.htm b/ott.zip/whymirror.htm
new file mode 100644 (file)
index 0000000..c37dcb1
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<html lang="en">
+       <head>
+               <title>Why the mirror &bull; ЯOЯЯIM TTO &bull; Bicycles on the Moon</title>
+               <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+               <link rel="icon" type="image/png" href="/img/favicon.png">
+               <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>
+               <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
+               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>
+               <h2>When is the mirror useful?</h2>
+               <ul><li>
+               The original thread doesn't work. You can still read and write from the
+               mirror. Almost like from the real thread.
+               </li><li>
+               When blitzing, you will see posts on old newpages. Some of them contain
+               external images. They may no longer exist. On the mirror you can still see
+               them.
+               </li></ul>
+               <br>
+               <a href="/">1190.bicyclesonthemoon.info</a>
+       </body>
+</html>
index f387c52176296ee05b845b3b348cb9271fdd3e3a..fa590026ee4ef248599b7bf57fbd424311059bfe 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (C) 2014 Balthasar Szczepański\r
 # bb2html.awk\r
 # translate BBcode to HTML and add to post file.\r
-# 17.09.2014\r
+# 27.10.2014\r
 \r
 # This file is part of OTT mirror.\r
 #\r
@@ -429,7 +429,7 @@ function bb2html(text,   depth,count,bbtree,html,tag,tagstart,taglength,elm,tagv
                                html=html"</div></div></div>"\r
                        else if (tagname=="list")\r
                        {\r
-                               if (tagvalue="")\r
+                               if (tagvalue=="")\r
                                        html=html"</ul>"\r
                                else\r
                                        html=html"</ol>"\r
@@ -460,7 +460,7 @@ function bb2html(text,   depth,count,bbtree,html,tag,tagstart,taglength,elm,tagv
                        {\r
                                # gsub(/ ?<br> ?/,"<br>",tag)\r
                                gsub(/ /,"\\&nbsp;",tag)\r
-                               gsub(/\t/,"\\&nbsp;&nbsp;",tag)\r
+                               gsub(/\t/,"\\&nbsp;\\&nbsp;",tag)\r
                        }\r
                        if(argtab["disable_magic_url"]==""&& bbtree[indt(count,depth)".t"] !~ /^((code)|(img)|(url))$/)\r
                                gsub(/https?:\/\/[^\n\r\t<> ]+/,"<a href=\"&\" class=\"postlink\">&</a>",tag)\r
@@ -482,6 +482,7 @@ function bb2html(text,   depth,count,bbtree,html,tag,tagstart,taglength,elm,tagv
                                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
index 187a70fd9510486a1e293ca38c9861fe94e3cdc0..bcb23b632bacd0d325508552c9e89fd5d92b87e0 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (C) 2014 Balthasar Szczepański
 # bot2.awk (bothasar_t)
 # relinking, archiving avatars, attachments, images.
-# 17.09.2014
+#  5.03.2015
 
 # This file is part of OTT mirror.
 #
@@ -43,7 +43,6 @@ BEGIN {
        }
        printf("")>outfile
        
-       # So many facepalms for this part, why is there no better solution?
        for(i=0;i<256;++i)
        {
                ch=sprintf("%c",i)
index 7d064526e9f7c8c638300984b7d6d359bc97d1dd..1dee3c91438076a072e6db8e747016da726c3b96 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (C) 2014 Balthasar Szczepański\r
 # post.awk\r
 # send a post.\r
-# 12.09.2014\r
+# 20.03.2015\r
 \r
 # This file is part of OTT mirror.\r
 #\r
@@ -73,14 +73,16 @@ END{
                if(temp ~ /name=\"form_token/)\r
                #\"#"\r
                {\r
-                       split(temp,arr,"(value=\")|(\" ?/>)")\r
-                       argtab["form_token"]=arr[2]\r
+                       temp=substr(temp, index(temp, "value=\"")+7)\r
+                       temp=substr(temp, 1, index(temp, "\"")-1)\r
+                       argtab["form_token"]=urlencode(entitydecode(temp))\r
                }\r
                if(temp ~ /name=\"creation_time/)\r
                #\"#"\r
                {\r
-                       split(temp,arr,"(value=\")|(\" ?/>)")\r
-                       argtab["creation_time"]=arr[2]\r
+                       temp=substr(temp, index(temp, "value=\"")+7)\r
+                       temp=substr(temp, 1, index(temp, "\"")-1)\r
+                       argtab["creation_time"]=urlencode(entitydecode(temp))\r
                }\r
                if (tolower(temp) ~ /<h2>information/)\r
                {\r
@@ -111,6 +113,7 @@ END{
        printf ("&form_token=%s",argtab["form_token"])>>postfile\r
        close(postfile)\r
        \r
+       system("sleep 1")\r
        if(system("wget -q -t 3 --connect-timeout=60 --load-cookies=" cookiefile " --save-cookies=" cookiefile " --post-file=" postfile " -U " useragent " -O " tempfile " \""fora "/posting.php?mode=reply&f=7&t=101043\""))\r
        {\r
                print "Submit fail."\r
@@ -155,3 +158,51 @@ END{
        \r
  \r
 }\r
+function urlencode(name,all,   len,iii,escaped,ch)\r
+{\r
+       len=length(name)\r
+       escaped=""\r
+       for(iii=1;iii<=len;++iii)\r
+       {\r
+               ch=substr(name,iii,1);\r
+               if ((ch ~ /[a-zA-Z0-9\.\-_~]/)&&(all==""))\r
+                       escaped = escaped ch\r
+               else\r
+                       escaped = escaped "%" ch2hex[ch]\r
+       }\r
+       return escaped\r
+}function entitydecode(ht   ,i,j,un,num)\r
+# quot, amp, lt, gt, nbsp, and decimal numbered.\r
+{\r
+       while ((i=match(ht, /&((#[0-9]+)|([a-zA-Z]+));/))!=0)#\r
+       {\r
+               un=un substr(ht, 1, i-1)\r
+               ht=substr(ht, i)\r
+               j=index(ht, ";")\r
+               \r
+               if(ht~/^&#/)\r
+               {\r
+                       num=int(substr(ht, 3, j-3))\r
+                       un=un sprintf("%c",num)\r
+               }\r
+               else\r
+               {\r
+                       num=tolower(substr(ht, 2, j-2))\r
+                       if(num == "quot")\r
+                               un=un "\""\r
+                       else if(num == "amp")\r
+                               un=un "&"\r
+                       else if(num == "lt")\r
+                               un=un "<"\r
+                       else if(num == "gt")\r
+                               un=un ">"\r
+                       else if(num == "nbsp")\r
+                               un=un "\xA0"\r
+                       else\r
+                               un = un ht\r
+               }\r
+               ht=substr(ht, j+1)\r
+       }\r
+       un=un ht\r
+       return un\r
+}\r
index e43daab8161b42a127ac557f060474b9812feb02..b40aa1948fe4058fad527def41d8847da480c3db 100644 (file)
@@ -2,7 +2,7 @@
 // Copyright (C) 2014 Balthasar Szczepański
 // post.cpp
 // write posts from the mirror.
-// 24.09.2014
+// 23.11.2014
 //
 // This file is part of OTT mirror.
 //
@@ -356,7 +356,7 @@ void submit()
                        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=\"http://1190.bicyclesonthemoon.dnsd.info/bothasar_p/\" >bothasar_p</a> &raquo; Sat Apr 05, 2014 9:40 pm UTC</dt>\n");
+                       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=\"http://1190.bicyclesonthemoon.info/bothasar_p/\" >bothasar_p</a> &raquo; Sat Apr 05, 2014 9:40 pm UTC</dt>\n");
                        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=\"#\" >");
index f6d27442a7743c209134ae8502841ff2488b5e02..4b7792f614b7c8bb69a935e14f112c9764b4f158 100644 (file)
@@ -2,7 +2,7 @@
 // Copyright (C) 2014 Balthasar Szczepański\r
 // posted.cpp\r
 // posts recently sent from the mirror.\r
-//  2.09.2014\r
+// 23.11.2014\r
 //\r
 // This file is part of OTT mirror.\r
 //\r
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
        printf("<meta http-equiv=\"Content-type\" content=\"text/html; charset=UTF-8\">\n");\r
        printf("<link rel=\"icon\" type=\"image/png\" href=\"/img/favicon.png\">\n");\r
        printf("<link rel=\"stylesheet\" href=\"/css/botm.css\">\n");\r
-       printf("</head><body><a href=\"/\"><img src=\"/img/botmlogo2.png\" alt=\"1190.bicyclesonthemoon.dnsd.info\" border=\"0\"></a>\n");\r
+       printf("</head><body><a href=\"/\"><img src=\"/img/botmlogo2.png\" alt=\"1190.bicyclesonthemoon.info\" border=\"0\"></a>\n");\r
        printf("<h1>Posted from the ЯOЯЯIM TTO</h1>\n");\r
        \r
        fflush(stdout);\r
@@ -188,7 +188,7 @@ int main(int argc, char **argv)
                printf("</table><br>\n");\r
        }\r
        printf("<a href=\"/ott\">back to the ЯOЯЯIM TTO</a><br><br>\n");\r
-       printf("<a href=\"/\">1190.bicyclesonthemoon.dnsd.info</a></body></html>\n");\r
+       printf("<a href=\"/\">1190.bicyclesonthemoon.info</a></body></html>\n");\r
        \r
        fflush(stdout);\r
        sub=fork();\r
index bd01baf9734c9299f12276c2c13199f7cd1806c4..1c1992aa2704810a4cc69d19ee24435aba111017 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright (C) 2014 Balthasar Szczepański\r
 # preview.awk\r
 # insert content into the preview page.\r
-# 24.09.2014\r
+# 11.11.2014\r
 \r
 # This file is part of OTT mirror.\r
 #\r
@@ -35,7 +35,9 @@ BEGIN{
        disable_magic_url="<div><label for=\"disable_magic_url\"><input type=\"checkbox\" name=\"disable_magic_url\" id=\"disable_magic_url\" %s /> Do not automatically parse URLs</label></div>\n"\r
        attach_sig="<div><label for=\"attach_sig\"><input type=\"checkbox\" name=\"attach_sig\" id=\"attach_sig\" %s /> Attach a signature (signatures can be altered via the UCP)</label></div>\n"\r
        notify="<div><label for=\"notify\"><input type=\"checkbox\" name=\"notify\" id=\"notify\" %s /> Notify me when a reply is posted</label></div>\n"\r
-       forceID="<input type=\"text\" name=\"forceID\" value=\"%s\"/>\n"\r
+       forceID="<input type=\"hidden\" name=\"forceID\" value=\"%s\"/>\n"\r
+       title0="<h3>Post a reply</h3>"\r
+       title1="<h3>Edit post m%s</h3>\n"\r
        \r
        addquote=""\r
        \r
@@ -63,7 +65,7 @@ BEGIN{
                        else if(argline ~ /^BBHTML=/)\r
                        {\r
                                argtab["message"]=substr(argline,eq+1)\r
-                               gsub(/<br>/,"\n",argtab["message"])\r
+                               gsub(/<br *\/?>/,"\n",argtab["message"])\r
                        }\r
                        else if(argline ~ /^((BB)|(username)|(subject)|(message)|(HTML)|(debug))=/)\r
                        {}\r
@@ -91,7 +93,7 @@ BEGIN{
                        if(argline ~ /^BBHTML=/)\r
                        {\r
                                addquotehtml=substr(argline,eq+1)\r
-                               gsub(/ ?<br\/> ?/,"\n",addquotehtml)\r
+                               gsub(/<br *\/?>/,"\n",addquotehtml)\r
                        }\r
                        if(argline ~ /^username_h=/)\r
                                addquotename=substr(argline,eq+1)\r
@@ -129,6 +131,13 @@ BEGIN{
                if(argtab["forceID"]!="")\r
                        printf(forceID,argtab["forceID"])\r
        }\r
+       else if ($0 ~ /^###title/)\r
+       {\r
+               if(argtab["forceID"]!="")\r
+                       printf(title1,argtab["forceID"])\r
+               else\r
+                       print title0\r
+       }\r
        else if ($0 ~ /^###subject/)\r
                        printf(subject,((argtab["subject"]=="")?"###default_subject;":argtab["subject"]))\r
        else if ($0 ~ /^###username/)\r
index 8f27581707916a1127526f8bbef7fbc65215d29a..df4fe4f62a12cc35783378207040cb9e07e3c577 100644 (file)
@@ -16,8 +16,8 @@ BEGIN{
        catpath=   "/bin/cat"
        lspath=    "/bin/ls"
        
-       useragent2="bothasar_t (http://1190.bicyclesonthemoon.dnsd.info/ott/; Time thread mirror bot)"
-       useragent3="bothasar_p (http://1190.bicyclesonthemoon.dnsd.info/ott/; Time thread post bot)"
+       useragent2="bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)"
+       useragent3="bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread post bot)"
 
        ictaddr=   "http://forums.xkcd.com/viewforum.php?f=7"
        ottaddr=   "http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start="
@@ -32,8 +32,8 @@ BEGIN{
        smiley_regexp2=   "((\\.)|(http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/images\\/smilies"
        avatar_regexp=    "((src)|(href))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/download\\/file.php\\?avatar="
        attachment_regexp="((src)|(href))=.http:\\/\\/(www\\.)?((for(ums3?|a)\\.xkcd\.com)|echochamber\\.me)\\/download\\/file.php\\?(mode=view\\&amp;)?id="
-       own_image_regexp= "((1190.bicyclesonthemoon.dnsd.info)|(1190-botm.dnsdynamic.com))\\/ott\\/image\\/"
-       own_url_encoded=  "http%3A%2F%2F1190.bicyclesonthemoon.dnsd.info%2Fott"
+       own_image_regexp= "((1190.bicyclesonthemoon.(dnsd.)?info)|(1190-botm.dnsdynamic.com))\\/ott\\/image\\/"
+       own_url_encoded=  "http%3A%2F%2F1190.bicyclesonthemoon.info%2Fott"
        bot3name_encoded= "bothasar_p"
        default_subject=  "Re: 1190: \\&quot;Time\\&quot;"
        
index 265e9d193b94f6c9b1a496c9888b0f008b6afde8..e090d3626c1e4e860979600681dc3b885135470f 100644 (file)
@@ -1,3 +1,24 @@
+# OTT mirror\r
+# Copyright (C) 2014 Balthasar Szczepański\r
+# verify.awk\r
+# check if post belongs to user.\r
+#  8.04.2015\r
+\r
+# This file is part of OTT mirror.\r
+#\r
+# OTT mirror is free software: you can redistribute it and/or modify\r
+# it under the terms of the GNU Affreo General Public License as published by\r
+# the Free Software Foundation, either version 3 of the License, or\r
+# (at your option) any later version.\r
+# \r
+# OTT mirror is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+# GNU Affreo General Public License for more details.\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
 BEGIN{\r
        FS="="\r
        for(i=0;i<256;++i)\r
@@ -5,6 +26,7 @@ BEGIN{
                ch=sprintf("%c",i)\r
                hex=sprintf("%02X",i);\r
                ch2hex[ch]=hex\r
+               hex2ch[hex]=ch\r
        }\r
        if(reversed!="")\r
        {\r
@@ -23,7 +45,7 @@ BEGIN{
        argtab[substr($0,1,eq-1)]=substr($0,eq+1)\r
 }\r
 END{\r
-       if(fff!=""||argtab["username"]==""||argtab["password"]==""||(argtab["username"]==urlencode(name)&&argtab["password"]==urlencode(pass,1)))\r
+       if(argtab["username"]==""||argtab["password"]==""||(urldecode(argtab["username"])==name&&urldecode(argtab["password"])==pass))\r
                exit ok\r
        else\r
                exit fail\r
@@ -35,10 +57,23 @@ function urlencode(name,all,   len,iii,escaped,ch)
        for(iii=1;iii<=len;++iii)\r
        {\r
                ch=substr(name,iii,1);\r
-               if ((ch ~ /[a-zA-Z0-9\.-_~]/)&&(all==""))\r
+               if ((ch ~ /[a-zA-Z0-9\.\-_~]/)&&(all==""))\r
                        escaped = escaped ch\r
                else\r
                        escaped = escaped "%" ch2hex[ch]\r
        }\r
        return escaped\r
 }\r
+function urldecode(ht   ,i,j,un,num)\r
+{\r
+       while ((i=match(ht, /%[0-9a-fA-F][0-9a-fA-F]/))!=0)#\r
+       {\r
+               un=un substr(ht, 1, i-1)\r
+               ht=substr(ht, i)\r
+               num=toupper(substr(ht, 2, 2))\r
+               un=un hex2ch[num]\r
+               ht=substr(ht, 4)\r
+       }\r
+       un=un ht\r
+       return un\r
+}\r