PHPCMS 二次开发 房产模块 第一天

PHPCMS 二次开发 房产模块


应公司的要求,需要在两个月之内做出来一套全新的房产网站。经过数日的研究和分析,对房产类网站有了一个大概的了解。从而断定,在规定的时间内完成任务是一件很苛刻的要求。想来想去,最后还是在PHPCMS上做扩展。添加一个房产模块。

准备工作:
首先 服务器的选择。我是在WINDOWS SERVER 2003下 APACHE + PHP + MYSQL
大家可以自己去选择安装

其次 PHPCMS下载,貌似现在的PHPCMS已经出到了SP4了,而且自从顶级BOSS离开之后,本人也一直在关注TOPCMS 。呵呵,感觉他们有很多相同的地方哦。毕竟UI和架构都是同一个人吧。

第三步:
数据库机构导入。我们的数据库是针对于我们这次开发的安居网的需求而设计的。所以可能不是通用性的。我们主要针对的是新房和楼盘。下面就是其中之一的SQL,当然下面也省去了一部分字段。但是应该够用了。

 

代码
create table anju_housing(
housingid mediumint(
8 ) unsigned not null auto_increment comment ' 楼盘ID ' ,
housingname
varchar ( 200 ) not null comment ' 楼盘名称 ' ,
housingstatus mediumint(
8 ) unsigned not null comment ' 楼盘状态 ' ,
thumbnail
char ( 200 ) null comment ' 缩略图地址 ' ,
videourl
char ( 200 ) null comment ' 视频URL地址 ' ,
areaid
smallint ( 5 ) unsigned not null comment ' 所属区域 ' ,
housingaddress
varchar ( 200 ) not null comment ' 楼盘地址 ' ,
bus
varchar ( 200 ) null comment ' 公交线路 ' ,
opentime
int ( 10 ) unsigned null comment ' 开盘时间 ' ,

primary key (housingid)
)ENGINE
= MYISAM CHARACTER SET utf8 comment = ' 楼盘基本资料表 '

 

 

在MYSQL里面运行,或者直接在PHPMYSQL里面导入都OK。

第四步:
在PHPCMS根目录下面建立文件夹 house
新建 house/install/mysql.sql

内容如下:

代码
INSERT INTO `phpcms_module` (`module`, `name`, `path`, `url`, `iscore`, `version`, `author`, `site`, `email`, `description`, `license`, `faq`, `tagtypes`, `setting`, `listorder`, `disabled`, `publishdate`, `installdate`, `updatedate`)
VALUES ( ' house ' , ' 房产 ' , ' house/ ' , '' , 0 , ' 1.0.0.0 ' , ' http://5igo.net.cn/ ' , ' http://www.33zhu.com/ ' , '' , ' 房产模块 ' , '' , '' , '' , '' , 0 , 0 , ' 2010-05-21 ' , ' 2010-05-21 ' , ' 2010-05-21 ' );

 

 



新建 house/install/extention.inc.php
内容如下:记住下面是SQL语句,而在这个文件里面需要把这个SQL变成PHP代码

代码
INSERT INTO phpcms_menu(parentid,name, image ,url,description,target,style,js,groupids,roleids,isfolder,isopen,listorder,userid,keyid) VALUES ( 5 , ' 房产模块 ' , '' , '' , '' , ' right ' , '' , '' , '' , '' , 1 , 0 , 0 , 0 , ' house ' )

 

 


下面的'916'是上句中插入的房产模块的PARENTID

代码
INSERT INTO phpcms_menu(parentid,name, image ,url,description,target,style,js,groupids,roleids,isfolder,isopen,listorder,userid,keyid) VALUES ( 916 , ' 添加楼盘 ' , '' , ' ?mod=house&file=house&action=add ' , '' , ' right ' , '' , '' , '' , '' , 0 , 0 , 0 , 0 , ' house ' )

 

 



新建 house/install/config.inc.php
内容如下:

1 <? php
2   $module = " house " ;
3   $modulename = " 房产 " ;
4   $introduce = " 房产模块 " ;
5   $author = http : // 5igo.net.cn/;
6 $authorsite = http : // www.33zhu.com/;
7 $authoremail = binbin3056@ 163 . com;
8 ?>

 

 



以下文件可以新建,空着那里。
新建admin/templates //存放管理模板
新建admin/admin.inc.php
新建admin/house.inc.php
新建include/common.inc.php
新建include/house.class.php

敲完这些之后,在PHPCMS后台系统管理->模块管理->添加模块->操作。
运行完全之后提示成功之后,房产模块也就成功安装了。


第一天结束。

转载于:https://www.cnblogs.com/BinZeus/articles/1749172.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值