Table of Contents
The project integrates Discuz UCenter and discuzcenter
ECShop, UCenter, Discuz integration issues
How to integrate ucenter, discuz and ucenter home with php168
Home Backend Development PHP Tutorial Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

Jul 13, 2016 am 10:23 AM

The project integrates Discuz UCenter and discuzcenter

Although I personally dislike discuz very much, there is no way, the market is power, especially for friends who integrate the discuz forum, if you don’t want to use it If there are two systems, integrating UCenter is inevitable. Although it is boring, it has to be done.

1. Preparation

1. Read the full text of uc api manual. Refer to http://faq.comsenz.com/library/UCenter/introduction/introduction_list.htm

2. Add application instructions in the uc background. Refer to http://faq.comsenz.com/viewnews-506 (official) http://wenku.baidu.com/view/3790fdd7195f312b3169a588.html (grassroots)

3. uc client necessary code, Download here

2. Example

Although it seems that the above preparations are enough, experience tells us, no, it is not enough. Disuzuz is not something that is just plain water, such as zend frame, dedecms, and ci. Without a bit of research spirit and a tossing temperament, it is impossible to understand its profound connotation, let alone control it. To achieve success, we need detailed explanatory text and necessary pictures, although you may not be successful with these.

Let’s take a look at my project structure first

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

tanahk is the real project address, x3.2 is my discuz forum file, open it

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

You can see that discuz x3.2 has been integrated with ucenter, where uc_server is the server, uc_client is the client, and the uc_client folder is in discuz x, discuz home, discuz xspace All other products are already bundled. But it has not been added to my tanahk project. According to the previous reference information, it must exist in every project. Therefore, we copy the client in developguide.zip under the preparation point 3 to below tanahk. And named it api

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

Because the UCenter application defaults to finding the api/uc.php file, the client folder must be renamed api. Go back to the developguide.zip compressed package, open the api/uc.php below, and copy it to tanahk/api.

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

tanahk’s directory structure changes to

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

Okay, now we can add our project application in the UCenter background . The background of uc is generally http://www.xxx.com/x3.2/uc_server/admin.php

Project integration Discuz UCenter, integration discuzucenter_PHP tutorial

Select "Application Management"--"Add New Application ”

Refer to 2 in the preparation above.

Application type: Other
Communication key: Find the key in discuz root/config/confgi_ucenter.php, define('UC_KEY', '...124sdf45s4d5fsd4f5s4...');discuz root is your uc directory.
Physical path of the application: can be empty, as long as the application main url is filled in correctly
Application interface file name: keep uc.php, no need to fill in api/uc.php
Whether to enable synchronous login: Yes, this is The key point is that in the future, multiple projects can share one uc, and there is no need to create a new user system by yourself.
Submit.

ECShop, UCenter, Discuz integration issues

ecshop discuz ucenter integration

1. Install ucenter
2. Install discuz. It is integrated with ucenter during the installation process and does not require me to do anything

3. Install ecshop and uc_client Copy to the root directory (uc_client in the ucenter installation file). Then copy the configuration to data /config.php
define('UC_CONNECT', 'mysql');
define('UC_DBHOST', 'localhost ');
define('UC_DBUSER', 'root');
define('UC_DBPW', 'root');
define('UC_DBNAME', 'ucenter');
define( 'UC_DBCHARSET', 'utf8');
define('UC_DBTABLEPRE', '`ucenter`.uc_');
define('UC_DBCONNECT', '0');
define('UC_KEY', '1234567890');
define('UC_API', 'localhost/ucenter/upload');
define('UC_CHARSET', 'utf-8');
define('UC_IP', '127.0 .0.1');
define('UC_APPID', '3');
define('UC_PPP', '20');

The communication was found to be successful in the ucenter background. Then install ucenter in ecshop. After installation, check whether the settings are consistent with those in ucenter. It should be fine. Now my discuz and ecshop can log in simultaneously.

How to integrate ucenter, discuz and ucenter home with php168

168 is installed. Install ucenter and go to ucenter to add applications

(1). Enter the UC management background, click 'Application Management', then click 'Add New Application', and then select 'Customize' Install'
Application name: Enter PHP168 whole site system
Application URL: Enter http://website domain name/do (no / is required at the end, and note that it ends with do)
Application IP: Leave it blank Just
Communication key: write any one, such as 123abcdkjhh
Application type: select 'Other
Physical path of application: leave it blank
View profile page address: leave it blank
Application interface file name: uc.php
Tag single display template: Leave it blank
Tag template mark description: Leave it blank
Whether to enable synchronous login: select 'Yes'
No Accept the notification: Select 'Yes'
Finally submit. After submission, return to the application list. Then select the application you just submitted and click Edit.
Copy the code in 'Application UCenter Configuration Information:' , just put it in the second line of the entire site/do/config.php.
Then integrate discuz and home through ucenter

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/838912.htmlTechArticleProject integration Discuz UCenter, integration discuzucenter Although I personally dislike discuz very much, there is no way, the market is the power, especially For those who have integrated the discuz forum, if you don’t want to use...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to debug CLI mode in PHPStorm? How to debug CLI mode in PHPStorm? Apr 01, 2025 pm 02:57 PM

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

How to send a POST request containing JSON data using PHP's cURL library? How to send a POST request containing JSON data using PHP's cURL library? Apr 01, 2025 pm 03:12 PM

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

See all articles