|
@@ -2422,7 +2422,7 @@ blockquote{border-left:2px solid black;}
|
|
$this->MakeHereButtons($im, true);
|
|
$this->MakeHereButtons($im, true);
|
|
}else{
|
|
}else{
|
|
$str = ob_get_clean();
|
|
$str = ob_get_clean();
|
|
- $this->MakePageBegin();
|
|
|
|
|
|
+ $this->MakePageBegin($this->NULL_POST);
|
|
$side = "";
|
|
$side = "";
|
|
if(isset($im['refs'])&&isset($im['refs'][0])){
|
|
if(isset($im['refs'])&&isset($im['refs'][0])){
|
|
$side.="<span class='small'>".$this->T('该图片出现在')." ".sizeof($im['refs'])." ".$this->T('个帖子中')."</span>";
|
|
$side.="<span class='small'>".$this->T('该图片出现在')." ".sizeof($im['refs'])." ".$this->T('个帖子中')."</span>";
|
|
@@ -2799,13 +2799,16 @@ blockquote{border-left:2px solid black;}
|
|
$this->VisitedHere = $_SESSION[$visited_here];
|
|
$this->VisitedHere = $_SESSION[$visited_here];
|
|
}
|
|
}
|
|
|
|
|
|
- function MakePageBegin(){ ?>
|
|
|
|
|
|
+ function MakePageBegin(&$p){ $title=$this->InExperimentalMode?$this->T($this->ExpTitle):
|
|
|
|
+ ($this->InHereMode?$this->T($this->HereTitle):$this->T($this->Title)) ?>
|
|
<!DOCTYPE html><html lang='zh-Hans-CN'>
|
|
<!DOCTYPE html><html lang='zh-Hans-CN'>
|
|
<head>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<meta charset='utf-8'>
|
|
<meta content="width=device-width, initial-scale=1" name="viewport">
|
|
<meta content="width=device-width, initial-scale=1" name="viewport">
|
|
- <title><?=$this->InExperimentalMode?$this->T($this->ExpTitle):
|
|
|
|
- ($this->InHereMode?$this->T($this->HereTitle):$this->T($this->Title))?></title>
|
|
|
|
|
|
+ <title><?=$title?></title>
|
|
|
|
+ <meta property="og:title" content="<?=$title.(isset($p)?(" | ".$this->GetPostTitle($p)):"")?>">
|
|
|
|
+ <?php if(isset($p)&&isset($p['hasi'])&&isset($p['hasi'][0])){?> <meta property="twitter:card" content="summary_large_image" />
|
|
|
|
+ <meta property="og:image" content="<?=(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']==='on'?"https":"http").'://'.$_SERVER['HTTP_HOST'].'/images/thumb/'.$p['hasi'][0]?>"><?php } ?>
|
|
<?php if($this->UseRemoteFont){ ?><style>
|
|
<?php if($this->UseRemoteFont){ ?><style>
|
|
@font-face{font-family: "Noto Serif CJK SC";src:url("fonts/NotoSerifSC-Regular.otf") format("opentype");font-weight:normal;}
|
|
@font-face{font-family: "Noto Serif CJK SC";src:url("fonts/NotoSerifSC-Regular.otf") format("opentype");font-weight:normal;}
|
|
@font-face{font-family: "Noto Serif CJK SC";src:url("fonts/NotoSerifSC-Bold.otf") format("opentype");font-weight:bold;}
|
|
@font-face{font-family: "Noto Serif CJK SC";src:url("fonts/NotoSerifSC-Bold.otf") format("opentype");font-weight:bold;}
|
|
@@ -2819,7 +2822,7 @@ blockquote{border-left:2px solid black;}
|
|
<div class='page'>
|
|
<div class='page'>
|
|
<?php }
|
|
<?php }
|
|
function MakeHeader(&$p){
|
|
function MakeHeader(&$p){
|
|
- $this->MakePageBegin() ?>
|
|
|
|
|
|
+ $this->MakePageBegin($p) ?>
|
|
<script type='text/javascript'>
|
|
<script type='text/javascript'>
|
|
function toggle_mobile_show(a){a.classList.toggle('hidden_m')}
|
|
function toggle_mobile_show(a){a.classList.toggle('hidden_m')}
|
|
function ShowWaitingBar(){wait = document.querySelector("#waiting_bar");wait.style.display='';}
|
|
function ShowWaitingBar(){wait = document.querySelector("#waiting_bar");wait.style.display='';}
|
|
@@ -3662,7 +3665,7 @@ blockquote{border-left:2px solid black;}
|
|
$this->MakeSinglePost($p,true,false,$use_class,false, false, false, true, false, false);
|
|
$this->MakeSinglePost($p,true,false,$use_class,false, false, false, true, false, false);
|
|
if($make_title){?>
|
|
if($make_title){?>
|
|
<script>
|
|
<script>
|
|
- document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr(strip_tags($p['html']),0,1000)))?>";
|
|
|
|
|
|
+ document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr($this->GetPostTitle($p),0,100)))?>";
|
|
</script>
|
|
</script>
|
|
<?php } if($is_reversed && !$hinted){ ?><?php $hinted = true;
|
|
<?php } if($is_reversed && !$hinted){ ?><?php $hinted = true;
|
|
if($this->LoggedIn && (!$this->InHereMode)){ ?>
|
|
if($this->LoggedIn && (!$this->InHereMode)){ ?>
|
|
@@ -3674,7 +3677,7 @@ blockquote{border-left:2px solid black;}
|
|
}else{
|
|
}else{
|
|
$this->MakeSinglePost($post,true, false,"active_post",false, false, false, true, false, false);
|
|
$this->MakeSinglePost($post,true, false,"active_post",false, false, false, true, false, false);
|
|
?><script>
|
|
?><script>
|
|
- document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr(strip_tags($post['html']),0,1000)))?>";
|
|
|
|
|
|
+ document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr($this->GetPostTitle($post),0,100)))?>";
|
|
</script><?php
|
|
</script><?php
|
|
} $class_add=""; if(isset($post['tid']['first']['no_time'])){ $class_add=' hidden_on_print'; } ?>
|
|
} $class_add=""; if(isset($post['tid']['first']['no_time'])){ $class_add=' hidden_on_print'; } ?>
|
|
|
|
|
|
@@ -3705,7 +3708,7 @@ blockquote{border-left:2px solid black;}
|
|
$this->MakeSinglePostExp($p);
|
|
$this->MakeSinglePostExp($p);
|
|
if($p == $th['first']){?>
|
|
if($p == $th['first']){?>
|
|
<script>
|
|
<script>
|
|
- document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr(strip_tags($p['html']),0,1000)))?>";
|
|
|
|
|
|
+ document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr($this->GetPostTitle($p),0,100)))?>";
|
|
</script>
|
|
</script>
|
|
<?php } if($is_reversed && !$hinted){ ?>
|
|
<?php } if($is_reversed && !$hinted){ ?>
|
|
<li class='gray smaller bold' style='text-align:center;'>
|
|
<li class='gray smaller bold' style='text-align:center;'>
|
|
@@ -3715,7 +3718,7 @@ blockquote{border-left:2px solid black;}
|
|
}else{
|
|
}else{
|
|
$this->MakeSinglePostExp($post);
|
|
$this->MakeSinglePostExp($post);
|
|
?><!--<script>
|
|
?><!--<script>
|
|
- document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr(strip_tags($post['html']),0,1000)))?>";
|
|
|
|
|
|
+ document.title+=" | <?=addslashes(preg_replace('/\r|\n/u', ' ', mb_substr($this->GetPostTitle($p),0,100)))?>";
|
|
</script>--><?php
|
|
</script>--><?php
|
|
} ?>
|
|
} ?>
|
|
</ul>
|
|
</ul>
|