返回列表 回复 发帖

Dedecms4.0与 discuz 5.5完美整合教程

演示地址目前不公开,我的新站还在调试中,目前想有太多没用的帐号,所以想测试的朋友自己改成功了测试啊,我的站6月1日上线,敬请期待!
整合程序:dedecms4.0rc1+discuz 5.5 注:yourname.com是你的域名。
安装目录如下:
1.dede安装在首页目录,即可用 www.yourname.com访问
2.discuz 5.5(以下简称dz)安装bbs目录,bbs.yourname.com访问
3.都安装在同一数据库里,dede_,cdb_为前缀,以方便区分,安装过程:
1.安装dede,得到cookie密码,如果不记得,也可以在通行证下看到,如我的:TsGZw3517K
2.安装dz,通行证设置如下:
启用通行证: 选
通行证私有密匙:
TsGZw3517K
验证字串有效期(秒):
3600
应用程序 URL 地址:
www.yourname.com
应用程序注册地址: member/index_do.php?fmdo=user&dopost=regnew
应用程序登录地址: member/login.php
应用程序退出地址: member/index_do.php?fmdo=login&dopost=exit
积分同步选项: 不同步积分

3.进入dede后台,启用通行证,配置如图:

4.修改pp_dederemote_interface.php,在下载安装包中:
1)cookie密码:
  1. $cfg_cookie_encode = "TsGZw3517K";
  2.         //这里请填写DedeCms系统的cookie加密码
复制代码
2)域标识
$domain = "yourname.com";
3)DedeCms通行证接口网址
  1. $DedeAPI_Url = "
  2. [url]http://www.yourname.com/member/passport/pp_dederemote.php[/url]";
复制代码
4)跳转网址,我是想叫跳到论坛,所以都是空,请根据自己情况设置。
  1. $cfg_loginJumpUrl = "";  //登录成功后跳转的网址     (空按第三方系统默认)

  2. $cfg_regJumpUrl = "";    //注册成功后跳转的网址     (空按第三方系统默认)

  3. $cfg_editJump = "";      //更改资料成功后跳转的网址 (空按第三方系统默认)

  4. $cfg_exitJump = "";      //退出后跳转到的网址       (空按第三方系统默认)
复制代码
5)将api的四个文件上传到bbs目录下,一定要上传,老柏加了代码进去了,具体大家打开比较

6)修改首页登陆模板代码,替换成以下:只需要替换这段就可以,具体美化请根据情况。
  1. <form name='form1' method='POST' action='[url]http://bbs.yourname.com/logging.php?action=login[/url]'>
  2. <input type='hidden' name='jumpurl' value='/'>
  3. <input type='hidden' name='step' value=2>
  4. <input type='hidden' name=cookietime value='31536000'>
  5. <tr>
  6. <td height="28"> </td>
  7. <td width="30%">用户名:</td>
  8. <td width="63%"><input type="text" name="username" style="width:120px;height:20px;border:1px solid #cccccc"></td>
  9. </tr>
  10. <tr>
  11. <td height="28"></td>
  12. <td>密 码:</td>
  13. <td><input type="password" name="password" style="width:120px;height:20px;border:1px solid #cccccc"></td>
  14. </tr>
  15. <tr>
  16. <td width="4%" height="57"> </td>
  17. <td height="57" colspan="2" align="center">
  18. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  19. <tr>
  20. <td width="100%" align="center">
  21. <input type="submit" name="loginsubmit" value="登录">
  22.         <input type="reset" name="reset" value="重置">
  23.         <input type="button" value="注册" onclick="javascript: this.form.action='[url]http://bbs.yourname.com/register.php[/url]';this.form.submit();">
  24.         <input type="button" value="游客" onclick="javascript: this.form.action='[url]http://bbs.yourname.com/index.php[/url]';this.form.submit();">

  25. </td>
  26. <td></td>
  27. </tr>
  28. </table></td>
  29. </tr>
  30. </form>
复制代码
最后,按图将原论坛用户导入dede,否则会出现用户名不存在的现象。


作者:嘟嘟鱼
出处:快享 www.quickshare.com.cn
如有不懂请在我博客提出,祝大家好运,转载请注明出处,谢谢!
返回列表