|
@@ -538,7 +538,7 @@ header a:hover,.button:hover{color:%gray% !important;}
|
|
|
.invert_a,.invert_a a{color:%gray%;text-decoration:none;}
|
|
|
.invert_a:hover,.invert_a a:hover{color:%black% !important;}
|
|
|
.gray,.gray a{color:%gray%;}
|
|
|
-hr{border:1px solid %gray%aa;}
|
|
|
+hr{border:1px solid %gray%;}
|
|
|
header ul,.small_footer ul,.small_footer span,header li,.small_footer li{display:inline-block;}
|
|
|
header li::before,.small_footer li::before{content:' - '}
|
|
|
header h1,header h2,header h3,header h4,header h5,header p{display:inline;font-size:1rem;}
|
|
@@ -583,7 +583,7 @@ overflow:auto;max-height:calc(100vh - 2.6em);}
|
|
|
.linked_posts{margin-right:1.5em;padding:0.5em;padding-left:2.5em;background-color:%grayslice%;box-shadow:0px 0.2em 0.2em -0.2em inset %shadow%;}
|
|
|
.active_post .linked_posts{background-color:%highlight_slice%;}
|
|
|
input:checked~.linked_posts{display:none;}
|
|
|
-.bkg_recent>.post,.bkg_section{background:%post_white%;box-shadow:0em 0em 0.4em %shadow%;margin-bottom:0.5em;}
|
|
|
+.bkg_recent>.post,.bkg_section{background:%post_white%;box-shadow:0em 0em 0.5em %shadow%;margin-bottom:0.5em;}
|
|
|
.bkg_recent>.post>.post_width :last-child{margin-bottom:0;}
|
|
|
.sticky_title{position:sticky;top:calc(1.6rem + 2px);z-index:1;background-color:%white%;pointer-events:none;}
|
|
|
.center_exp{display:block;width:80%;margin:0 auto;overflow:visible;padding-bottom:1em;}
|
|
@@ -630,9 +630,10 @@ box-shadow:0px 0px 10px %shadow%;}
|
|
|
.pop_menu hr{border:2px solid rgba(0,0,0,0.1);}
|
|
|
.toc{left:60%;width:40%;top:0;position:absolute;}
|
|
|
.post_access{width:1.5rem;top:0;right:0;position:absolute;height:100%;text-align:center;font-weight:bold;background-color:%grayslice%;user-select:none;}
|
|
|
-.post_access:hover{filter:contrast(75%);}.post label{pointer-events:none;}.active_post label{pointer-events:all;}
|
|
|
+.post_access:hover{filter:brightness(150%);}.post label{pointer-events:none;}.active_post label{pointer-events:all;}
|
|
|
.paa{width:1.4rem;min-width:1.4rem;}
|
|
|
.opt_compact .post_access,.ref_compact .post_access{border-right:2px solid %gray%;background-color:%post_white%;right:unset;left:-2em;}
|
|
|
+.active_post .opt_compact .post_access,.active_post .ref_compact .post_access{background-color:%highlight_white%;}
|
|
|
.post_preview{overflow:hidden;margin-bottom:0.4em;background-color:%white%aa;box-shadow: 0px 0px 0.2em %shadow%;}
|
|
|
.post_preview:hover{filter:contrast(90%);}
|
|
|
.active_post .post_preview:hover{filter:contrast(90%);}
|
|
@@ -642,7 +643,7 @@ box-shadow:0px 0px 10px %shadow%;}
|
|
|
.post_ref_hint{text-align:right;}
|
|
|
.page_selector{padding-top:2rem;text-align:center;}
|
|
|
.smaller{font-size:0.85em;} .bigger{font-size:1.3em;} .block{display:block;}
|
|
|
-.restart{text-align:right;padding:0.5rem;background-color:%grayslice%;}
|
|
|
+.restart{text-align:right;padding:0.5rem;background:linear-gradient(to left, %grayslice% 1.5em, %grayslice%00 10em);}
|
|
|
.opt_compact{margin-left:2rem;}.ref_compact{margin-left:1.5rem;}
|
|
|
.post_box_top{padding-bottom:0.3em;padding-top:0.3em;}
|
|
|
.post_box_fixed_bottom{position:sticky;bottom:0em;background-color:%white%;z-index:5;}
|
|
@@ -662,6 +663,7 @@ transition-timing-function:ease-out;padding:1rem;overflow:auto;}
|
|
|
.toc_entry_4{font-size:0.85em;padding-left:1.5rem;}
|
|
|
.toc_entry_5{font-size:0.8em;padding-left:2rem;}
|
|
|
h1,h2,h3,h4,h5{scroll-margin:2.5em;}
|
|
|
+.post h1,.post h2,.post h3,.post h4,.post h5{margin-top:1rem;}
|
|
|
.left ul h1,.left ul h2,.left ul h3,.left ul h4,.left ul h5,.left ul p{font-size:1em;}
|
|
|
.deleted_post{color:%gray%;text-decoration:line-through;}
|
|
|
#file_list{margin-top:0.5em;}
|
|
@@ -682,7 +684,7 @@ h1,h2,h3,h4,h5{scroll-margin:2.5em;}
|
|
|
.post .p_thumb img,.post .p_thumb video{max-height:6rem;}
|
|
|
.p_thumb video{border-bottom:0.4em dashed %black%;border-top:0.4em dashed %black%;}
|
|
|
.p_thumb_end{flex-grow:10000 !important;box-shadow:none;align-items:center;padding:2em !important;}
|
|
|
-.p_thumb_end:hover, .p_thumb_end a:hover{background-color:%gray%40;cursor:pointer;}
|
|
|
+.p_thumb_end:hover, .p_thumb_end a:hover{background-color:%gray%;cursor:pointer;}
|
|
|
.big_image_box{position:fixed;top:0;bottom:0;left:0;width:75%;z-index:95;text-align:center;pointer-events:none;}
|
|
|
.big_image_box *{pointer-events:auto;}
|
|
|
.big_image_box img,.big_image_box video{position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;cursor:unset;}
|
|
@@ -948,15 +950,25 @@ blockquote{border-left:2px solid black;}
|
|
|
.p_row .imd{margin-top:0em;margin-bottom:0em;}
|
|
|
}
|
|
|
";
|
|
|
- $this->style=preg_replace('/%highlight_white%/','#5b3607',$this->style);
|
|
|
- $this->style=preg_replace('/%highlight_slice%/','#734307',$this->style);
|
|
|
- $this->style=preg_replace('/%grayslice%/','#442c0b',$this->style);
|
|
|
- $this->style=preg_replace('/%post_white%/','#2d2110',$this->style);
|
|
|
- $this->style=preg_replace('/%white%/','#231a0d',$this->style);
|
|
|
+ //$this->style=preg_replace('/%highlight_white%/','#5b3607',$this->style);
|
|
|
+ //$this->style=preg_replace('/%highlight_slice%/','#734307',$this->style);
|
|
|
+ //$this->style=preg_replace('/%grayslice%/','#442c0b',$this->style);
|
|
|
+ //$this->style=preg_replace('/%post_white%/','#2d2110',$this->style);
|
|
|
+ //$this->style=preg_replace('/%white%/','#231a0d',$this->style);
|
|
|
+ //$this->style=preg_replace('/%black%/','#f8ca9b',$this->style);
|
|
|
+ //$this->style=preg_replace('/%gray%/','#ac7843',$this->style);
|
|
|
+ //$this->style=preg_replace('/%graybkg%/','#39270e',$this->style);
|
|
|
+ //$this->style=preg_replace('/%shadow%/','#000000cc',$this->style);
|
|
|
+
|
|
|
+ $this->style=preg_replace('/%highlight_white%/','#804a06',$this->style);
|
|
|
+ $this->style=preg_replace('/%highlight_slice%/','#ae6407',$this->style);
|
|
|
+ $this->style=preg_replace('/%grayslice%/','#6a491c',$this->style);
|
|
|
+ $this->style=preg_replace('/%post_white%/','#4a3413',$this->style);
|
|
|
+ $this->style=preg_replace('/%white%/','#2d2214',$this->style);
|
|
|
$this->style=preg_replace('/%black%/','#f8ca9b',$this->style);
|
|
|
- $this->style=preg_replace('/%gray%/','#ac7843',$this->style);
|
|
|
- $this->style=preg_replace('/%graybkg%/','#39270e',$this->style);
|
|
|
- $this->style=preg_replace('/%shadow%/','#000000cc',$this->style);
|
|
|
+ $this->style=preg_replace('/%gray%/','#f8ca9b88',$this->style);
|
|
|
+ $this->style=preg_replace('/%graybkg%/','#a9270e',$this->style);
|
|
|
+ $this->style=preg_replace('/%shadow%/','#000000ee',$this->style);
|
|
|
$f = fopen('styles/main.css','w');
|
|
|
fwrite($f,$this->style);
|
|
|
fclose($f);
|
|
@@ -1021,6 +1033,7 @@ blockquote{border-left:2px solid black;}
|
|
|
$g=[]; $g['name']=$m[1];//$g['count']=0;
|
|
|
if(preg_match('/FEATURED([^;]*?);/u', $m[2], $arg)){ $g['featured']=true; }
|
|
|
if(preg_match('/EXPERIMENTAL([^;]*?);/u', $m[2], $arg)){ $g['experimental']=true; }
|
|
|
+ if(preg_match('/DESCRIPTION\s+([^;]+);/u', $m[2], $arg)){ $g['description']=$arg[1]; }
|
|
|
$this->Galleries[] = $g;
|
|
|
}
|
|
|
if(preg_match_all('/^-\s*([^;]+)\s*?;\s*?(.*)$/mu', $c, $ma, PREG_SET_ORDER)) foreach($ma as $m){
|
|
@@ -1095,6 +1108,7 @@ blockquote{border-left:2px solid black;}
|
|
|
fwrite($f,'GALLERY '.$g['name']);
|
|
|
if(isset($g['featured']) && $g['featured']!=false) { fwrite($f,' FEATURED;'); }
|
|
|
if(isset($g['experimental']) && $g['experimental']!=false) { fwrite($f,' EXPERIMENTAL;'); }
|
|
|
+ if(isset($g['description']) && $g['description']!="") { fwrite($f,' DESCRIPTION '.$g['description'].';'); }
|
|
|
fwrite($f, PHP_EOL);
|
|
|
}
|
|
|
if(isset($this->Images[0]))foreach($this->Images as &$im){
|
|
@@ -1168,7 +1182,7 @@ blockquote{border-left:2px solid black;}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function CompressImage($source, $destination, $thumb_destination, $quality, $sizelim, $abs_max, $ext) {
|
|
|
+ function CompressImage($source, $destination, $thumb_destination, $quality, $sizelim, $abs_max, $ext) {
|
|
|
$img = new Imagick($source); $geo=$img->getImageGeometry(); $img2 = clone $img;
|
|
|
$width=$geo['width']; $height=$geo['height'];
|
|
|
$lim=400;
|
|
@@ -1214,10 +1228,9 @@ blockquote{border-left:2px solid black;}
|
|
|
}
|
|
|
$base = 'images/'.$num;
|
|
|
$thumb = 'images/thumb/'.$num;
|
|
|
- if($ext=='png') $ext='jpg';
|
|
|
- $final_path = $base.'.'.$ext; $final_thumb = $thumb.'.'.$ext; $i=0;
|
|
|
+ $final_path = $base.'.jpg'; $final_thumb = $thumb.'.jpg'; $i=0;
|
|
|
if(!$replace) while(file_exists($final_path)){
|
|
|
- $final_path = $base.strval($i).'.'.$ext; $final_thumb = $thumb.strval($i).'.'.$ext; $i++;
|
|
|
+ $final_path = $base.strval($i).'.jpg'; $final_thumb = $thumb.strval($i).'.jpg'; $i++;
|
|
|
}
|
|
|
if($ext!='gif' && $ext!='mp4'){
|
|
|
$compress = (isset($_GET['compress'])&&$_GET['compress']);
|
|
@@ -1246,7 +1259,7 @@ blockquote{border-left:2px solid black;}
|
|
|
}
|
|
|
return $this->NULL_GALLERY;
|
|
|
}
|
|
|
- function EditGallery($name, $new_name=null, $delete=false, $do_rw=true, $set_featured=null, $set_experimental=null){
|
|
|
+ function EditGallery($name, $new_name=null, $delete=false, $do_rw=true, $set_featured=null, $set_experimental=null,$desc=null){
|
|
|
$this->ReadImages();
|
|
|
$gallery = &$this->GetGallery($name);
|
|
|
if(!isset($gallery)){
|
|
@@ -1267,6 +1280,7 @@ blockquote{border-left:2px solid black;}
|
|
|
if(isset($delete) && $delete) $gallery['deleted'] = true;
|
|
|
if(isset($set_featured)) $gallery['featured'] = $set_featured;
|
|
|
if(isset($set_experimental)) $gallery['experimental'] = $set_experimental;
|
|
|
+ if(isset($desc)) $gallery['description'] = $desc;
|
|
|
}
|
|
|
if($do_rw) { $this->NeedWriteImages = 1; }
|
|
|
}
|
|
@@ -2355,7 +2369,7 @@ blockquote{border-left:2px solid black;}
|
|
|
"<id>".$this->HostURL."/?rss</id>".
|
|
|
"<updated>".$last_updated."</updated>".
|
|
|
"<title>".$this->T($this->Title)."</title>".
|
|
|
- "<link href='".$this->HostURL."/?rss' rel='self'/>".
|
|
|
+ "<link href='".$this->HostURL."/index.php?rss=".($this->LanguageAppendix=='zh'?'zh':'en')."' rel='self'/>".
|
|
|
"<link href='".$this->HostURL."' />".$author;
|
|
|
$i=0;
|
|
|
if(isset($posts[0])) foreach($posts as &$p){
|
|
@@ -2377,9 +2391,9 @@ blockquote{border-left:2px solid black;}
|
|
|
$use_arr=array_reverse($th['arr']); $fp=array_pop($use_arr); array_unshift($use_arr,$fp); }
|
|
|
foreach($use_arr as &$po){
|
|
|
$this->ConvertPost($po);
|
|
|
- if(!isset($title)){$title = $this->GetPostTitle($po, false, false);
|
|
|
- $content.="<id>".$this->HostURL."?post=".$po['id']."</id>";
|
|
|
- $content.="<title>".$title."</title><link rel='alternate' href='".$this->HostURL."/?post=".$po['id']."' />";
|
|
|
+ if(!isset($title)){$title = htmlspecialchars($this->GetPostTitle($po, false, false)); if(!$title){$title='untitled';}
|
|
|
+ $content.="<id>".$this->HostURL."/?post=".$po['id']."</id>";
|
|
|
+ $content.="<title type='html'>".$title."</title><link rel='alternate' href='".$this->HostURL."/?post=".$po['id']."' />";
|
|
|
$content.="<published>".$this->StandardTime($po['id'])."</published>";
|
|
|
$content.="<updated>".$this->StandardTime(isset($po['tid']['last']['version'])?
|
|
|
$po['tid']['last']['version']:$po['tid']['last']['id'])."</updated>".$author;
|
|
@@ -2393,9 +2407,9 @@ blockquote{border-left:2px solid black;}
|
|
|
$content.="</content>";
|
|
|
}else{
|
|
|
$this->ConvertPost($p);
|
|
|
- if(!isset($title)){$title = $this->GetPostTitle($p, false, false);
|
|
|
- $content.="<id>".$this->HostURL."?post=".$p['id']."</id>";
|
|
|
- $content.="<title>".$title."</title><link rel='alternate' href='".$this->HostURL."/?post=".$p['id']."' />";
|
|
|
+ if(!isset($title)){$title = htmlspecialchars($this->GetPostTitle($p, false, false)); if(!$title){$title='untitled';}
|
|
|
+ $content.="<id>".$this->HostURL."/?post=".$p['id']."</id>";
|
|
|
+ $content.="<title type='html'>".$title."</title><link rel='alternate' href='".$this->HostURL."/?post=".$p['id']."' />";
|
|
|
$content.="<published>".$this->StandardTime($p['id'])."</published>";
|
|
|
$content.="<updated>".$this->StandardTime(isset($p['tid']['last']['version'])?
|
|
|
$p['tid']['last']['version']:$p['tid']['last']['id'])."</updated>".$author;}
|
|
@@ -2672,16 +2686,18 @@ blockquote{border-left:2px solid black;}
|
|
|
$old_name = isset($_POST['gallery_edit_old_name'])?$_POST['gallery_edit_old_name']:"";
|
|
|
$new_name = $_POST['gallery_edit_new_name'];
|
|
|
if($old_name!=''){
|
|
|
- $this->EditGallery($old_name, $new_name, false, true, null, null);
|
|
|
+ $desc=isset($_POST['gallery_edit_description'])?$_POST['gallery_edit_description']:null;
|
|
|
+ if(!preg_match('/[0-9]{14}/',$desc))$desc="";
|
|
|
+ $this->EditGallery($old_name, $new_name, false, true, null, null,$desc);
|
|
|
$redirect='?gallery='.$new_name;
|
|
|
}else{
|
|
|
- $this->EditGallery(null, $new_name, false, true, null);
|
|
|
+ $this->EditGallery(null, $new_name, false, true, null,null);
|
|
|
if(isset($_GET['gallery'])) $redirect='?gallery='.$_GET['gallery']; else $redirect='index.php';
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
if(isset($_GET['gallery_edit_delete'])&&$_GET['gallery_edit_delete']!=null){
|
|
|
- $this->EditGallery($_GET['gallery_edit_delete'], null, true, true, null, null);
|
|
|
+ $this->EditGallery($_GET['gallery_edit_delete'], null, true, true, null, null,null);
|
|
|
if(isset($_GET['gallery'])) $redirect='?gallery=main'; else $redirect='index.php';
|
|
|
return 0;
|
|
|
}
|
|
@@ -2857,11 +2873,11 @@ blockquote{border-left:2px solid black;}
|
|
|
}
|
|
|
}
|
|
|
function GetPostTitle(&$post, $h1_only=false, $add_unamed=true){
|
|
|
+ if($h1_only){
|
|
|
+ if(preg_match('/^#\s+(.*?)$/mu',$post['content'],$m)) return $m[1];
|
|
|
+ else return NULL;
|
|
|
+ }
|
|
|
if(!isset($post['title'])){
|
|
|
- if($h1_only){
|
|
|
- if(preg_match('/^#\s+(.*?)$/mu',$post['content'],$m)){$post['title']=$m[1];}
|
|
|
- else return NULL;
|
|
|
- }
|
|
|
if(preg_match('/^#{1,6}\s+(.*?)$/mu',$post['content'],$m)){$post['title']=$m[1];}
|
|
|
else{ $post['title'] = $add_unamed?$this->T('未命名'):"";
|
|
|
if(preg_match('/(.*)$/mu',$post['content'],$m)){
|
|
@@ -3103,6 +3119,16 @@ blockquote{border-left:2px solid black;}
|
|
|
<?php $this->SpecialNavigation;if(isset($this->SpecialNavigation) && ($p = &$this->GetPost($this->SpecialNavigation))!=NULL){
|
|
|
echo $this->GenerateSinglePost($p, false, false, false, false);
|
|
|
} ?>
|
|
|
+ <?php if($this->LanguageAppendix=='zh'){ ?>
|
|
|
+ <li class='smaller gray'>
|
|
|
+ <a href='<?=$this->GetRedirect().'&set_language=en'?>' onclick='ShowWaitingBar()'><b>汉语</b>/English</a></li>
|
|
|
+ <?php }else { ?>
|
|
|
+ <li class='smaller gray'>
|
|
|
+ <a href='<?=$this->GetRedirect().'&set_language=zh'?>' onclick='ShowWaitingBar()'>
|
|
|
+ 汉语/<b>English</b></a>
|
|
|
+ <br class='hidden_on_desktop' />
|
|
|
+ <a id='translate_button' target='_blank'> [Google Translate] </a></li>
|
|
|
+ <?php } ?>
|
|
|
</ul></div>
|
|
|
<?php
|
|
|
}
|
|
@@ -3227,11 +3253,8 @@ blockquote{border-left:2px solid black;}
|
|
|
<?=$is_wide?" style='column-span:all;'":"";?>>
|
|
|
<?php if($mark_value>=0 && !$show_link && $mark_value!='P'){?>
|
|
|
<div class='smaller <?=$is_deleted?"gray":""?>'><?=$mark_value?> <?=$this->T('标记')?></div>
|
|
|
- <?php } ?>
|
|
|
- <?php if($is_top){?>
|
|
|
- <div class='top_post_hint'><?=$this->T('置顶帖子')?><hr /></div>
|
|
|
<?php }
|
|
|
- if(!$side && !$strip_tags){?><div class='post_menu_button _menu_hook' >+</div><?php } ?>
|
|
|
+ if(!$side && !$strip_tags && $show_link){?><div class='post_menu_button _menu_hook' >+</div><?php } ?>
|
|
|
<?=$side?"<a href='?post={$post['id']}' onclick='ShowWaitingBar()'>":""?>
|
|
|
<div class='<?=$side?"":'post_width'?><?=$is_deleted?" deleted_post":""?>'>
|
|
|
<?php if($is_product&&!$generate_anchor){
|
|
@@ -3330,11 +3353,18 @@ blockquote{border-left:2px solid black;}
|
|
|
|
|
|
function MakeRecentPosts($search_term=NULL, $category=NULL){?>
|
|
|
<div class='center' id='div_center'><div><br /></div>
|
|
|
+ <?php if(!isset($search_term) && !isset($category) &&
|
|
|
+ (isset($this->SpecialPinned) && ($p = &$this->GetPost($this->SpecialPinned))!=NULL && !$this->CurrentOffset) &&
|
|
|
+ $this->CanShowPost($p)){
|
|
|
+ ?><ul class='print_column list bkg_section'><?php
|
|
|
+ $this->MakeSinglePost($p, true, false, "active_post", false, true, false, false, false, true, false);
|
|
|
+ ?></ul><br /><?php
|
|
|
+ }?>
|
|
|
<h2><?=isset($search_term)?$this->T('搜索'):
|
|
|
(isset($category)?("<span class='gray'>".$this->T('分类')."</span> ".
|
|
|
($category=='none'?$this->T('未分类'):$this->T($category))):($this->T('最近')).
|
|
|
" <span class='gray invert_a hidden_on_print'>".//"<a href='index.php?&set_wayback=true'>↶</a>".
|
|
|
- ($this->LoggedIn?"<a href='index.php?comments=all'>@</a>":"")."</span>")?></h2>
|
|
|
+ ($this->LoggedIn?"<a href='index.php?comments=all'>@</a>":"")."</span>")?></h2><br />
|
|
|
<?php if(isset($search_term)){ ?>
|
|
|
<form action="index.php" method="post" style='display:none;' id='search_form'></form>
|
|
|
<input id="search_content" name="search_content" rows="4" form='search_form' type='text' value='<?=$search_term?>'>
|
|
@@ -3348,11 +3378,6 @@ blockquote{border-left:2px solid black;}
|
|
|
<?php } ?>
|
|
|
<ul class='print_column list bkg_recent'>
|
|
|
<?php
|
|
|
- if(!isset($search_term) && !isset($category) &&
|
|
|
- (isset($this->SpecialPinned) && ($p = &$this->GetPost($this->SpecialPinned))!=NULL && !$this->CurrentOffset) &&
|
|
|
- $this->CanShowPost($p)){
|
|
|
- $this->MakeSinglePost($p, true, false, false, false, true, false, false, false, true, false);
|
|
|
- }
|
|
|
$i = 0; $last_end_wide = true;
|
|
|
if(isset($this->UsePosts[0])) foreach(array_reverse($this->UsePosts) as &$p){
|
|
|
if(!$this->CanShowPost($p) || $this->SkipProduct($p)) continue;
|
|
@@ -3716,16 +3741,7 @@ blockquote{border-left:2px solid black;}
|
|
|
<li><a href='<?=$this->GetRedirect()?>&toggle_font=true'>
|
|
|
<?=$this->T('切换字体')?>: <?=$this->T($this->UseRemoteFont?"远程":"本地");?></a></li>
|
|
|
<li><a rel="alternate" type="application/rss+xml" href="?rss=<?=$this->LanguageAppendix;?>" />RSS/Atom<sup><?=$this->LanguageAppendix;?></sup></a></li>
|
|
|
- <?php if($this->LanguageAppendix=='zh'){ ?>
|
|
|
- <li class='smaller'>
|
|
|
- <a href='<?=$this->GetRedirect().'&set_language=en'?>' onclick='ShowWaitingBar()'><b>汉语</b>/English</a></li>
|
|
|
- <?php }else { ?>
|
|
|
- <li class='smaller'>
|
|
|
- <a href='<?=$this->GetRedirect().'&set_language=zh'?>' onclick='ShowWaitingBar()'>
|
|
|
- 汉语/<b>English</b></a>
|
|
|
- <br class='hidden_on_desktop' />
|
|
|
- <a id='translate_button' target='_blank'> [Google Translate] </a></li>
|
|
|
- <?php } ?></ul>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<?php }
|
|
@@ -3745,7 +3761,7 @@ blockquote{border-left:2px solid black;}
|
|
|
if($cat){ ?>
|
|
|
<p class='hidden_on_print'><b><?=$this->T('分类')?></b> | <?php foreach($cat as $c){
|
|
|
echo "<a href='?category=".$c."'>".($c=='none'?$this->T('未分类'):$this->T($c))."</a> "; } ?></p>
|
|
|
- <?php } ?>
|
|
|
+ <?php } ?><br class='hidden_on_print' />
|
|
|
<ul class='print_column bkg_section'>
|
|
|
<?php $is_reversed=false;
|
|
|
if($is_thread){
|
|
@@ -4136,8 +4152,7 @@ blockquote{border-left:2px solid black;}
|
|
|
|
|
|
function MakeGallerySection(){
|
|
|
if(!isset($_GET['gallery'])) return;
|
|
|
- $name=NULL; if($_GET['gallery']!='main' && $_GET['gallery']!='trash'){
|
|
|
- $name=$_GET['gallery'];}
|
|
|
+ $name=NULL; if($_GET['gallery']!='main' && $_GET['gallery']!='trash'){ $name=$_GET['gallery'];}
|
|
|
$show_all=0; if(isset($_GET['show_all']) && $_GET['show_all']!='0'){ $show_all=1; } ?>
|
|
|
<script>
|
|
|
document.title+=" | <?=$this->T('画廊')?>";
|
|
@@ -4146,6 +4161,7 @@ blockquote{border-left:2px solid black;}
|
|
|
<h2><?=(isset($name) && ($gal=$this->GetGallery($name))!=NULL)?
|
|
|
("<span class='gray album_hint'>".$this->T('相册').":</span>".$this->T($name)):
|
|
|
($_GET['gallery']=='trash'?$this->T('垃圾桶'):$this->T('画廊'))?></h2>
|
|
|
+ <?php $description=(isset($gal) && isset($gal['description']))?$gal['description']:null; ?>
|
|
|
<div class='hidden_on_desktop'>
|
|
|
<?=$this->T('前往')?>
|
|
|
<select id="gallery_go_to" onchange="window.location.href='?gallery='+this.value;">
|
|
@@ -4199,16 +4215,18 @@ blockquote{border-left:2px solid black;}
|
|
|
<div style='text-align:right;position:relative;' class='invert_a smaller hidden_on_print'>
|
|
|
<div style='position:relative'>
|
|
|
<?php if(isset($name)){ ?>
|
|
|
- <a href='javascript:ShowGalleryEditMenu("<?=$name?>")'><?=$this->T('改名')?></a>
|
|
|
+ <a href='javascript:ShowGalleryEditMenu("<?=$name?>",null)'><?=$this->T('改名')?></a>
|
|
|
+ <a href='javascript:ShowGalleryEditMenu("<?=$name?>","<?=$description?>")'><?=$this->T('描述')?></a>
|
|
|
<?php } ?>
|
|
|
- <a href='javascript:ShowGalleryEditMenu(null)'><?=$this->T('添加')?></a>
|
|
|
+ <a href='javascript:ShowGalleryEditMenu(null,null)'><?=$this->T('添加')?></a>
|
|
|
<div class='pop_menu invert_a' id='gallery_edit_menu' style='display:none;max-width:90%;'>
|
|
|
<form action="<?=$_SERVER['REQUEST_URI']?>&edit_gallery=true"
|
|
|
method="post" style='display:none;' id='gallery_edit_form'></form>
|
|
|
- <a style='float:left;'><?=$this->T('相册名字:')?></a>
|
|
|
+ <a style='float:left;'><?=$this->T('设置为:')?></a>
|
|
|
<a href='javascript:HidePopMenu();'>×</a>
|
|
|
<input type='text' form='gallery_edit_form' name='gallery_edit_new_name' id='gallery_edit_new_name' style='width:10em;'>
|
|
|
<input type='text' form='gallery_edit_form' name='gallery_edit_old_name' id='gallery_edit_old_name' style='display:none'>
|
|
|
+ <input type='text' form='gallery_edit_form' name='gallery_edit_description' id='gallery_edit_description' style='width:10em;display:none'>
|
|
|
<input class='button' type='submit' form='gallery_edit_form'
|
|
|
name='gallery_edit_confirm' id='gallery_edit_confirm' value='<?=$this->T('确认')?>'>
|
|
|
</div>
|
|
@@ -4235,8 +4253,11 @@ blockquote{border-left:2px solid black;}
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <?php } ?>
|
|
|
- <p> </p>
|
|
|
+ <?php } $desc=isset($description)?$this->GetPost($description):null;
|
|
|
+ if(isset($desc)){ ?><ul class='print_column list'><br /><?php
|
|
|
+ $this->MakeSinglePost($desc, false, false, false, false, false, false, false, false, true, false);
|
|
|
+ ?></ul><?php } ?>
|
|
|
+ <br />
|
|
|
<div><div class='p_row'><?php $has_more=$this->GetImageBatch(NULL, $show_all);?>
|
|
|
<div class='p_thumb p_thumb_end' <?=$has_more?"onclick='ThisGetMore(this);'":""?>>
|
|
|
<a onclick='event.preventDefault();' href='index.php?gallery=<?=$_GET['gallery']?>&show_all=1'>
|
|
@@ -4294,11 +4315,14 @@ blockquote{border-left:2px solid black;}
|
|
|
else{ selected_image.splice(selected_image.indexOf(name), 1); elem.classList.remove('p_thumb_selected'); }
|
|
|
count.innerHTML=selected_image.length.toString()
|
|
|
}
|
|
|
- function ShowGalleryEditMenu(old_name){
|
|
|
+ function ShowGalleryEditMenu(old_name,desc){
|
|
|
m = document.querySelector('#gallery_edit_menu');
|
|
|
old = document.querySelector('#gallery_edit_old_name');
|
|
|
newname = document.querySelector('#gallery_edit_new_name');
|
|
|
+ description = document.querySelector('#gallery_edit_description');
|
|
|
m.style.display='block';
|
|
|
+ if(desc!==null){ description.style.display='block';newname.style.display='none';description.value=desc;}
|
|
|
+ else{ description.style.display='none';newname.style.display='';}
|
|
|
if(old_name!=''){ old.value=old_name; newname.value=old.value; }else{ old.value=''; }
|
|
|
}
|
|
|
function ShowDeleteMenu(){
|