Home > Backend Development > PHP Tutorial > How to integrate dedecms using discuz's own pass and file download_PHP tutorial

How to integrate dedecms using discuz's own pass and file download_PHP tutorial

WBOY
Release: 2016-07-21 15:57:27
Original
1105 people have browsed it

Integrate discuz’s pass: How to integrate dede using discuz’s own pass and file download

First of all, thank you Plato for providing such a good free program
See everyone on the forum Many want to integrate discuz. I think Plato will definitely get a very complete dede pass.
Before we come out, let’s use the pass that came with discuz. I personally looked at it and it was very good.
1: Prerequisite preparation and version:
dede version: 3.1 lit version, 3.1 official version tested all passed
discuz version. The latest version 5.0 is used
2: Mainly involves several files
1: dede:
(1)include/config_passport.php
Mainly pass private key. This is related to security, and the two system settings must be the same to work
Here it is mainly $cfg_pp_encode. Assume it is set to $cfg_pp_encode = 'UfJDq4089S'
(2)member/index_do.phpMainly handles synchronous login, synchronous registration, and synchronous exit with discuz
As for members Synchronous modifications (mainly passwords and emails) have been completed using the pass mechanism during synchronous login. So don’t ask anymore about password synchronization
(3) Newly added file zxwpassport.php
It mainly sets the synchronization discuz switch and synchronization related processing functions
Note: here The relevant jump address should be modified according to your test or actual address
For example: Location: http://localhost/discuz/api/passport.php
Change to your Location: http://localhost/bbs/ api/passport.php
$forward = 'http://localhost/member/index.php';
Change to yours
$forward = 'http://www.aaa.com/member /index.php';

2: discuz
(1) Mainly manage and set the discuz pass in the system background as shown in the figure
Set it in the extended settings-"Pass Settings

How to integrate dedecms using discuz's own pass and file download_PHP tutorial
Note that this is the address for setting up dede’s member login, member registration, and member exit
The key is to set the pass private key and remember to refer to dede’s include/config_passport.php Configuration. It is assumed here that it is UfJDq4089S
. After understanding this, download zxwpassport.php and the modified index_do.php in the
member/ directory. Ok. Here index_do.php only adds discuz synchronization processing, which is very simple
For example, synchronous login usually only needs to add an email extraction when logging in.

CODE:

$row = $dsql->GetOne("select email from dede_member where ID='".$cfg_ml->M_ID."'");
$dedeemail = $row['email '];
$dsql->Close();
//Start synchronous login with discuz forum
if ($cfg_discuz==1)
{
discuzlogin($userid,$ pwd,$dedeemail);
}//$cfg_discuz==1 End
//Synchronized login with disuz forum ends


[Copy to clipboard]
Finally remember to process the zxwpassport.php function. Set your own forwarding address:
Location: http://localhost/bbs/api/passport.php
$forward = 'http://localhost/member/index.php';

Of course, it can also be written to the configuration file. But I’m too lazy to write. Let’s do it ourselves. Very simple

zxwpassport.php and index_do.php files are packaged into passport.rar file

Download this file
How to integrate dedecms using discuzs own pass and file download_PHP tutorial

http://www.bkjia.com/PHPjc/317850.html

truehttp: //www.bkjia.com/PHPjc/317850.htmlTechArticleIntegrating discuz’s pass: How to integrate dede using discuz’s own pass and file download. First of all, thank Plato for providing such a good service I saw on the forum that many people want to fix the free program...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template