Using Discuz to integrate Dedecms method and file download _php techniques

Source: Internet
Author: User
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.
CODE:

$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
[Copy to Clipboard]

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.