destoon采集论坛

 找回密码
 立即注册
查看: 53|回复: 1

destoon通过ucenter无缝整合phpwind完善结合

[复制链接]

16

主题

69

回帖

216

积分

中级会员

Rank: 3Rank: 3

积分
216
发表于 2011-9-27 11:45:04 | 显示全部楼层 |阅读模式
如要光顾本站不要乱注册垃圾信息....本站不是演示网站....请各DT朋友手下留请!!!
如真想测试请联系本站技术员..我们会提供测试账号

本篇为destoon通过ucenter无缝整合phpwind8.7的完美整合方案的子教程
需要手工修改的文件列表如下: DESTOON版本号为3.0 (utf-8) 最后更新为20110411
UCenter版本号为1.6.0 (utf-8) Release 20110501
phpwind版本号为8.7 (utf-8) 版本编号:20110913
首先DESTOON后台已经有UCENTER有接口,本文将不再叙述.请参考DESTOON官方接口地址为http://bbs.destoon.com/thread-4509-1-1.html
UCenter整合接口为绿色接口pw_api复制UCenter根目录即可下载地址 http://115.com/file/clq5pzn5
论坛phpwind从官方下载.8.7版本.另从下载过来的接口也phpwind文件也复制到phpwind论坛的根目录即可.缺一不可
再修改论坛以下几个文件::
【pw】\admin\manager.php
【pw】\lib\user\ucuser.class.php
【pw】\lib\user\userservice.class.php
【pw】\u\require\profile\info_safe.php
【pw】\require\checkpass.php
【pw】\global.php
【pw】\uc_client\uc_client.php(该文件可覆盖!)
1. 打开文件 【pw】\admin\manager.php
查找
$userService->add($mainFields, $memberDataFields);
在上面添加
// UCenter整合方案 - 新增创始人 [by Lpbiz.Com 20110927] require_once (R_P . 'uc_client/uc_client.php'); $email = $username.rand(1000, 9999).'@126.com'; // 伪造创始人邮箱 if (($uid = uc_user_register($username, $password, $email)) update($rt['uid'], array('groupid'=>3, 'password'=>$password));
在上面添加
// UCenter整合方案 - 创始人修改密码同步 [by Lpbiz.Com 20110927] if($password) { require_once (R_P . 'uc_client/uc_client.php'); $ucstatus = uc_user_edit($rt['uid'], $username, '', '', $password, 1, $rt['email']); }// end
2. 打开文件 【pw】\lib\user\ucuser.class.php
查找
$ucstatus = uc_user_edit($uid, $oldname, $info['username'], $info['password'], $info['email']);
替换成
// UCenter整合方案 - 后台修改用户 [by Lpbiz.Com 20110927] $ucstatus = uc_user_edit($uid, $oldname, $info['username'], '', $info['password'], 1, $info['email']);
3. 打开文件 【pw】\lib\user\userservice.class.php
查找
function update($userId, $mainFields = array(), $memberDataFields = array(), $memberInfoFields = array()) { $userId = intval($userId); if ($userId get($userId); if($userdb) { $ucstatus = uc_user_edit($userId, $userdb['username'], '', '', $mainFields['password'], 1, ''); } } // UCenter整合方案 - 修改用户密码 [by orzcc 20110328]
4. 打开文件 【pw】\u\require\profile\info_safe.php
查找
if ($propwd || $userdb['email'] != $proemail) {
在上面添加
// UCenter整合方案 - 记录用户输入的老密码和老邮箱 [by Lpbiz.Com 20110927] $oldpwd_uc = $_POST['oldpwd']; $oldemail_uc = $userdb['email']; // end
查找
$userdb['password'] != $_POST['oldpwd'] && Showmsg('pwd_confirm_fail');
替换成
// UCenter整合方案 - 密码验证环节移至uc_client中处理 [by Lpbiz.Com 20110927] // $userdb['password'] != $_POST['oldpwd'] && Showmsg('pwd_confirm_fail');
查找
$userService->update($winduid, $pwSQL);
在其上面添加
// UCenter整合方案 - 更新用户资料 [by Lpbiz.Com 20110927] if($pwSQL['password'] || $pwSQL['email']) { require_once(R_P . "uc_client/uc_client.php"); $ucstate = uc_user_edit($winduid, $windid, '', md5($oldpwd_uc), $pwSQL['password'], 0, $pwSQL['email']); if($ucstate == -1) { Showmsg('pwd_confirm_fail'); } elseif($ucstate update($uc_user['uid'], $diff_sql); }
替换成
if ($diff_sql) { // UCenter整合方案 [by Lpbiz.Com 20110927] if (strlen($men['password'])==16) { $db->update("UPDATE pw_members SET password=".pwEscape($password)."WHERE uid=" . pwEscape($uc_user['uid'])); } if ($men['salt']) { $db->update("UPDATE pw_members SET password=".pwEscape($password).", salt = '' WHERE uid=" . pwEscape($uc_user['uid'])); unset($diff_sql['password']); }//end $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $userService->update($uc_user['uid'], $diff_sql); }
[color=]如果您的站点是转换版本,之前肯定也修改过checkpass.php的此处代码,请同样按照要求修改。此处代码已兼容转站版本

6. 打开文件 【pw】\global.php

查找
global $db_ifjump,$db_htmifopen;
在下面添加
// UCenter整合方案 - 登录状态同步 [by orzcc 20110324] global $showmsginfo; $ucsynJs = $showmsginfo; $ifucsyc = str_replace('', '', "\r\n\r\n"), '', ob_get_contents());
在下面添加
// UCenter整合方案 - 登录状态同步 [by orzcc 20110324]if($ifucsyc) { $output .= $ucsynJs; unset($ucsynJs);} // UCenter整合方案 - 登录状态同步 [by orzcc 20110324]
最新更新:
phpwind 8.7版本的修改和上面一样,另外还需要修改template/wind/header_login.htm
查找:
替换为:
查找:
测试工作 在IE6~9/360/Firefox/Chrome下测试pw的注册、登录、退出(只观察当前过程同步 到DESTOON程序)
在IE6~9/360/Firefox/Chrome下测试uc端其他程序的注册、登录、退出(同上)
在IE6~9/360/Firefox/Chrome下测试pw的注册,检查pw与UCenter数据库中的用户数据,是否已注册成功
在IE6~9/360/Firefox/Chrome下测试pw的登录、退出同步状态到uc端其他程序(使用准备工作时准备的测试账号,以及步骤1、2、3中注册的新账号)
在IE6~9/360/Firefox/Chrome下测试uc端DESTOON程序的登录、退出同步状态到pw(同上)
后台测试新增、修改、删除用户(修改用户主要测试用户名、密码、邮箱的修改)
前台修改用户密码,回归测试其他系统的登录情况(使用准备工作时准备的测试账号,以及步骤1、2、3中注册的新账号) 注明...测试数据都为初始化状态..即Destoon/ucenter/phpwind这三者之间的会员数据都为空.
如果Destoon/ucenter/phpwind存在..新注册的会员测试数据则不会出现错号
如果老数据没有同步则出现,登录DT会员..PHPWIND则是另外的会员..

本工作室可以有偿提供DESTOON会员数据直接导入ucenter和phpwind.使三者直接同步..解除后顾之忧...详细请联系QQ:38282147

UCenter管理后台显示通信失败 首先请检查pw访问路径是否配置正确,同样确保该访问路径可访问
其次请检查【pw】\uc_client\include\uc_config.php中的配置是否正确
再次请检查【pw】\uc_client\dzuc_client\data\cache目录是否可写,或者查看【pw】\uc_client\dzuc_client\data\cache\apps.php文件是否正确(该缓存文件用于记录UCenter的应用信息)
再次请检查【UCenter】\data\cache目录是否可写,或者查看【UCenter】\data\cache\apps.php文件是否正确(同上)phpwind论坛根目录文件api有没有uc.php这个文件,如果没有请下载 pw管理后台显示通信失败
请检查UCenter访问路径是否配置正确,同样确保该访问路径可访问
请检查【UCenter】\pwapi\config下的两个配置文件是否正确

本技术文件由礼品商务http://www.lpbiz.com 提供.转贴需要注明
另感谢淘宝店http://wsgouwu.taobao.com 家纺购物-水星家纺网直营店!厂家直接拿货.省去中间环节让利于网友!!如有需要请联系本人.可有优惠!!
技术参考与by orzcc destoon ucenter及phpwind论坛的热心朋友

[ 本帖最后由 linyg 于 2011-9-27 11:48 编辑 ]
回复

使用道具 举报

95

主题

3474

回帖

8086

积分

论坛元老

Rank: 8Rank: 8

积分
8086
发表于 2011-9-27 13:53:34 | 显示全部楼层

lz   真详细啊  
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|destoon采集论坛

GMT+8, 2025-11-26 17:12 , Processed in 0.013997 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表