我照着这个改的,改完之后就好了! dz上有这个帖子,可以去搜索一下!
XBOX360:修复了匿名回复通知用户的BUG,请自行修改...修改方法在下面
安装指南
请修改以下文件
=============source/function_cp.php=============
?>之前加入//隐藏事件发布
function feed_add_anonymous($icon, $title_template='',
$title_data=array(), $body_template='', $body_data=array(),
$body_general='', $images=array(), $image_links=array(),
$target_ids='', $friend='', $appid='', $returnid=0) {
global $_SGLOBAL;
if(empty($appid)) {
if(is_numeric($icon)) {
$appid = 0;
} else {
$appid = UC_APPID;//本地
}
}
$feedarr = array(
'appid' => $appid,
'icon' => $icon,
'uid' => 0,
'username' => $_SGLOBAL['supe_username'],
'dateline' => $_SGLOBAL['timestamp'],
'title_template' => $title_template,
'body_template' => $body_template,
'body_general' => $body_general,
'image_1' => empty($images[0])?'' images[0],
'image_1_link' =>
empty($image_links[0])?'' image_links[0],
'image_2' => empty($images[1])?'' images[1],
'image_2_link' =>
empty($image_links[1])?'':$image_links[1],
'image_3' => empty($images[2])?'':$images[2],
'image_3_link' =>
empty($image_links[2])?'':$image_links[2],
'image_4' => empty($images[3])?'':$images[3],
'image_4_link' =>
empty($image_links[3])?'':$image_links[3],
'target_ids' => $target_ids,
'friend' => $friend,
'id' => $id,
'idtype' => $idtype
);
$feedarr = sstripslashes($feedarr);//去掉转义
$feedarr['title_data'] =
serialize(sstripslashes($title_data));//数组转化
$feedarr['body_data'] =
serialize(sstripslashes($body_data));//数组转化
$feedarr['hash_template'] =
md5($feedarr['title_template']."\t".$feedarr['body_template']);//喜好hash
$feedarr['hash_data'] =
md5($feedarr['title_template']."\t".$feedarr['title_data']."\t".$feedarr['body_template']."\t".$feedarr['body_data']);//合并hash
$feedarr = saddslashes($feedarr);//增加转义
//去重
$query = $_SGLOBAL['db']->query("SELECT feedid FROM
".tname('feed')." WHERE uid='$feedarr[uid]' AND
hash_data='$feedarr[hash_data]' LIMIT 0,1");
if($oldfeed = $_SGLOBAL['db']->fetch_array($query)) {
updatetable('feed', $feedarr,
array('feedid'=>$oldfeed['feedid']));
return 0;
}
//插入
if($returnid) {
return inserttable('feed', $feedarr, $returnid);
} else {
inserttable('feed', $feedarr);
return 1;
}
}
复制代码=============source/script_manage.js=============
文件最底部加入//添加秘密评论
function mimi_comment_add(mimi_id, result) {
if(result) {
var obj = $('mimi_comment_ul');
var newli = document.createElement("div");
var x = new Ajax();
x.get('do.php?ac=ajax&op=mimicomment',
function(s){
newli.innerHTML = s;
});
if($('comment_prepend')){
obj = obj.firstChild;
while (obj && obj.nodeType != 1){
obj = obj.nextSibling;
}
obj.parentNode.insertBefore(newli, obj);
} else {
obj.appendChild(newli);
}
if($('comment_message')) {
$("comment_message").value = "";
}
showreward();
//location.reload();
}
}
复制代码=============source/do_ajax.php=============} elseif($op ==
'getfriendgroup') {
复制代码前加入} elseif($op == 'mimicomment'){
$mimi_id =
empty($_GET['mimi_id'])?0:intval($_GET['mimi_id']);
if($mimi_id) {
$cidsql = "mimi_id='$mimi_id' AND";
$ajax_edit = 1;
} else {
$cidsql = '';
$ajax_edit = 0;
}
//评论
$list = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM
".tname('app_mimi_reply')." WHERE $cidsql
uid='$_SGLOBAL[supe_uid]' ORDER BY dateline DESC LIMIT 0,1");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
include_once(S_ROOT.'./source/function_bbcode.php');
$value['content'] =
nl2br(bbcode(htmlspecialchars($value['content']))) ;
realname_set($value['uid'], $value['username']);
$list[] = $value;
}
realname_get();
复制代码=============template/default/do_ajax.htm=============<!--{elseif
$op == 'getfriendgroup'}-->
复制代码前加入<!--{elseif $op == 'mimicomment'}-->
<!--{loop $list $value}-->
<!--{template /mimi/view_free/mimi_comment_li}-->
<!--{/loop}--> |