Skip to content

Commit

Permalink
v0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KarafutoAdmin committed Apr 16, 2023
1 parent ad82930 commit afa76a4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

ぜろちゃんねるプラス Ver0.8.2
ぜろちゃんねるプラス Ver0.8.3
https://github.com/PrefKarafuto/New_0ch_Plus/

■はじめに
Expand All @@ -9,7 +9,7 @@ https://github.com/PrefKarafuto/New_0ch_Plus/
 このファイルは本家ぜろちゃんねるの/readme/readme.txtを元に編集された0ch+の/Readme/Readme.txtから作成しており、一部原文
ままの部分があります。

■ぜろちゃんねるプラス(v0.8)とは
■ぜろちゃんねるプラス(v0.8.x)とは
スレッドフロート型掲示板を動作させるPerlスクリプトとして製作されたぜろちゃんねるの機能改善版「ぜろちゃんねるプラス」の有志再開発版です。
これまでのぜろちゃんねるプラスと同じく5ちゃんねる専用ブラウザでも書き込みと閲覧、またv0.7.4(v0.7.5)からのアップデートが可能です。

Expand Down
12 changes: 10 additions & 2 deletions test/module/bbs_service.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use utf8;
use open IO => ':encoding(cp932)';
use LWP::UserAgent;
use JSON::Parse 'parse_json';
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use warnings;

Expand Down Expand Up @@ -191,7 +192,7 @@ sub CreateSubback
</small>
</div>
<hr>
<div align="right" style="margin-top:1em;">
<div align="left" style="margin-top:1em;">
<small><a href="./"><b>掲示板に戻る</b></a>/<a href="./kako/" target="_blank"><b>過去ログ倉庫はこちら</b></a></small>
</div>
Expand Down Expand Up @@ -256,6 +257,8 @@ sub PrintIndexHead
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="../test/datas/design.css">
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- hCaptcha -->
<script src='https://js.hcaptcha.com/1/api.js' async defer></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
HEAD
Expand Down Expand Up @@ -605,6 +608,11 @@ sub PrintThreadPreviewOne
my $bbs = $Sys->Get('BBS');
my $key = $Sys->Get('KEY');
my $tm = time;
my $bbsPath = $Sys->Get('BBSPATH');

my $permt = DAT::GetPermission("$bbsPath/$bbs/dat/$key.dat");
my $perms = $Sys->Get('PM-STOP');
my $isstop = $permt == $perms;

# 表示数の正規化
my ($start, $end) = $this->{'CONV'}->RegularDispNum($Sys, $Dat, 1, $contNum, $contNum);
Expand All @@ -616,7 +624,7 @@ sub PrintThreadPreviewOne
for (my $i = $start; $i <= $end; $i++) {
PrintResponse($this, $Page, $Dat, $commands, $i);
}
if($Sys->Get('RESMAX') > $Dat->Size() && $this->{'SET'}->Get('BBS_READONLY') ne 'on'){
if($Sys->Get('RESMAX') > $Dat->Size() && $this->{'SET'}->Get('BBS_READONLY') ne 'on' && !$isstop){
# 書き込みフォームの表示
$Page->Print(<<KAKIKO);
</dl>
Expand Down
4 changes: 1 addition & 3 deletions test/module/cookie.pl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sub Init
my ($name, $value) = split(/=/, $_, 2);
$value =~ s/^"|"$//g;
$value =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/pack('H2', $1)/eg;
$value = Encode::decode("Shift_JIS",$value);
$value = Encode::decode("utf8",$value);
$this->{'COOKIE'}->{$name} = $value;
}
return 1;
Expand All @@ -72,7 +72,6 @@ sub Set
my $this = shift;
my ($key, $val, $enc) = @_;

#Encode::from_to($val, 'sjis', $enc) if (defined $enc);
$this->{'COOKIE'}->{$key} = $val;
}

Expand All @@ -91,7 +90,6 @@ sub Get
my ($key, $default, $enc) = @_;

my $val = $this->{'COOKIE'}->{$key};
#Encode::from_to($val, $enc, 'sjis') if (defined $val && defined $enc);

return (defined $val ? $val : (defined $default ? $default : undef));
}
Expand Down
10 changes: 5 additions & 5 deletions test/module/post_service.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use open IO => ':encoding(cp932)';
use LWP::UserAgent;
use Digest::MD5;
#use JSON::Parse 'parse_json';
use JSON::Parse 'parse_json';
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use warnings;

Expand Down Expand Up @@ -119,7 +119,7 @@ sub Write

# 改造版で追加
# hCaptcha認証
#return $err if (($err = $this->Certification_hCaptcha()) != $ZP::E_SUCCESS);
return $err if (($err = $this->Certification_hCaptcha()) != $ZP::E_SUCCESS);

# データの書き込み
require './module/dat.pl';
Expand Down Expand Up @@ -663,7 +663,7 @@ sub NormalizationNameMail

# トリップ変換
my $trip = '';
if ($name =~ /\#(.*)$/x) {
if ($name =~ /(?<!&)\#(.*)$/x) {
my $key = $1;
$trip = $this->{'CONV'}->ConvertTrip(\$key, $Set->Get('BBS_TRIPCOLUMN'), $Sys->Get('TRIP12'));
}
Expand Down Expand Up @@ -752,7 +752,7 @@ sub NormalizationNameMail

return $ZP::E_SUCCESS;
}
=pod

#------------------------------------------------------------------------------------------------------------
#
# 改造版で追加
Expand Down Expand Up @@ -809,7 +809,7 @@ sub Certification_hCaptcha

return $ZP::E_SUCCESS;
}
=cut

#------------------------------------------------------------------------------------------------------------
#
# テキスト欄の正規化
Expand Down
2 changes: 1 addition & 1 deletion test/module/system.pl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ sub InitSystemValue
'DATA' => '/datas', # 初期データ設置パス
'BBSPATH' => '..', # 掲示板設置パス
'DEBUG' => 0, # デバグモード
'VERSION' => '0ch+ BBS 0.8.3 20230413', # CGIバージョン
'VERSION' => '0ch+ BBS 0.8.3 20230416', # CGIバージョン
'PM-DAT' => 0644, # datパーミション
'PM-STOP' => 0444, # スレストパーミション
'PM-TXT' => 0644, # TXTパーミション
Expand Down
6 changes: 4 additions & 2 deletions test/read.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,12 @@ sub PrintReadFoot
$Page->Print("<a href=\"$pathLast\">最新50</a>\n");
$Page->Print("</div>\n");
}

my $permt = DAT::GetPermission($datPath);
my $perms = $Sys->Get('PM-STOP');
my $isstop = $permt == $perms;
# 投稿フォームの表示
# レス最大数を超えている場合はフォーム表示しない
if ($rmax > $Dat->Size() && $Set->Get('BBS_READONLY') ne 'on') {
if ($rmax > $Dat->Size() && $Set->Get('BBS_READONLY') ne 'on' && !$isstop) {
my $cookName = '';
my $cookMail = '';
my $tm = int(time);
Expand Down

0 comments on commit afa76a4

Please sign in to comment.