*/}}
Browse Source

fix visibility

YimingWu 1 week ago
parent
commit
736ec66029
1 changed files with 9 additions and 9 deletions
  1. 9 9
      index.php

+ 9 - 9
index.php

@@ -2279,7 +2279,7 @@ blockquote{border-left:2px solid black;}
         return $replacement;
     }
     
-    function CanShowPost(&$p){
+    function CanShowPost(&$p,$in_recent=false){
         if(!isset($p) || isset($p['comment_to'])) return false;
         $is_mark_exp = (isset($p['tid'])&&isset($p['tid']['exp'])&&$p['tid']['exp']) || (isset($p['mark_value'])&&$p['mark_value']==6);
         $is_mark_slf = (isset($p['tid'])&&isset($p['tid']['slf'])&&$p['tid']['slf']) || (isset($p['mark_value'])&&$p['mark_value']>=7);
@@ -2294,7 +2294,7 @@ blockquote{border-left:2px solid black;}
                 if($is_mark_exp) return false;
                 return true;
             }
-            if($this->NotesView && !$is_mark_sln){ return false; }
+            if($this->NotesView && !$is_mark_sln && $in_recent){ return false; }
             return true;
         }else{
             if($is_mark_exp) return true;
@@ -3256,7 +3256,7 @@ blockquote{border-left:2px solid black;}
             <li class='hidden_m'><a href='?gallery=default' onclick='ShowWaitingBar()'><?=$this->T('画廊')?></a></li>
             <li class='hidden_on_desktop_force block_m smaller'>&nbsp;</li>
             <li class='hidden_on_desktop_force block_m bigger'>
-                <a href='<?=$INDEXPHP?>?part=recent' onclick='ShowWaitingBar()'><?=$this->NotesView?$this->T('笔记'):$this->T('最近')?></a>
+                <a href='<?=$INDEXPHP?>?part=recent' onclick='ShowWaitingBar()'><?=$this->NotesView?$this->T('备忘录'):$this->T('最近')?></a>
                 <?php if($this->LoggedIn){ ?> | <span class='gray invert_a'>
                     <a href='<?=$INDEXPHP?>?set_notes_view=<?=$this->NotesView?'0':'1'?>'>N</a>
                     <a href='<?=$INDEXPHP?>?comments=all'>@</a> <a href='<?=$INDEXPHP?>?statistics=all'>%</a>
@@ -3329,7 +3329,7 @@ blockquote{border-left:2px solid black;}
                   oninput=\"la_auto_grow(this);\" onload=\"la_auto_grow(this);\">{$this->T('有什么想说的')}</textarea>
         <input class='button' form=\"post_form\" type=\"submit\" name='post_button' value='{$this->T('发送')}' 
             onclick='ShowWaitingBar();' />
-        <input class='button' form=\"post_form\" type=\"submit\" name='post_button_note' value='{$this->T('笔记')}' 
+        <input class='button' form=\"post_form\" type=\"submit\" name='post_button_note' value='{$this->T('备忘')}' 
             onclick='ShowWaitingBar();' />
         | <a class='gray smaller pointer' onclick='ShowSideUploader();'>{$this->T('图片')}</a>
         <div style='float:right;'>
@@ -3545,7 +3545,7 @@ blockquote{border-left:2px solid black;}
         if($this->LoggedIn && $this->NotesView){ $this->SpecialPinned=$this->SpecialPinnedNotes; }
         if(!isset($search_term) && !isset($category) &&
             (isset($this->SpecialPinned) && ($p = &$this->GetPost($this->SpecialPinned))!=NULL && !$this->CurrentOffset) &&
-            $this->CanShowPost($p)){
+            $this->CanShowPost($p,true)){
             $this->MakeSinglePostV2($p, true, false, "active_post", false, true, false, false, false, true, false);
         }
         $this->SpecialPinned=$tmppinned;
@@ -3554,7 +3554,7 @@ blockquote{border-left:2px solid black;}
         }
         $STR.="<br /><h2>".(isset($search_term)?$this->T('搜索'):
                                 (isset($category)?("<span class='gray'>".$this->T('分类')."</span> ".
-                                    ($category=='none'?$this->T('未分类'):$this->T($category))):($this->NotesView?$this->T('笔记'):$this->T('最近')).
+                                    ($category=='none'?$this->T('未分类'):$this->T($category))):($this->NotesView?$this->T('备忘录'):$this->T('最近')).
                                     "<span class='gray invert_a hidden_on_print'>".//"<a href='index.php?&set_wayback=true'>↶</a>".
                                     ($this->LoggedIn?" <a href='".$INDEXPHP."?set_notes_view=".($this->NotesView?'0':'1')."'>N</a> ".
                                     "<a href='".$INDEXPHP."?comments=all'>@</a> <a href='".$INDEXPHP."?statistics=all'>%</a>":"")."</span>")).
@@ -3575,7 +3575,7 @@ blockquote{border-left:2px solid black;}
         $this->PostsPerPage=20;
         $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;
+            if(!$this->CanShowPost($p,true) || $this->SkipProduct($p)) continue;
             if(isset($p['tid'])){ /* Should always be set. */
                 $th = &$p['tid']; if($p['tid']['count']==0) continue;
                 if(!isset($search_term)) { $p = &$th['last']; }
@@ -3826,7 +3826,7 @@ blockquote{border-left:2px solid black;}
             }?>
             <h2><?=isset($search_term)?$this->T('搜索'):
                                 (isset($category)?("<span class='gray'>".$this->T('分类')."</span> ".
-                                    ($category=='none'?$this->T('未分类'):$this->T($category))):($this->NotesView?$this->T('笔记'):$this->T('最近')).
+                                    ($category=='none'?$this->T('未分类'):$this->T($category))):($this->NotesView?$this->T('备忘录'):$this->T('最近')).
                                     " <span class='gray invert_a hidden_on_print'>".//"<a href='index.php?&set_wayback=true'>↶</a>".
                                     ($this->LoggedIn?"<a href='$INDEXPHP?comments=all'>@</a> <a href='$INDEXPHP?statistics=all'>%</a>":"")."</span>")?></h2><br />
             <?php if(isset($search_term)){ ?>
@@ -5003,7 +5003,7 @@ blockquote{border-left:2px solid black;}
                     <tr><td><?=$this->T('置顶文')?><?=isset($this->SpecialPinned)?"<a href='?post=".$this->SpecialPinned."'>→</a>":""?></td>
                         <td><input type="text" form="settings_form" id='settings_special_pinned' name='settings_special_pinned'
                         value='<?=$this->SpecialPinned?>'/></td></tr>
-                    <tr><td><?=$this->T('置顶笔记')?><?=isset($this->SpecialPinnedNotes)?"<a href='?post=".$this->SpecialPinnedNotes."'>→</a>":""?></td>
+                    <tr><td><?=$this->T('置顶备忘')?><?=isset($this->SpecialPinnedNotes)?"<a href='?post=".$this->SpecialPinnedNotes."'>→</a>":""?></td>
                         <td><input type="text" form="settings_form" id='settings_special_pinned_notes' name='settings_special_pinned_notes'
                         value='<?=$this->SpecialPinnedNotes?>'/></td></tr>
                     <tr><td><?=$this->T('默认相册')?></td>