Integration of Discuz's pass: Using Discuz's own pass to integrate Dede methods and file downloads
First of all, thank Plato for offering such a good free program.
In the forum see many people want to integrate discuz. I think Plato will certainly get a very perfect Dede pass.
We'll use Discuz's passport before we get out. The individual looked at the very good.
One: Prerequisite preparation and version:
Dede version: 3.1 lit version, 3.1 official edition of the test are through
Discuz version. With the latest version 5.0.
II: Mainly involved in several documents
1:dede:
(1)include/config_passport.php
is mainlyPass private key。 This has to do with security, and you have to have two system settings to pass.
Here is the main $cfg _pp_encode. Suppose set to$cfg _pp_encode = ' ufjdq4089s '
(2)member/index_do.phpThe main processing and discuz synchronous login, synchronous registration, synchronous exit
As for the members of the synchronized changes (mainly passwords and email) at the time of simultaneous landing using the pass mechanism has been completed. So why don't we ask the password sync?
(3) New files addedzxwpassport.php
The main is to set up a synchronous discuz switch, and synchronization of related processing functions
Note: The relevant jump address here is modified according to your test or actual address.
For example: location:http://localhost/discuz/api/passport.php
Change it to your location:http://localhost/bbs/api/passport.php.
$forward = ' http://localhost/member/index.php ';
Change it to yours.
$forward = ' http://www.aaa.com/member/index.php ';
2:discuz
(1) mainly in the system background management set Discuz pass as shown in the picture
In the extended setting-"Pass settings where set
' this.width= '); "border=0>
Note Here is the setting of the Dede member login, membership registration, member exit address
The key is to set a good pass private key to remember with Dede to the same referenceDede's include/config_passport.php's configuration. This assumes thatufjdq4089s
All right, let's see what I can do. Everyone put the zxwpassport.php and the modified index_do.php download. Put in
The member/directory is OK. Here index_do.php just joined the Discuz synchronous processing is actually very simple
Like what. Synchronous landing is generally added to the following statements can be. Only an email was added at the time of landing.
$row = $dsql->getone ("Select email from #@__member where id= '". $cfg _ml->m_id. "");
$dedeemail = $row [' email '];
$dsql->close ();
Start with discuz Forum Sync Login
if ($cfg _discuz==1)
{
Discuzlogin ($userid, $pwd, $dedeemail);
}//$cfg _discuz==1 End
End of sync Landing with Disuz forum
Finally, remember in zxwpassport.php function processing. Set your own rotary address:
location:http://localhost/bbs/api/passport.php
$forward = ' http://localhost/member/index.php ';
Of course, you can also write to the configuration file. But I'm too lazy to write. Let's get it done by ourselves. It's simple.
Zxwpassport.php and index_do.php files are packaged into Passport.rar files.
Download this file