Skip to content

Commit

Permalink
v1.66.2
Browse files Browse the repository at this point in the history
  • Loading branch information
satopian committed Dec 30, 2024
1 parent 6f65fa8 commit 9992303
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions petitnote/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@
$set_nsfw = false;

// 年齢確認を必須にする
// する: true しない: false
// する: trueで掲示板のすべてのコンテンツの閲覧に年齢確認確認が必要になります。
// する: trueで掲示板のすべてのコンテンツの閲覧に年齢確認が必要になります。
// 年齢確認ページ以外のコンテンツは検索エンジンから認識されなくなります。
// する: true しない: false

// $age_check_required_to_view = true;
$age_check_required_to_view = false;
Expand Down Expand Up @@ -258,8 +258,8 @@
// 投稿時の「閲覧注意に設定する」のチェックボックスは表示されません。
// する: true しない: false

$set_all_images_to_nsfw = true;
// $set_all_images_to_nsfw = false;
// $set_all_images_to_nsfw = true;
$set_all_images_to_nsfw = false;

// 描画時間非表示の設定
// する: trueで投稿時にペイント時間の表示/非表示を切り替える事ができるようになります。
Expand Down
3 changes: 2 additions & 1 deletion petitnote/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function age_check(): void {

$agecheck_passed = (bool)filter_input(INPUT_POST,'agecheck_passed',FILTER_VALIDATE_BOOLEAN);
if($agecheck_passed){
setcookie("agecheck_passed",$aikotoba, time()+(86400*30),"","",false,true);//1ヶ月
setcookie("agecheck_passed","1", time()+(86400*30),"","",false,true);//1ヶ月
}
// 処理が終了したらJavaScriptでリロード
}
Expand All @@ -92,6 +92,7 @@ function age_check_required_to_view(): void {
$underage_submit_url = $underage_submit_url ?? 'https://www.google.com/';

if(!$age_check_required_to_view){
setcookie("agecheck_passed","0", time()+(86400*30),"","",false,true);//1ヶ月
return;
}

Expand Down
8 changes: 4 additions & 4 deletions petitnote/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//Petit Note (c)さとぴあ @satopian 2021-2024
//1スレッド1ログファイル形式のスレッド式画像掲示板
$petit_ver='v1.66.1';
$petit_ver='v1.66.2';
$petit_lot='lot.20241230';

$lang = ($http_langs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '')
Expand Down Expand Up @@ -88,8 +88,8 @@
$subject_input_required = isset($subject_input_required) ? $subject_input_required : false;
$display_search_nav = isset($display_search_nav) ? $display_search_nav : false;
$switch_sns = isset($switch_sns) ? $switch_sns : true;
$sns_window_width = isset($sns_window_width) ? (int)$sns_window_width : 800;
$sns_window_height = isset($sns_window_height) ? (int)$sns_window_height : 800;
$sns_window_width = isset($sns_window_width) ? (int)$sns_window_width : 600;
$sns_window_height = isset($sns_window_height) ? (int)$sns_window_height : 600;
$use_misskey_note = isset($use_misskey_note) ? $use_misskey_note : true;
$sort_comments_by_newest = isset($sort_comments_by_newest) ? $sort_comments_by_newest : false;
$pmin_w = isset($pmin_w) ? $pmin_w : 300;//幅
Expand Down Expand Up @@ -2521,7 +2521,7 @@ function view(): void {
function res (): void {
global $use_aikotoba,$use_upload,$home,$skindir,$root_url,$use_res_upload,$max_kb,$mark_sensitive_image,$only_admin_can_reply,$use_misskey_note;
global $boardname,$max_res,$petit_ver,$petit_lot,$set_nsfw,$use_sns_button,$deny_all_posts,$sage_all,$view_other_works,$en,$use_diary,$nsfw_checked;
global $use_paintbbs_neo,$use_chickenpaint,$use_klecs,$use_tegaki,$use_axnos,$display_link_back_to_home,$display_search_nav,$switch_sns,$sns_window_width,$sns_window_height,$sort_comments_by_newest,$use_url_input_field;
global $use_paintbbs_neo,$use_chickenpaint,$use_klecs,$use_tegaki,$use_axnos,$display_link_back_to_home,$display_search_nav,$switch_sns,$sns_window_width,$sns_window_height,$sort_comments_by_newest,$use_url_input_field,$set_all_images_to_nsfw;

aikotoba_required_to_view();

Expand Down
2 changes: 1 addition & 1 deletion petitnote/template/basic/res.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta property="og:type" content="article">
<meta property="og:url" content="<?=h($root_url)?>?resno=<?= h($out[0][0]['no'])?>">
<!-- 閲覧注意 またはNSFWが設定されている時は ogp imageを表示しない -->
<?php if(!((isset($set_nsfw)&&$set_nsfw)||$out[0][0]['hide_thumbnail'])):?>
<?php if(!((isset($set_nsfw)&&$set_nsfw)||$out[0][0]['hide_thumbnail']||$set_all_images_to_nsfw)):?>
<!-- thumbnail -->
<?php if($out[0][0]['thumbnail']):?>
<meta property="og:image" content="<?=h($root_url)?>thumbnail/<?=h($out[0][0]['thumbnail'])?>">
Expand Down

0 comments on commit 9992303

Please sign in to comment.