虚拟马甲发帖回复 v3.0.2 评分X3.5 php7.x版实现马甲评分修改
虚拟马甲发帖回复 v3.0.2 评分X3.5 php7.x版实现马甲评分的修改方法教程:#------------------------------------------------------------------------------------------------------------------------
#总共需要植入四段代码到source/module/forum/forum_misc.php文件中才能实际马甲评分,植入方法参考以下说明 By kl3w.com 排骨
#------------------------------------------------------------------------------------------------------------------------
###Code1:虚拟马甲发帖回复#################################################################################################
# 打开source/module/forum/forum_misc.php文件,查找:if(!$post || $post['tid'] != $thread['tid'] || !$post['authorid']) {
# 会搜索查找到两处同内容的行,选择第一处出现的地方在其上行插入以下代码。
#------------------------------------------------------------------------------------------------------------------------
$use_uid = $use_ouid = 0;loadcache('plugin');
$vars = $_G['cache']['plugin']['kl3w_guisepost'];
$rn = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? "\r\n" : "\n";
$useidarr = explode($rn, $vars['useid']);
if(is_array($useidarr) && $vars['open']){
foreach($useidarr as $key => $val){
$useval = explode("=", str_replace('@','=',$val));
if($_G['uid'] == $useval && isset($useval) && !empty($useval)){
$use_uid = intval(trim($useval));
break;
}
}
}
if($use_uid){$_G['setting']['dupkarmarate']=true;$use_ouid=$_G['uid'];$_G['uid']=0;}
#########################################################################################################################
###Code2:虚拟马甲发帖回复#################################################################################################
# 打开source/module/forum/forum_misc.php文件,查找:
$allowrate = TRUE;
在其上行插入以下代码。
#------------------------------------------------------------------------------------------------------------------------
if($use_ouid)$_G['uid'] = $use_ouid;
#########################################################################################################################
###Code3:虚拟马甲发帖回复#################################################################################################
# 打开source/module/forum/forum_misc.php文件,查找:
getuserprofile('extcredits1');
在其上行插入以下代码。
#------------------------------------------------------------------------------------------------------------------------
$guisepostuserid = isset($_POST['kl3wguisepostuserid']) ? intval($_POST['kl3wguisepostuserid']) : intval($_G['gp_kl3wguisepostuserid']);
if(!$guisepostuserid && $post['authorid']==$_G['uid'])showmessage('thread_rate_member_invalid', NULL);
if($guisepostuserid && $use_uid) {
if($post['authorid']==$guisepostuserid)showmessage('thread_rate_member_invalid', NULL);
$guisepost = DB::fetch_first("SELECT uid,username,groupid FROM ".DB::table('common_member')." where uid='$guisepostuserid'");
if($guisepost){
$guisepost_ouid = array('uid'=>$_G['uid'],'username'=>$_G['username'],'member'=>$_G['member']);#兼容评分自动回复插件
space_merge($guisepost, 'status');
$_G['uid'] = $guisepost['uid'];
$_G['username'] = $guisepost['username'];
$_G['member'] = $guisepost;
$_G['gp_formhash'] = formhash();
$_GET['formhash'] = $_POST['formhash'] = $_G['formhash'] = $_G['gp_formhash'];
}else{
$use_uid = 0;
}
}
#########################################################################################################################
###Code4:虚拟马甲发帖回复#################################################################################################
# 打开source/module/forum/forum_misc.php文件,查找:
showmessage('thread_rate_succeed', dreferer());
在其上行插入以下代码。
#------------------------------------------------------------------------------------------------------------------------
if($use_uid)DB::query("UPDATE ".DB::table('common_member_status')." SET lastvisit='$_G',lastactivity='$_G' WHERE uid='$guisepostuserid'", 'UNBUFFERED');
#########################################################################################################################
#------------------------------------------------------------------------------------------------------------------------
# 植入以上四段代码后即可使用马甲进行评分操作(若显示无权,需入后台对主号设定拥有评分权限)
页:
[1]