途说笔记

终不似,少年游。

做个收藏,免得再找来找去.

普通 8 评 466 度

侧边栏评论屏蔽作者/管理员:

找到 include/lib/cache.php 缓存函数文件中的:

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "comment WHERE hide='n' ORDER BY date DESC LIMIT 0, $index_comnum");

修改为:

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "comment WHERE hide='n' AND mail!='hyear@126.com' ORDER BY date DESC LIMIT 0, $index_comnum");

此方法为通过邮箱屏蔽. 原文地址:http://www.happyfav.net/emlog-recentcomments.html

Gravatar头像被墙临时解决办法:

找到 include/lib/function.base.php中的

$avatar = "http://www.gravatar.com/avatar/$hash?s=$s&d=$d&r=$g";

修改为:

$avatar = "https://secure.gravatar.com/avatar/$hash?s=$s&d=$d&r=$g";

原文地址:http://bbs.emlog.net/thread-38826-1-1.html

@20141214
8 评论
    小黎IE BrowserWindows 7
    2015年01月21日回复

    头像被墙已经机智的改成了多说的了,心好累。

    李明IE BrowserWindows 7
    2014年12月05日回复

    使用了,谢谢分享!

      动力火柴IE BrowserWindows 7
      2014年12月05日回复

      @李明 @李明:李明坚挺啊,希望一直坚挺下去

        李明IE BrowserWindows 7
        2014年12月08日

        @动力火柴 @动力火柴:谢谢支持!

    相约2015IE BrowserWindows 7
    2014年12月05日回复

    再次检查了一下代码,原来是你给的,是汉语输入下的“”‘’,更改为英文输入状态下的就好了。我的站也弄了一下。这是今天逛博,时大的收获。谢谢哈。

      动力火柴IE BrowserWindows 7
      2014年12月05日回复

      @相约2015 @相约2015:非常抱歉,不过搞明白了就好.我尽量把全角符号替换了.

    相约2015IE BrowserWindows 7
    2014年12月05日回复

    试了一下,EM5.3好像不得,修改上传覆盖后,更新缓存时,提示:“SQL语句执行错误:SELECT * FROM emlog_comment WHERE hide=’n’ AND mail!=’95249542@qq.com’ ORDER BY date DESC LIMIT 0, 10
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@qq.com’ ORDER BY date DESC LIMIT 0, 10' at line 1”

      南无乐乐IE BrowserWindows 7
      2014年12月30日回复

      @相约2015 @相约2015:你可以试试改成mail not like '%95249542%'