Content to be modified when a module is created or deleted

Source: Internet
Author: User
Tags custom name
Model: 1. Change the model file name and the class name to the corresponding table name _ model2, and change $ this-> table_name = 'table name' in the constructor '; the table names mentioned here are all modules: 1, which removes the phpcmsv9 table name prefix, and changes the module folder name to its own English name. Generally, the table name is the same as the "Install" folder: 2, change the file name under ages/ZH-CN to the module name. lang. PHP can delete this file and the ages folder only when defining multiple languages. Write content on the page directly. 3. Change the SQL File Name of the created table to the table name. SQL, you can create multiple table SQL files in the model. return array ('SQL filename') in PHP; specifies the SQL file to be executed. If the existing table in the database does not need to be created, no SQL file is available, then model. no return array () can be found in PHP, but the model. the PHP file must exist 4. Drop table if exists 'phpcms _ TABLE name' in the SQL file of the created table '; create Table if not exists 'phpcms _ TABLE name' starts with 'phpcms _ 'and indicates that the name of the created table is "Default table name prefix name_table name ", otherwise, what is the name of the table written here? What is the name of the created table? 5, config. inc. in PHP, $ module = 'module name'; $ modulename = 'module Chinese name'; $ introduce = 'independent module'; $ author = 'author name '; $ authorsite = 'Contact website'; $ authoremail = 'zdy _ 521@126.com '; 6, extention. inc. in PHP, $ parentid = $ menu_db-> insert (Array ('name' => 'custom name 1', 'parentid' => 29 or another value, 'M' => 'module name', 'c' => 'background class name', 'A' => 'default method name ', 'data' =>'s = 1', 'storder' => 0, 'display' => '1' or '0'), true ); $ menu_db-> insert (Array ('name' => 'custom name 2', 'parentid' => $ parentid, 'M' => 'module name ', 'c' => 'background class name', 'A' => 'default method name', 'data' => '', 'storder' => 0, 'display' => '1' or '0'); $ Language = array ('custom name 1' => 'Chinese title name ', 'custom name 2' => 'Chinese title name'); where $ menu_db-> insert can have multiple or none, however, the custom names of each entry, including $ parentid, must be fixed in $ Language = array. return array in PHP ('name of the SQL file to be executed '); 8, module. insert into 'phpcms _ module' ('module ', 'name', 'url', 'iscore', 'version', 'description', 'setting ', 'storder', 'Disabled ', 'installdate', 'updatedate') values ('module English name', 'module Chinese name', 'module folder name'/', 0, '1. 0', 'module Chinese name', '', 0, 0, '2017-10-12 ', '2017-10-12'); uninstall: 9, change the SQL file name to a custom name. sql10: Drop table if exists 'phpcms _ TABLE name' in the delete table SQL statement, indicating to delete "Default table name prefix name_table name ", otherwise, what table name is written here? What table name is deleted? 11, model. return array ('name of the table to be deleted ') in PHP; rules are the same as table Creation

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.