dobrochan-refuge / dobrowakaba

Fork of the original Wakaba with minimal patches.
Other
0 stars 0 forks source link

Bonus track: rf.dobrochan.net patches #2

Open m1kc opened 1 year ago

m1kc commented 1 year ago
diff --git a/captcha.pl b/captcha.pl
index 484877f..52488db 100755
--- a/captcha.pl
+++ b/captcha.pl
@@ -10,7 +10,7 @@ use DBI;
 use lib '.';
 BEGIN { require "config.pl"; }
 BEGIN { require "config_defaults.pl"; }
-BEGIN { require "strings_en.pl"; }
+BEGIN { require "strings_ru.pl"; }
 BEGIN { require "wakautils.pl"; }

diff --git a/css/futaba.css b/css/futaba.css
index 303ab62..dbc87ea 100644
--- a/css/futaba.css
+++ b/css/futaba.css
@@ -106,6 +106,7 @@ a:hover {
 .reply {
    background:#F0E0D6;
    color:#800000;
+   padding-bottom: 0.5em;
 }
 .doubledash {
    vertical-align:top;
diff --git a/css/tomorrow.css b/css/tomorrow.css
index ecdb599..8b52ef5 100644
--- a/css/tomorrow.css
+++ b/css/tomorrow.css
@@ -292,3 +292,21 @@ hr {
 .mainpagecntnr {
     border-bottom: 1px solid #282a2e !important;
 }
+
+/* Dark inputs by 1153-kun */
+
+textarea, input, button {
+    background: #282a2e;
+    color: #f0f0f0;
+    border-color: #1d1f21;
+}
+
+input[type=submit], button[type=button] {
+    background: #282a2e;
+    color: #c5c8c6;
+    border-color: #1d1f21;
+}
+
+input[type=checkbox], input[type=password], .de-file-input, #de-symbol-markup-quote, #de-symbol-markup-spoil, #de-symbol-markup-strike, #de-symbol-markup-italic, #de-symbol-markup-bold {
+    opacity: 0.6;
+}
diff --git a/futaba_style.pl b/futaba_style.pl
index 790e2a2..a9e33a6 100755
--- a/futaba_style.pl
+++ b/futaba_style.pl
@@ -35,6 +35,12 @@ form .trap { display:none }

 <script type="text/javascript">var style_cookie="<const STYLE_COOKIE>";</script>
 <script type="text/javascript" src="<var expand_filename(JS_FILE)>"></script>
+<!-- custom -->
+<script type="text/javascript" src="/b/dollchan.js"></script>
+<style>
+.spoiler { background-color: #ccc; color: #ccc }
+.spoiler:hover { color: black; }
+</style>
 </head>
 <if $thread><body class="replypage"></if>
 <if !$thread><body></if>
@@ -296,6 +302,7 @@ use constant ADMIN_LOGIN_TEMPLATE => compile_template(MANAGER_HEAD_INCLUDE.q{

 }.NORMAL_FOOT_INCLUDE);

+use Digest::MD5 qw(md5 md5_hex md5_base64);  #m1kc

 use constant POST_PANEL_TEMPLATE => compile_template(MANAGER_HEAD_INCLUDE.q{

@@ -312,9 +319,11 @@ use constant POST_PANEL_TEMPLATE => compile_template(MANAGER_HEAD_INCLUDE.q{
 [<label><input type="checkbox" name="fileonly" value="on" /><const S_MPONLYPIC></label>]
 </div>

-<table align="center" style="white-space: nowrap"><tbody>
+<table align="center" del-style="white-space: nowrap"><tbody>
 <tr class="managehead"><const S_MPTABLE></tr>

+<script src="/b/identicon.js"></script>
+
 <loop $posts>
    <if !$parent><tr class="managehead"><th colspan="6"></th></tr></if>

@@ -324,11 +333,19 @@ use constant POST_PANEL_TEMPLATE => compile_template(MANAGER_HEAD_INCLUDE.q{
    <if $image><td rowspan="2"></if>
    <label><input type="checkbox" name="delete" value="<var $num>" /><big><b><var $num></b></big>&nbsp;&nbsp;</label></td>

-   <td><var make_date($timestamp,"tiny")></td>
+   <td><var make_date($timestamp,"iichan")></td>
    <td><var clean_string(substr $subject,0,20)></td>
    <td><b><var clean_string(substr $name,0,30)><var $trip></b></td>
-   <td><var clean_string(substr $comment,0,30)></td>
-   <td><var dec_to_dot($ip)>
+   <td><var clean_string(substr $comment,0,150)></td>
+   <td>
+       <script>
+if ('<var $ip>' !== '0') {
+var hash = '<var md5_hex($ip)>';
+var data = new Identicon(hash, {format: 'svg', size:28}).toString();
+document.write('<img style="float: left; margin-right: 2px" src="data:image/svg+xml;base64,' + data + '">');
+}
+       </script>
+       <var dec_to_dot($ip)>
        [<a href="<var $self>?admin=<var $admin>&amp;task=deleteall&amp;ip=<var $ip>"><const S_MPDELETEALL></a>]
        [<a href="<var $self>?admin=<var $admin>&amp;task=addip&amp;type=ipban&amp;ip=<var $ip>" onclick="return do_ban(this)"><const S_MPBAN></a>]
    </td>
diff --git a/wakaba.ico b/wakaba.ico
index 72ad278..34aa182 100644
Binary files a/wakaba.ico and b/wakaba.ico differ
diff --git a/wakaba.pl b/wakaba.pl
index a84d866..611a4c4 100755
--- a/wakaba.pl
+++ b/wakaba.pl
@@ -15,7 +15,7 @@ use DBI;
 use lib '.';
 BEGIN { require "config.pl"; }
 BEGIN { require "config_defaults.pl"; }
-BEGIN { require "strings_en.pl"; }     # edit this line to change the language
+BEGIN { require "strings_ru.pl"; }     # edit this line to change the language
 BEGIN { require "futaba_style.pl"; }   # edit this line to change the board style
 BEGIN { require "captcha.pl"; }
 BEGIN { require "wakautils.pl"; }
@@ -808,6 +808,13 @@ sub format_comment($)
    {
        my $line=shift;

+       ## spoilers (iichan patch)
+       if(ENABLE_WAKABAMARK) {
+           # do <spoiler>
+           $line=~s{%%([^<>]*?)%%}{<span class="spoiler">$1</span>}gx;
+       }
+       ## ----
+
        $line=~s!&gtgt;([0-9]+)!
            my $res=get_post($1);
            if($res) { '<a href="'.get_reply_link($$res{num},$$res{parent}).'" onclick="highlight('.$1.')">&gt;&gt;'.$1.'</a>' }
m1kc commented 1 year ago

hanabira.css

html, body {
         background:#FFFFEE;
         color:#800000;
}
a {
        color:#0000EE;
}
a:hover {
        color:#DD0000;
}
.adminbar {
        text-align:right;
        clear:both;
        float:right;
}
.logo {
        clear:both;
        text-align:center;
        font-size:2em;
        color:#800000;
        width:100%;
}
.theader {
        background:#E04000;
        text-align:center;
        padding:2px;
        color:#FFFFFF;
        width:100%;
}
.postarea {
}
.rules {
        font-size:0.7em;
}
.postblock {
        background:#EEAA88;
        color:#800000;
        font-weight:800;
}
.footer {
        text-align:center;
        font-size:12px;
        font-family:serif;
}
.passvalid {
    background:#EEAA88;
    text-align:center;
    width:100%;
    color:#ffffff;
}
.dellist {
    font-weight: bold;
    text-align:center;
}
.delbuttons {
    text-align:center;
    padding-bottom:4px;

}
.managehead {
    background:#AAAA66;
    color:#400000;
    padding:0px;
}
.postlists {
    background:#FFFFFF;
    width:100%;
    padding:0px;
    color:#800000;
}
.row1 {
    background:#EEEECC;
    color:#800000;
}
.row2 {
        background:#DDDDAA;
        color:#800000;
}
.unkfunc {
    background:inert;
    color:#789922;
}
.filesize {
    text-decoration:none;
}
.filetitle {
    background:inherit;
    font-size:1.2em;
    color:#CC1105;
    font-weight:800;
}
.postername {
    color:#117743;
    font-weight:bold;
}
.postertrip {
    color:#228854;
}
.oldpost {
        color:#CC1105;
        font-weight:800;
}
.omittedposts {
        color:#707070;
}
.reply {
    background:#F0E0D6;
    color:#800000;
    padding-bottom: 0.5em; /* mikuso */
}
.doubledash {
    vertical-align:top;
    clear:both;
    float:left;
}
.replytitle {
    font-size: 1.2em;
        color:#CC1105;
        font-weight:800;
}
.commentpostername {
        color:#117743;
    font-weight:800;
}
.thumbnailmsg {
    font-size: small;
    color:#800000;
}

.abbrev {
        color:#707070;
}
.highlight {
    background:#F0E0D6;
    color:#800000;
    border: 2px dashed #EEAA88;
}

/* customizations by 822-kun */

hr {
    border-style: solid none none none;
    border-width: 1px;
    border-color: #BBBBBB;
}

blockquote {
    background: inherit;
    margin-left: 20px;
    margin-top: 0px;
    padding: .3em 0;
}

p {
    margin: 0;
    margin-top: 0.25em; /* m1kc */
}

.postername {
    color: #117743;
    font-weight: bold;
}

a {

    color: #0000ee;
}

a:hover {
    color: #DD0000;
}

.reflink a {
    color: inherit;
    text-decoration: none;
}

.reflink a:hover {
    color: #dd0000;
}

.spoiler {
    background: #F0D0B6;
    color: #F0D0B6;
}

.spoiler a {

    background: #F0D0B6;
    color: #F0D0B6;
}

.spoiler a:hover {
    color: #600000 !important;
}

.spoiler blockquote {
    background: #F0D0B6;
    color: #F0D0B6;
}

.spoiler:hover {
    background: #F0D0B6 !important;
    color: #600000 !important;
}

.file {
    float: left;
    margin: 0 20px;
}

.filesize {
    margin-left: 20px;
    font-size: 80%;
}

.reply {
    border-color: #DDCCC5;
    font-size: 100%;
    background-color: #F0E0D6;
    color: #600000;
    overflow: hidden;
    padding-right: 0.25em;
    max-width: 100%;
    border-width: medium 1px 1px medium;
    border-style: none solid solid none;
    -webkit-border-radius: 5px;
}

.postblock {
    padding-left: 0.5em;
}