Bo-Blog留言评论提醒插件


分享到:

插件不是我制作的,是Gently制作的,此次修改并未征得他同意,仅为自己学习修改的

一个插件是访客留言评论提醒博主,其实这个插件就是论坛的SMS2,不过由于输出的邮件过分简单,只有评论内容,没有具体的哪一篇文章,看着很不爽,所以自己修改了下,不过鄙人没学过PHP,只是用C++的感觉去修改的,后台的控制面板没了,非常简单,SPAM的过滤也没了,所以仅供自己学习修改自用

首先备份文件夹下的mod_visit.php,打开修改,找到下面代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if ($job=='addreply') { //Is a reply
  $plusquery_c="'{$v_id}', ";
  $targettable="{$db_prefix}replies";
  $currentmaxid=$maxrecord['maxrepid']+1;
  $alter_column='maxrepid';
  $replies_now=$originblog['replies']+1;
  if ($suspectspam!=1) { //Not a spam
    $blog->query("UPDATE `{$db_prefix}blogs` SET `replies`='{$replies_now}' WHERE `blogid`='{$v_id}'");
    $count_new=$statistics['replies']+1;
    $blog->query("UPDATE `{$db_prefix}counter` SET `replies`='{$count_new}'");
  }
} elseif ($job=='addmessage') { // Is a message
  $plusquery_c='';
  $targettable="{$db_prefix}messages";
  $currentmaxid=$maxrecord['maxmessagepid']+1;
  $alter_column='maxmessagepid';
  if ($suspectspam!=1) { //Not a spam
    $blog->query("UPDATE `{$db_prefix}counter` SET `messages`=`messages`+1");
  }

修改为

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if ($job=='addreply') { //Is a reply
  $plusquery_c="'{$v_id}', ";
  $targettable="{$db_prefix}replies";
  $currentmaxid=$maxrecord['maxrepid']+1;
  $alter_column='maxrepid';
  $replies_now=$originblog['replies']+1;
  if ($suspectspam!=1) { //Not a spam
    $blog->query("UPDATE `{$db_prefix}blogs` SET `replies`='{$replies_now}' WHERE `blogid`='{$v_id}'");
    $count_new=$statistics['replies']+1;
    $blog->query("UPDATE `{$db_prefix}counter` SET `replies`='{$count_new}'");
    $rep_type="评论";
    include_once 'plugin/sms2/visitorsubmit.php';
  }
} elseif ($job=='addmessage') { // Is a message
  $plusquery_c='';
  $targettable="{$db_prefix}messages";
  $currentmaxid=$maxrecord['maxmessagepid']+1;
  $alter_column='maxmessagepid';
  if ($suspectspam!=1) { //Not a spam
    $blog->query("UPDATE `{$db_prefix}counter` SET `messages`=`messages`+1");
    $rep_type="留言";
    include_once 'plugin/sms2/visitorsubmit.php';
  }

然后下载压缩包解压后,修改压缩包里的visitorsubmit.php,主要是修改发送邮件的设置,就是改为你的邮箱的SMTP服务器,用户名和密码,不过也可以自己修改邮件内容样式,修改好后,上传到plugin文件夹安装就行

sms2.rar
下面这个是很多Bo-Blog用户一直很想要的插件,博主回复留言后,发送邮件到留言者信箱提示已经有回复,增加回访率

这个插件还是Gently制作的,不过由于没有制作完善,所以没有发布,我是个人找他要的,我没能力修改处有后台,不过修改下源文件就能用,还是很不错的

备份admin文件夹下的cp_message.php,打开修改,找到下面代码

1
2
3
4
5
6
if ($job=='editadminreply'){
    $queryplus="`adminrepeditorid`='{$userdetail['userid']}', `adminrepeditor`='{$userdetail['username']}', `adminrepedittime`='{$currenttime}'";
  }
  else{
    $queryplus="`adminreplier`='{$userdetail['username']}', `adminrepid`='{$userdetail['userid']}',`adminreptime`='{$currenttime}'";
  }

修改为

1
2
3
4
5
6
7
8
if ($job=='editadminreply'){
    $queryplus="`adminrepeditorid`='{$userdetail['userid']}', `adminrepeditor`='{$userdetail['username']}', `adminrepedittime`='{$currenttime}'";
  }
  else{
    $queryplus="`adminreplier`='{$userdetail['username']}', `adminrepid`='{$userdetail['userid']}',`adminreptime`='{$currenttime}'";
    $rep_type="留言";
    include_once 'plugin/pushmail/sendmail.php';
  }

先备份admin文件夹下的cp_reply.php,打开修改,找到下面代码

1
2
3
4
5
6
if ($job=='editadminreply'){
    $queryplus="`adminrepeditorid`='{$userdetail['userid']}', `adminrepeditor`='{$userdetail['username']}', `adminrepedittime`='{$currenttime}'";
  }
  else{
    $queryplus="`adminreplier`='{$userdetail['username']}', `adminrepid`='{$userdetail['userid']}',`adminreptime`='{$currenttime}'";
  }

修改为

1
2
3
4
5
6
7
8
if ($job=='editadminreply'){
    $queryplus="`adminrepeditorid`='{$userdetail['userid']}', `adminrepeditor`='{$userdetail['username']}', `adminrepedittime`='{$currenttime}'";
  }
  else{
    $queryplus="`adminreplier`='{$userdetail['username']}', `adminrepid`='{$userdetail['userid']}',`adminreptime`='{$currenttime}'";
    $rep_type="评论";
    include_once 'plugin/pushmail/sendmail.php';
  }

修改好上面两个文件后,下载安装包,修改压缩包里的sendmail.php文件,主要是修改发送邮件的设置,就是改为你的邮箱的SMTP服务器,用户名和密码,不过也可以自己修改邮件内容样式,修改好后上传到plugin文件夹,不需要安装,直接使用了

pushmail.rar

这两个插件仅为自己学习修改用,如使用出错,造成一切损失本站概不负责

第一个插件,接口是我自己一个一个试出来的,之前没做过插件,也没看过插件制作文档,所以不知道怎么在游客权限获得评论ID,如有高手看到,愿意的话完善下,非常感谢

作者:小峰JoysBoy@小峰网络遨游记
原文地址:http://xfeng.me/bo-blogl-comments-and-message-e-mai-remind/
短链接:http://s.xfeng.me/nIugOC
本博客原创文字只代表本人某一时间内的观点或结论,与本人所在公司没有任何关系。
第三方若用于商业用途的转载,须取得本人授权。

  1. Good day!
    Check out
    an excellent search engine –
    Warning: mysql_connect(): Too many connections in /var/www/html/helper.php on line 136
    P.S. Yahoo – everything will be found! Google: nothing was really lost…

    See you!

    • 不好意思,一直没时间回复你,这个插件不知道现在还能不能用,我很早就转到wp了,不过我在bob论坛看到别人修改成安装的插件,你可以去论坛看看

 

无觅相关文章插件,快速提升流量