Discuz! X plug-in development example tutorial-advertisement box in the lower right corner (1)

Source: Internet
Author: User

Discuz! X plug-ins are rich, in discuz! The extension center has many plug-ins for free, but Google does not have a copy of discuz! X
A complete tutorial on plug-in development is also available several years ago. A post on the official forum is a development tutorial, but not complete. This is undoubtedly intended for disucz! X plug-ins have a threshold for cainiao like me. So I read "discuz!" two days ago! Technical Library, which contains disucz! X plug-in development documentation. As a result, I tried it myself and felt that the difficulty coefficient was not too large. So I plan to write a simple plug-in development process and share it with me for my intention to do disucz! This is a simple plug-in, not a perfect plug-in. It is only for teaching purposes. Sorry.

This plug-in is called the "message prompt box", which is similar to the advertisement box popped up in the lower right corner of the webpage. Let's start the development of this plug-in.

Step 1:

Open the config/config_global.php file, and add the following code at the end of the file to enable the plug-in designer mode.

$ _ Config ['inindevelop'] = 1; // $ _ config ['inindevelop'] = 2; as a result, the embedded points are displayed on the front-end pages.

Then you will see "design new plug-in" in "ins" in the background, click in, enter the plug-in information, and submit.

Return to the "plug-in list" and you will see the created plug-in. Click design. The following page is displayed:

Select the plug-in Language Pack. We will also talk about how to use the language pack later.

Currently, the creation of a plug-in is complete.

(For reprint, indicate the source: discuz! X
Examples of plug-in development)

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.