In the Destoon use of the need to establish some of the system does not have modules, you need to copy the existing modules to build a new module based on the existing modules. How to do: First, select a module (because the system default article and information module can be copied, here only to study the non-default module how to copy), I chose the module name is the brand, the directory name is branding, the module ID is 13, you can also choose to copy the module as needed. The first step is to copy the brand folder under the root directory, paste and rename it, and use rename to name it as a demonstration. Root directory more than a folder called Rename, open this folder, find config.inc.php This file, open:
- $moduleid = 13;
- ?>
Copy CodeChange the 13 here to a number that you do not have in the module ID, and we use 88 instead of it as a demonstration. The second step, find the root directory/module this folder open, copy the brand folder inside, after pasting renamed to rename, open this new folder within the admin/ config.inc.php this file, inside the file is like this (for easy to understand, here added comments)
- Defined (' In_destoon ') or exit (' Access Denied ');
- $MCFG [' module '] = ' brand ';//change here to ' rename ';
- $MCFG [' name '] = ' brand ';//change this to your new module name such as: ' New module ';
- $MCFG [' author '] = ' destoon.com ';
- $MCFG [' homepage '] = ' www.destoon.com ';
- $MCFG [' copy '] = false;//is changed here to true;
- $MCFG [' uninstall '] = true;
- $MCFG [' moduleid '] = 13;//here instead of 88;
- $RT = Array ();
- $RT [' file '] [' index '] = ' brand management ';
- $RT [' file '] [' html '] = ' Update page ';
- $RT [' Action '] [' index '] [' add '] = ' Add brand ';
- $RT [' Action '] [' index '] [' edit '] = ' Modify brand ';
- $RT [' Action '] [' index '] [' delete '] = ' Delete Brand ';
- $RT [' Action '] [' index '] [' check '] = ' audit brand ';
- $RT [' Action '] [' index '] [' expire '] = ' expired brand ';
- $RT [' Action '] [' index '] [' reject '] = ' failed brand ';
- $RT [' Action '] [' index '] [' recycle '] = ' Recycle Bin ';
- $RT [' Action '] [' index '] [' move '] = ' mobile brand ';
- $RT [' Action '] [' index '] [' level '] = ' brand rank ';
- $CT = true;
- ?>
Copy CodeReplace the brand here, (bbs.it-home.org) with your new module name such as: ' New module ', and save it according to the comments, then open the html.inc.php in the sibling directory. This file is found in approximately 65 and 66 rows.
- if ($update) {
- Require Md_root. ' /brand.class.php ';
- $do = new Brand ($moduleid);
- }
Copy CodeReplace the two brand with rename, and then open the index.inc.php file in the sibling directory, which is found on the third line:
- Require Md_root. ' /brand.class.php ';
- $do = new Brand ($moduleid);
Copy CodeAlso replace these two brand with rename save, OK, find the parent directory (root directory/module/ Rename) my.inc.php This file, with the editor's replacement function to replace all brand with rename after the save, and then open the sibling directory brand.class.php this file, also with the editor's replacement function to replace all brand with rename Save As (note is saved as ) rename.class.php. The third step, find your template path (default to root directory/template/default) Copy brand folder paste after renaming to rename, and then open the member folder under the sibling directory to find my_brand.htm this file, copy and paste renamed to My_ Rename.htm. After completing the above three steps, the code aspect of our copy module is basically complete, then we will copy the database, find the two tables of Destoon_brand and Destoon_brand_data in the database, and rename it to Destoon_ after copying. Rename and Destoon_rename_data, (if the database is running, it may need to be paused after performing the above actions) After completing the login background, in my panel-"module management, select Add Module, and then fill in the module name such as:" New module ", in the model of the drop-down option you will find a more than a" new module "option, select it, fill in the installation directory rename, click OK. Then go to the function module and see if you have more than one function module called "New module"? If it appears that you have just the operation of no problem, congratulations on the module has been added to complete. But you're immersed in joy. Eager to add data to the new module when you find that the page is blank, which is why? The reason is that in the module setup there is a sort of information, choose one here, by the way the following list or search the main field also fill it, after filling out the point to determine, and then try to add is not it can be used? The actual use of the process will also encounter a problem, is to add this module in the Member Center when the use of the prompt does not have permission, please upgrade, to see the background membership group permissions to publish information has been checked, why also prompted insufficient authority? The workaround is to find the root directory/module/member/admin/template/group_edit.tpl.php this file, in about 762 lines to find the following code
|