当前位置:首页 > 网络编程 > WEB编程 > PHP > Dedecms4.0与Discuz5.5完美整合

Dedecms4.0与Discuz5.5完美整合

点击次数:29 次 发布日期:2008-12-01 16:54:28 作者:源代码网
源代码网推荐  

整合程序: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密码:

以下为引用的内容:
$cfg_cookie_encode = "TsGZw3517K";
    //这里请填写DedeCms系统的cookie加密码

2)域标识

$domain = "yourname.com";

3)DedeCms通行证接口网址

以下为引用的内容:
$DedeAPI_Url = "
[url]http://www.yourname.com/member/passport/pp_dederemote.php[/url]";

4)跳转网址,我是想叫跳到论坛,所以都是空,请根据自己情况设置。

$cfg_loginJumpUrl = ""; //登录成功后跳转的网址   (空按第三方系统默认)

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

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

$cfg_exitJump = "";     //退出后跳转到的网址     (空按第三方系统默认)

5)将api的四个文件上传到bbs目录下,一定要上传,老柏加了代码进去了,具体大家打开比较

6)修改首页登陆模板代码,替换成以下:只需要替换这段就可以,具体美化请根据情况。

以下为引用的内容:

<form name="form1" method="POST" action="[url]http://bbs.yourname.com/logging.php?action=login[/url]">
<input type="hidden" name="jumpurl" value="/">
<input type="hidden" name="step" value=2>
<input type="hidden" name=cookietime value="31536000">
<tr>
<td height="28"> </td>
<td width="30%">用户名:</td>
<td width="63%"><input type="text" name="username" style="width:120px;height:20px;border:1px solid #cccccc"></td>
</tr>
<tr>
<td height="28"></td>
<td>密 码:</td>
<td><input type="password" name="password" style="width:120px;height:20px;border:1px solid #cccccc"></td>
</tr>
<tr>
<td width="4%" height="57"> </td>
<td height="57" colspan="2" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<input type="submit" name="loginsubmit" value="登录">
    <input type="reset" name="reset" value="重置">
    <input type="button" value="注册" onclick="javascript: this.form.action="[url]http://bbs.yourname.com/register.php[/url]";this.form.submit();">
    <input type="button" value="游客" onclick="javascript: this.form.action="[url]http://bbs.yourname.com/index.php[/url]";this.form.submit();">

</td>
<td></td>
</tr>
</table></td>
</tr>
</form>

最后,按图将原论坛用户导入dede,否则会出现用户名不存在的现象。

源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华