|
回复50楼 zhangjingyu 的帖子
zhangjingyu 继续搜索“ping_content”,lib/fourm/ping .class.php if ($params['ifmsg'] && !$atc['anonymous'] && $atc['author'] != $windid) { &nb .. (2018-11-06 14:23) 查看本帖
lib/fourm/ping .class.php 修改为: - if ($params['ifmsg'] && !$atc['anonymous'] && $atc['author'] != $windid) {
- //发消息
- $title = getLangInfo('writemsg','ping_title',array('sender'=>$windid,'receiver'=>$atc['author']));
- /*消息内容$content加判断,以解决消息里评分主题用手机访问看不到帖子内容,原因应该是链接不对15:21 2018-11-6*/
- if($pid == 'tpc'){
- $content = getLangInfo('writemsg','ping_content_shouji',array(
- 'manager' => $windid,
- 'fid' => $atc['fid'],
- 'tid' => $this->tid,
- 'pid' => $pid,
- 'subject' => $atc['subject'],
- 'postdate' => get_date($atc['postdate']),
- 'forum' => strip_tags($this->forum->foruminfo['name']),
- 'affect' => $affect,
- 'admindate' => get_date($timestamp),
- 'reason' => stripslashes($params['atc_content']),
- 'sender' => $windid,
- 'receiver' => $atc['author']
- ));
- }else{
- $content = getLangInfo('writemsg','ping_content',array(
- 'manager' => $windid,
- 'fid' => $atc['fid'],
- 'tid' => $this->tid,
- 'pid' => $pid,
- 'subject' => $atc['subject'],
- 'postdate' => get_date($atc['postdate']),
- 'forum' => strip_tags($this->forum->foruminfo['name']),
- 'affect' => $affect,
- 'admindate' => get_date($timestamp),
- 'reason' => stripslashes($params['atc_content']),
- 'sender' => $windid,
- 'receiver' => $atc['author']
- ));
- }
- $this->sendMessage($atc['author'],$title,$content);
- }
添加判断“if($pid == 'tpc'){”,大意是如果评分帖子是主帖,那么继续执行发送的消息内容为“ping_content_shouji”: $content = getLangInfo('writemsg','ping_content_shouji',array( =================分隔线==================== 2020年4月9日补充。上面修改后的代码中7至19行和22至34行的代码,也就是参数部分,都是一样的,所以这些内容可以不加到判断里面,也就是上面的代码可以精简如下。由于目前一切正常,所以没有具体测试,不过应该没问题。 - if ($params['ifmsg'] && !$atc['anonymous'] && $atc['author'] != $windid) {
- //发消息
- $title = getLangInfo('writemsg','ping_title',array('sender'=>$windid,'receiver'=>$atc['author']));
- /*消息内容$content加判断,以解决消息里评分主题用手机访问看不到帖子内容,原因应该是链接不对15:21 2018-11-6*/
- if($pid == 'tpc'){
- $content = getLangInfo('writemsg','ping_content_shouji',array(
- }else{
- $content = getLangInfo('writemsg','ping_content',array(
- }
- 'manager' => $windid,
- 'fid' => $atc['fid'],
- 'tid' => $this->tid,
- 'pid' => $pid,
- 'subject' => $atc['subject'],
- 'postdate' => get_date($atc['postdate']),
- 'forum' => strip_tags($this->forum->foruminfo['name']),
- 'affect' => $affect,
- 'admindate' => get_date($timestamp),
- 'reason' => stripslashes($params['atc_content']),
- 'sender' => $windid,
- 'receiver' => $atc['author']
- ));
- $this->sendMessage($atc['author'],$title,$content);
- }
=================分隔线==================== lang_writemsg.php文件添加: - 'ping_content_shouji' => '"{$L[sender]}"给[b]"{$L[receiver]}"[/b]的帖子 执行 [b]评分[/b] 操作\n\n'
- . '影响:{$L[affect]}'.$lang['_othermsg1_shouji'],
继续添加: - $lang['_othermsg1_shouji'] = '\n\n[b]帖子:[/b][url=$GLOBALS[db_bbsurl]/job.php?action=topost&tid={$L[tid]}&pid={$L[pid]}]{$L[subject]}[/url][url=$GLOBALS[db_bbsurl]/m/index.php?a=read&tid={$L[tid]}][手机访问][/url]\n'
- . '[b]发表日期:[/b]{$L[postdate]}\n'
- . '[b]所在版块:[/b][url=$GLOBALS[db_bbsurl]/thread.php?fid={$L[fid]}]{$L[forum]}[/url][url=$GLOBALS[db_bbsurl]/m/index.php?a=forum&fid={$L[fid]}][手机访问][/url]\n'
- . '[b]操作时间:[/b]{$L[admindate]}\n'
- . '[b]操作理由:[/b]{$L[reason]}\n\n'
- . '论坛管理操作通知短消息,对本次管理操作有任何异议,请与管理员取得联系。';
完成修改!
|