一、安装文件

①languages文件夹

  语言包:zh-cn\order.lang.php 

//样式
<?php
$LANG['order_new'] = '订单管理';
?>

②templates文件夹(可不写)
③config.inc.php

//基本格式固定
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$module = 'order';
$modulename = '订单管理';
$introduce = '订单管理模块';
$author = 'suihui';
?>

④extention.inc.php

//固定格式
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
//向menu表里添加后台数据,parentid 父级id m 模块名 c 文件名 a 方法名 listorder排序 display 是否显示 1显示 true返回值
$parentid = $menu_db->insert(array('name'=>'link', 'parentid'=>29, 'm'=>'link', 'c'=>'link', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true);
$menu_db->insert(array('name'=>'add_link', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'add', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'edit_link', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'edit', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'delete_link', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'delete', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'link_setting', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'setting', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$menu_db->insert(array('name'=>'add_type', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'add_type', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$menu_db->insert(array('name'=>'list_type', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'list_type', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$menu_db->insert(array('name'=>'check_register', 'parentid'=>$parentid, 'm'=>'link', 'c'=>'link', 'a'=>'check_register', 'data'=>'', 'listorder'=>0, 'display'=>'1'));

//向安装表里与添加值
$link_db = pc_base::load_model('link_model');
$link_db->insert(array('siteid'=>1,'typeid'=>$typeid,'linktype'=>'1','name'=>'PHPCMS','url'=>'http://www.phpcms.cn','logo'=>'http://www.phpcms.cn/images/logo_88_31.gif','passed'=>1,'addtime'=>SYS_TIME));
$link_db->insert(array('siteid'=>1,'typeid'=>$typeid,'linktype'=>'1','name'=>'盛大在线','url'=>'http://www.sdo.com','logo'=>'http://www.snda.com/cn/logo/comp_logo_sdo.gif','passed'=>1,'addtime'=>SYS_TIME));

//必须与array('name'=>'link' 要对应
$language = array('link'=>'友情链接', 'add_link'=>'添加友情链接', 'edit_link'=>'编辑友情链接', 'delete_link'=>'删除友情链接', 'link_setting'=>'模块配置', 'add_type'=>'添加类别', 'list_type'=>'分类管理', 'check_register'=>'审核申请'); 

⑤model.php

//固定格式 知道怎么修改
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
return array('link');
?>

⑥module.sql

//可以借助phpmyadmin 主要是向module表里添加数据
INSERT INTO `phpcms_module` VALUES ('link', '友情链接', '', '', '1.0', '', 'array (\n 1 => \n array (\n \'is_post\' => \'1\',\n \'enablecheckcode\' => \'0\',\n ),\n)', '', '', '2010-09-06', '2010-09-06');

⑦order.sql

借助phpmyadmin 工具生成

二、卸载文件uninstall

extention.inc.php

//格式固定
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
$type_db = pc_base::load_model('type_model');
$typeid = $type_db->delete(array('module'=>'link'));
if(!$typeid) return FALSE;
?>

link.sql

DROP TABLE IF EXISTS `phpcms_link`;

model.php

<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
return array('link');
?>

1.phpcms的安装和卸载文件的更多相关文章

  1. Windows服务的创建、安装、卸载

    1.新建Window服务项目 2.添加安装配置文件 3.serviceProcessInstaller1右键属性,设置Account属性为LocalSystem. serviceInstaller1右 ...

  2. linux下.run文件的安装与卸载

    linux下.run文件的安装与卸载   .run文件的安装很简单,只需要为该文件增加可执行属性,即可执行安装 以 virtualbox 的安装文件 virtualbox-3.1.6-59338-Li ...

  3. centos的安装与配置,Linux下基本命令、权限控制,解压缩文件以及软件的安装与卸载

    centos安装与网络配置 关机:shutdown -h now 重启:shutdown -r now 或 reboot linux目录结构与操作命令 使用ls命令查看目录结构 目录查看: ls [- ...

  4. C#创建、安装、卸载、调试Windows Service(Windows 服务)的简单教程

    前言:Microsoft Windows 服务能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而且不显示任何用户界面.这 ...

  5. 教你一招:解决win10/win8.1系统在安装、卸载软件时出现2502、2503错误代码的问题

    经常遇到win10/win8.1系统在安装.卸载软件时出现2502.2503错误代码的问题. 解决办法: 1.打开任务管理器后,切换到“详细信息”选项卡,找到explore.exe这个进程,然后结束进 ...

  6. Android随笔之——静默安装、卸载

    随笔之所以叫随笔,就是太随意了,说起来,之前的闹钟系列随笔还没写完,争取在十月结束之前找时间把它给写了吧.今天要讲的Android APK的静默安装.卸载.网上关于静默卸载的教程有很多,更有说要调用隐 ...

  7. Windows服务安装与卸载

    Windows服务安装与卸载,使用到了InstallUtil.exe 安装: c: cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319&quo ...

  8. Windows服务一:新建Windows服务、安装、卸载服务

    Windows 服务(即,以前的 NT 服务)使您能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而且不显示任何用户界面 ...

  9. ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置

    一.安装.卸载apache2      apache2可直接用命令安装           sudo apt-get install apache2      卸载比较麻烦,必须卸干净,否则会影响ap ...

随机推荐

  1. cxGrid使用汇总

    1.自动行高:CellAutoHeight(单元自动高度)设置为True. procedure <AForm>.<AGridColumn>PropertiesValidate( ...

  2. springmvc上传文件报错org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]

    在用springmvc+mybatis进行项目开发时,上传文件抛异常... org.springframework.beans.BeanInstantiationException: Could no ...

  3. windows多线程(十) 生产者与消费者问题

    一.概述 生产者消费者问题是一个著名的线程同步问题,该问题描述如下:有一个生产者在生产产品,这些产品将提供给若干个消费者去消费,为了使生产者和消费者能并发执行,在两者之间设置一个具有多个缓冲区的缓冲池 ...

  4. laravel中的Contracts, ServiceContainer, ServiceProvider, Facades关系

    Contracts, ServiceContainer, ServiceProvider, Facades  Contracts 合同,契约,也就是接口,定义一些规则,每个实现此接口的都要实现里面的方 ...

  5. background的使用

    先简单的介绍颜色表示法 一共有三种:单词,rgb表示法,十六进制表示法 rgb:红色 绿色 蓝色 三原色 光学显示器,每个像素都是有三原色的发光原件组成的,靠明亮度不同调成不同的颜色的 有逗号隔开,r ...

  6. tomcat设置虚拟路径映射服务器指定的物理路径

    在tomcat的server.xml中的host标签中加入如下标签: <Context crossContext="false" debug="1" do ...

  7. vs2017自动生成的#include“stdafx.h”详解及解决方案

    vs2017自动生成的#include“stdafx.h”详解及解决方案 问题描述: 在高版本的Visual Studio的默认设置中,会出现这么一个现象,在新建项目之后,项目会自动生成#includ ...

  8. 【算法】Tarjan大锦集

    Task1 Description 一位冷血的杀手潜入 Na-wiat,并假装成平民.警察希望能在 N 个人里面,查出谁是杀手. 警察能够对每一个人进行查证,假如查证的对象是平民,他会告诉警察,他认识 ...

  9. C++中三种传递参数方法的效率分析

    众所周知,在C++中有三种参数传递的方式: 按值传递(pass by value) #include <iostream> using namespace std; void swap(i ...

  10. MySQL 性能比较测试:MySQL 5.6 GA -vs- MySQL 5.5

    时间:2013年11月07日 ⁄ 分类: 数据库技术文档 ⁄   我要吐槽发评论 MySQL 5.6 GA 发布了,毫无疑问,这是 MySQL 最棒的一个版本. 如果你还不清楚 MySQL 5.6 版 ...