phpcms2008调整discuz1.5+ucenter1.5
phpcms2008整合discuz1.5+ucenter1.5
?
1.??? 软件版本
1.??? phpcms : phpcms2008sp4_utf8_110406.zip
2.??? discuz : Discuz_X1.5_SC_UTF8.zip
3.??? ucenter : Ucenter_1.5.2_SC_UTF8.z
2.??? 安装
1.??? phpcms2008的安装
1.??? 根据源码的说明修改相应文件的访问权限
2.??? 创建数据库phpcms
3.??? phpcms 选择必要的模块:财务,广告管理,评论管理,友情链接,短消息,网站公告,全站搜索,专题,错误报告,表单向导,采集管理,视频。
4.??? 配置数据库信息
5.??? 设定管理员和密码(最好与discuz,ucenter的管理员账户设置成相同的。)
2.??? ucenter的安装
1.??? 根据源码的说明修改相应文件的访问权限
2.??? 创建数据库ucenter
3.??? 配置数据库信息
4.??? 设定管理员和密码(最好与discuz,phpcms的管理员账户设置成相同的。)
3.??? discuz的安装
1.??? 根据源码的说明修改相应文件的访问权限
2.??? 创建数据库discuz
3.??? 单独安装discuz指定ucenter,填写ucenter相应的信息
4.??? 配置数据库信息
5.??? 设定管理员和密码(最好与ucenter,phpcms的管理员账户设置成相同的。)
3.??? 整合
1.??? phpcms配置
1.??? 我的面板-》常用操作-》网站配置-》基本信息
1.??? Phpcms 官方网站帐号:phpcms
2.??? Phpcms 官方网站密码:phpcms
2.??? 我的面板-》常用操作-》网站配置-》通行证
1.??? 正向通行证设置,反向通行证设置 选择否不用设置
2.??? Ucenter Client 配置是要配置的;
1.??? 启用选择是
2.??? ucenter api地址:ucenter的根目录地址
3.??? ip地址:本地:127.0.0.1,如果不是本地填写相应的ip地址
4.??? 填写ucenter数据库相应的信息
5.??? 应用id:2 (稍后在ucenter中设置phpcms时将产生phpcms的应用id,要和这里的一致)
6.??? ucenter通信密钥:phpcms(要和ucenter配置phpcms应用时的密钥要一致)
7.??? 测试数据库链接是否成功
8.??? 提交,成功。
2.??? Ucenter配置
1.??? 应用管理
1.??? 查看discuz!的通信情况,通信成功
2.??? -》添加新应用-》自定义安装
1.??? 应用名称:phpcms
2.??? 应用的主url:phpcms.wolf.com (phpcms2008网站的url)
3.??? 应用ip 本地:127.0.0.1 如果不本地的填写相应的ip地址
4.??? 通信密钥:phpcms(和phpcms配置时的ucenter通信密钥要一致)
5.??? 应用类型:其他
6.??? 是否开启同步登录:是
7.??? 是否接受通知:是
8.??? 其他项目保留默认值
9.??? 提交,并查看时候提交成功,在列表中查看时候通信成功。
?
?
3.??? Discuz配置
1.??? 站长-》ucenter配置:将ucenter连接方式改为接口方式,其他保留原来的数据。
?
?
4.??? 代码修改解决用户同步免激活
1.??? discuz代码修改:/api/uc.php : 168 synlogin 函数修改为一下代码:
function synlogin($get, $post) {
?
?? global $_G;
?
?? if(!API_SYNLOGIN) {
?
??? return API_RETURN_FORBIDDEN;
?
?? }
?
?? header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
?
?? $cookietime = 31536000;
?
?? $uid = intval($get['uid']);
?
?? $query = DB::query("SELECT uid, username, password FROM ".DB::table('common_member')." WHERE uid='$uid'");
?
?? if($member = DB::fetch($query)) {
?
??? dsetcookie('auth', authcode("$member[password]\t$member[uid]", 'ENCODE'), $cookietime);
?
?? }else{
?
?????? $username = $get['username'];???????????????????????
?
???????????? $password = md5(time().rand(100000, 999999));
?
???????????? $email = $get['email'];
?
???????????? $ip = $_SERVER['REMOTE_ADDR'];
?
???????????? $time = time();??
?
???????????? $userdata = array(
?
??????? ?????????????????'uid' => $uid,
?
???????????????????????? 'username' => $username,
?
???????????????????????? 'password' => $password,
?
???????????????????????? 'email' => $email,
?
???????????????????????? 'adminid' => 0,
?
???????????????????????? 'groupid' => 10,
?
???????????????????????? 'regdate' => $time,
?
???????????????????????? 'credits' => 0,
?
???????????????????????? 'timeoffset' => 9999
?
???????????? );
?
???????????? DB::insert('common_member', $userdata);
?
???????????? $status_data = array(
?
???? ????????????????????'uid' => $uid,
?
???????????????????????? 'regip' => $ip,
?
???????????????????????? 'lastip' => $ip,
?
???????????????????????? 'lastvisit' => $time,
?
???????????????????????? 'lastactivity' => $time,
?
???????????????????????? 'lastpost' => 0,
?
???????????????????????? 'lastsendmail' => 0,
?
???????????? );
?
???????????? DB::insert('common_member_status', $status_data);
?
???????????? DB::insert('common_member_profile', array('uid' => $uid));
?
???????????? DB::insert('common_member_field_forum', array('uid' => $uid));
?
???????????? DB::insert('common_member_field_home', array('uid' => $uid));
?
???????????? DB::insert('common_member_count', array('uid' => $uid));
?
???????????? $query = DB::query("SELECT uid, username, password FROM ".DB::table('common_member')." WHERE uid='$uid'");
?
???????????? if($member = DB::fetch($query)) {
?
???????????????? dsetcookie('auth', authcode("$member[password]\t$member[uid]", 'ENCODE'), $cookietime);
?
???????????? }
?
?? }
?
?}
?
2.??? phpcms2008代码修改:/member/register.php : 66 将if语句if($memberinfo['modelid'] && $M['choosemodel'] && !$M['enablemailcheck'] && !$M['enableadmincheck'])中的内容替换成
?list($uc_uid, $uc_username, $uc_password, $uc_email) =? uc_call("uc_user_login", array($memberinfo['username'], $memberinfo['password']));
?
$synlogin_code = uc_call('uc_user_synlogin', array($uc_uid));
?
showmessage('开始填写详细资料!'.$script.$synlogin_code, $M['url'].'register_model.php');
5.??? 更新phpcms,ucenter,discuz的缓存
?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

Detailed explanation of the steps to modify the Discuz domain name. Specific code examples are required. With the development and operation of the website, sometimes we need to modify the domain name of the Discuz forum. This may be due to brand change, website SEO optimization, or other reasons. No matter what the reason is, modifying the Discuz domain name is a process that requires careful operation. Today we will introduce the steps of modifying the Discuz domain name in detail and provide specific code examples. Step 1: Back up data. Before modifying the domain name, you must first ensure that the website

Discuz Editor: An efficient post layout tool. With the development of the Internet, online forums have become an important platform for people to communicate and share information. In the forum, users can not only express their opinions and ideas, but also discuss and interact with others. When publishing a post, a clear and beautiful format can often attract more readers and convey more accurate information. In order to facilitate users to quickly type and edit posts, the Discuz editor came into being and became an efficient post typesetting tool. Discu

PHP CMS is a PHP-based open source content management system for managing website content. Its features include ease of use, powerful functionality, scalability, high security, and free open source. It can save time, improve website quality, enhance collaboration and reduce development costs, and is widely used in various websites such as news websites, blogs, corporate websites, e-commerce websites and community forums.

In the Discuz forum, the navigation bar is one of the parts that users often come into contact with when visiting the website. Therefore, customizing the navigation bar can add a unique personalized style to the forum and improve the user experience. Next, we will introduce how to personalize the navigation bar in the Discuz forum and provide specific code examples. First, we need to log in to Discuz's backend management system and enter the "Interface" -> "Navigation Settings" page. On this page, we can perform various settings and customizations on the navigation bar. Here are some

Forum is one of the most common website forms on the Internet. It provides users with a platform to share information, exchange and discuss. Discuz is a commonly used forum program, and I believe many webmasters are already very familiar with it. During the development and management of the Discuz forum, it is often necessary to query the data in the database for analysis or processing. In this article, we will share some tips for querying the location of the Discuz database and provide specific code examples. First, we need to understand the database structure of Discuz

Sharing how to modify Discuz user ID, easy to do, specific code examples are required. In the Discuz forum system, the user ID is a unique number that identifies the user, which is usually automatically generated by the system. But in certain circumstances, such as needing to migrate users from one system to another, or needing to manually modify the user ID to meet business needs, we may need to modify the user ID. This article will share a method to modify the Discuz user ID and provide specific code examples to help you solve this problem easily. Modify Di
