Destoon模块开发流程

 

Destoon模块开发流程

   2019-05-27 Destoon官方1644

一、复制模块

首先根据需要制作的模块功能,从系统已有模块里选择一个功能类似的模块,在此模块基础上进行修改开发
例如,复制求购模块为采购,模块为offer

复制 module/buy/ 为 module/offer
修改 module/offer/buy.class.php 为 module/offer/offer.class.php

复制 template/default/buy/ 为 template/default/offer/
复制 template/default/member/my_buy.htm 为 template/default/member/my_offer.htm
复制 template/default/tag/list-buy.htm 为 template/default/tag/list-offer.htm
复制 template/default/homapage/buy.htm 为 template/default/homepage/offer.htm
复制 template/default/mobile/buy.htm 为 template/default/mobile/offer.htm

复制 skin/default/buy.css 为 skin/default/offer.css
复制 lang/zh-cn/buy.inc.php 为 lang/zh-cn/offer.inc.php
复制 company/buy/ 为 company/offer/
复制 module/company/buy.inc.php 为 module/company/offer.inc.php
修改 mobile/include/buy.inc.php 为 mobile/include/offer.inc.php
复制 file/setting/buy.csv 为 file/setting/offer.csv
复制 file/setting/buy.sql 为 file/setting/offer.sql所有新创建的文件,查找buy,批量替换为offer,查找求购,批量替换为采购在后台模块管理,添加模块
模块名称 采购
所属模型 采购
安装目录 offer
提交

假如提交之后,采购的模块ID为26
修改 module/offer/admin/install.inc.php 里面的6为26
复制 file/cache/module-6.php 为 file/cache/module-26.php
进入后台功能模块,采购管理,模块设置,提交一下设置
然后复制file/cache/module-26.php 到 file/setting/module-26.php

二、设计字段

根据实际需要新增字段和删除无用字段

后台模板module/offer/admin/tenplate/edit.tpl.php
前台模板template/default/member/my_offer.htm
字段验证和写入module/offer/offer.class.php
增加或删除的字段需要同时在destoon_offer_26数据表里操作

三、编写逻辑

以下为所有采购模块相关的文件的作用列表,根据实际情况修改对应文件(其他模块通用)

文件路径    功能    
module/offer/admin/index.inc.php    后台采购列表    
module/offer/admin/template/index.tpl.php    后台采购列表模板    
module/offer/admin/template/edit.tpl.php    后台添加和修改信息模板    
module/offer/admin/html.inc.php    后台更新网页    
module/offer/admin/template/index.tpl.php    后台更新网页模板    
module/offer/admin/setting.inc.php    后台模块设置    
module/offer/admin/template/setting.tpl.php    后台模块设置模板,此模板可以直接增加或删除参数    
module/offer/admin/config.inc.php    后台模块相关的配置  
module/offer/admin/menu.inc.php    后台模块左侧菜单    
module/offer/admin/install.inc.php    后台安装模块需要执行的操作    
module/offer/admin/uninstall.inc.php    后台安装模块需要执行的操作    
module/offer/admin/remkdir.inc.php    后台重建模块目录需要执行的操作    
module/offer/offer.class.php    核心类库,所有的数据操作通过此文件实现    
module/offer/common.inc.php    通用文件,模块所有文件都先包含此文件    
module/offer/global.func.php    模块需要用到的函数    
module/offer/index.inc.php    前台首页    
module/offer/index.htm.php    前台生成静态首页    
module/offer/list.inc.php    前台列表    
module/offer/list.htm.php    前台生成静态列表    
module/offer/show.inc.php    前台内容页    
module/offer/list.htm.php    前台生成静态内容页    
module/offer/search.inc.php    前台搜索页    
module/offer/my.inc.php    会员中心会员管理和发布采购页    
module/offer/task.inc.php    前台任务页    
module/offer/price.inc.php    前台报价页    
module/company/offer.inc.php    公司主页采购页    
mobile/include/offer.inc.php    手机版采购页    
template/default/offer/index.htm    前台首页模板    
template/default/offer/list.htm    前台列表模板    
template/default/offer/show.htm    前台内容模板    
template/default/offer/search.htm    前台搜索模板    
template/default/offer/price.htm    前台报价模板    
template/default/tag/list-offer.htm    前台标签模板    
template/default/member/my_offer.htm    会员中心会员管理和发布采购模板    
template/default/homepage/offer.htm    公司主页采购模板    
template/default/mobile/offer.htm    手机版采购模板    
skin/default/offer.css    采购模块前台样式    
lang/zh-cn/offer.inc.php    采购模块语言文件



反对 0举报 0 收藏 0 打赏 0
免责声明:凡注明来源本网的所有作品,均为本网合法拥有版权或有权使用的作品,欢迎转载,注明出处。非本网作品均来自互联网,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。
关于作者
avatar
xiaoily520
邵龑
文章
60
粉丝
2
0
0收藏
打赏
手机版