Install, upgrade, and uninstall the DiscuzX plug-in

Source: Internet
Author: User
The author can design two script files for plug-in installation and uninstallation. the file name is arbitrary. The runquery () function can be used in the script to execute SQL statements. The table name can be directly written as "cdb _". The plug-in Author only needs to add the file name of the installation and uninstallation script at the end of the exported XML file to the itemidinstallfile! [CDATA [install. p Install and uninstall

The plug-in author can design two script files for plug-in installation and uninstallation. the file name is arbitrary. The runquery () function can be used in the script to execute SQL statements. The table name can be directly written as "cdb _". The plug-in Author only needs to add the file name of the installation and uninstallation script at the end of the exported XML file.

install.php
uninstall.php


You can design page jumps when installing or uninstalling a program. you only need to add the following code when the plug-in is installed or uninstalled.

$ Finish = TRUE;
Upgrade

The plug-in author can design a script file for plug-in upgrade. the file name is arbitrary. The runquery () function can be used in the script to execute SQL statements. The table name can be directly written as "cdb _". The plug-in Author only needs to add the file name of the upgrade script at the end of the exported XML file.

upgrade.php


In the upgrade program, you can use the $ fromversion and $ toversion variables to determine the specific version number of the upgrade, and design the page jump at will, as long as the following code is output at the end of the plug-in upgrade.

$ Finish = TRUE;

The current version of the plug-in is located in the following branch of the XML file and can be changed by yourself.


......
当前版本
......

Detection

The plug-in author can design a script file to detect plug-ins before they are installed, uninstalled, or upgraded. the file name is arbitrary. The plug-in Author only needs to add the file name of the detection script at the end of the exported XML file.

check.php


Introduction to authorization protocols and plug-ins

You can customize the authorization text when installing the plug-in. the text supports Discuz! Code, the webmaster agreed to install the plug-in. If the plug-in has a background management interface or variable configuration, the plug-in introduction text is displayed on the plug-in background page. The plug-in Author only needs to add the following content at the end of the exported XML file.

授权协议文本
插件介绍文本


Version compatibility settings

Please carefully check whether your plug-in can be found in the corresponding Discuz! Version. Then, modify the settings in the following branch of the XML file.

If your plug-in is compatible with multiple versions, separate them with commas (,), for example, "X2, X2.5" (this is written in Discuz! X2 R20120329 and later)



......

......
兼容性设置
......

Import data from other forums

When installing the plug-in, you can directly import one or more Forum data, including smilies and styles. Add the type and file name of the imported data to the end of the exported XML file. Separate multiple file names with commas.


<u>discuz</u>_smilies_test.xml
discuz_styles_test.xml



Tips

If the exported XML file name ends with SC _GBK, SC _UTF8, TC_BIG5, and TC_UTF8, the exported XML file name is displayed as "simplified", "traditional", and "UTF8.

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.