朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

Typecho登陆后归档页面私密文章不显示的解决方法

Typecho登陆后,打开归档页面,设置为“私密”属性的文章并不能显示,一定程度上影响了使用体验。

编辑Typecho根目录下的var/Widget/Contents/Post/Recent.php 文件,将

$this->db->fetchAll($this->select()
->where('table.contents.status = ?', 'publish')
->where('table.contents.created options->time)
->where('table.contents.type = ?', 'post')
->order('table.contents.created', Typecho_Db::SORT_DESC)
->limit($this->parameter->pageSize), array($this, 'push'));

改为

if ($this->user->hasLogin()) {
    $this->db->fetchAll($this->select()
    ->where('table.contents.status = ? OR table.contents.status = ?', 'publish','private')
    ->where('table.contents.created options->time)
    ->where('table.contents.type = ?', 'post')
    ->order('table.contents.created', Typecho_Db::SORT_DESC)
    ->limit($this->parameter->pageSize), array($this, 'push'));
} else {
    $this->db->fetchAll($this->select()
    ->where('table.contents.status = ?', 'publish')
    ->where('table.contents.created options->time)
    ->where('table.contents.type = ?', 'post')
    ->order('table.contents.created', Typecho_Db::SORT_DESC)
    ->limit($this->parameter->pageSize), array($this, 'push'));
}

修改完成后,登录并打开归档页面,就可以看到设置为“私密”的文章啦


文章来源于互联网:Typecho登陆后归档页面私密文章不显示的解决方法

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » Typecho登陆后归档页面私密文章不显示的解决方法

评论 163

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #165

    Everything what you want to know about pills. Top 100 Searched Drugs.
    buying cheap nexium online
    drug information and news for professionals and consumers. Everything about medicine.

    JamesSoymn2小时前回复
  2. #164

    Read information now. Prescription Drug Information, Interactions & Side.
    lisinopril 10 mg for sale without prescription
    drug information and news for professionals and consumers. Prescription Drug Information, Interactions & Side.

    WillieErert4小时前回复
  3. #163

    buy stromectol 3 mg Many of these causes can easily be fixed or reversed with the help of your OB- GYN, who can also refer you to a fertility specialist if it becomes necessary

    ariflette14小时前回复
  4. #162

    Medscape Drugs & Diseases. drug information and news for professionals and consumers.
    stromectol
    Get information now. Best and news about drug.

    KevinCaf1天前回复
  5. #161

    Everything information about medication. Read here.
    https://stromectolst.com/# ivermectin drug
    п»їMedicament prescribing information. Read now.

    Ronaldhax1天前回复
  6. #160

    п»їMedicament prescribing information. Read information now.
    ivermectin 50 mg
    Some trends of drugs. Everything information about medication.

    Zacharybor2天前回复
  7. #159

    The FWT2HL were observed in 56 subjects 6 and also increased with age methotrexate without a prescription

  8. #158

    Best and news about drug. Get here.
    stromectol buy uk
    Get warning information here. Best and news about drug.

    Jesselap2天前回复
  9. #157

    earch our drug database. Long-Term Effects.
    ivermectin oral 0 8
    earch our drug database. Cautions.

    KevinCaf2天前回复
  10. #156

    Cautions. Comprehensive side effect and adverse reaction information.
    ivermectin 50 mg
    Everything what you want to know about pills. Definitive journal of drugs and therapeutics.

    Ronaldhax3天前回复
  11. #155

    Get information now. Drugs information sheet.
    purchase ivermectin
    Drugs information sheet. Medscape Drugs & Diseases.

    KevinCaf3天前回复
  12. #154

    where can i buy clomid over the counter MicroRNA 200c restoration reveals a cytokine profile to enhance M1 macrophage polarization in breast cancer

  13. #153

    Read information now. Everything about medicine.
    stromectol order online
    Drugs information sheet. Read here.

    KevinCaf3天前回复