Amo_lnk博客 - 问题解决方案汇总 http://www.amolnk.top/index.php/category/问题解决方案汇总/ zh-CN 问题解决方案汇总 Thu, 12 Oct 2017 20:08:00 +0800 Thu, 12 Oct 2017 20:08:00 +0800 typecho增加回复可见功能 http://www.amolnk.top/index.php/2017/10/12/32.html http://www.amolnk.top/index.php/2017/10/12/32.html Thu, 12 Oct 2017 20:08:00 +0800 Amo_lnk type没有关于回复可见的插件,因为毕竟是博客不是论坛
但是我们想要回复可见的效果怎么办
我们需要手动修改post主题模板文件

这是要替换的代码

<?php
    $db = Typecho_Db::get();
    $sql = $db->select()->from('table.comments')
        ->where('cid = ?',$this->cid)
        ->where('mail = ?', $this->remember('mail',true))
        ->limit(1);
    $result = $db->fetchAll($sql);
    if($this->user->hasLogin() || $result) {
        $content = preg_replace("/\[hide\](.*?)\[\/hide\]/sm",'<div class="reply2view">$1</div>',$this->content);
    }
    else{
        $content = preg_replace("/\[hide\](.*?)\[\/hide\]/sm",'<div class="reply2view">此处内容需要评论回复后方可阅读。</div>',$this->content);
    }
    echo $content;
?>

替换模板 post.php 中的

使用方法, 在写文章需要隐藏部分内容时用以下写法

为了让隐藏内容更加美观,我们需要对其设置css样式,放在主题文件夹中的css文件中

.reply2view {
    background:#f8f8f8;
    padding:10px 10px 10px 40px;
    position:relative
}
]]>
0 http://www.amolnk.top/index.php/2017/10/12/32.html#comments http://www.amolnk.top/index.php/feed/2017/10/12/32.html
Linux -- Lantern 无法启动 http://www.amolnk.top/index.php/2017/10/09/4.html http://www.amolnk.top/index.php/2017/10/09/4.html Mon, 09 Oct 2017 09:24:00 +0800 Amo_lnk 问题:
今天安装了Lantern之后,不能启动起来,一闪而过
命令行里启动,包如下错误:

/.lantern/bin/lantern: error while loading shared libraries: libappindicator3.so.1: cannot open shared object file: No such file or directory  
尝试:
# apt-cache search libappindicator3  
  
gir1.2-appindicator3-0.1 - Typelib files for libappindicator3-1  
<span style="margin: 0px; padding: 0px;">libappindicator3-1</span> - allow applications to export a menu into the panel -- GTK3 version  
libappindicator3-dev - allow applications to export a menu into the panel -- GTK3 development  
   

安装 apt-get install libappindicator3-1

结果:
可以愉快的玩耍了

]]>
0 http://www.amolnk.top/index.php/2017/10/09/4.html#comments http://www.amolnk.top/index.php/feed/2017/10/09/4.html