相信很多织梦建站的站长都会遇到做一下自定义的功能,比如:织梦栏目管理里面在新增一个栏目内容(如图1所示),这种情况就需要给数据库单独在新增一个字段了。接下来教大家解决方法。
第一步:给dede_arctype数据库表添加字段,注:dede_arctype根据自己的数据库前缀自行调整。
方法一:系统设置-sql命令行工具 ALTER table `dede_arctype` ADD `content1` TEXT NOT NulL AFTER `content1` ;
方法二:phpmyadmin给dede_arctype表新增字段
1:dede_arctype表然后选择结构,在底部选择与content之后(不填也行),点击执行。
2:新增字段,如图所示填好后,保存就行。
第二步:打开dede\catalog_edit.PHP,
找到:`content`='$content',(大概在54行左右)
替换成:
`content`='$content',
`content1`='$content1',
第三步:打开dede\templets\catalog_edit.htm,这一步修改很重要。
1:
@H_502_37@
function ShowItem1(){ ShowObj('head1'); ShowObj('needset'); HIDeObj('head2'); HIDeObj('adset'); HIDeObj('head3'); HIDeObj('ctset'); HIDeObj('head4'); HIDeObj('ctset1');} function ShowItem2(){ ShowObj('head2'); ShowObj('adset'); HIDeObj('head1'); HIDeObj('needset'); HIDeObj('head3'); HIDeObj('ctset'); HIDeObj('head4'); HIDeObj('ctset1');} function ShowItem3(){ ShowObj('head3'); ShowObj('ctset'); HIDeObj('head1'); HIDeObj('needset'); HIDeObj('head2'); HIDeObj('adset'); HIDeObj('head4'); HIDeObj('ctset1');} function ShowItem4(){ ShowObj('head4'); ShowObj('ctset1'); HIDeObj('head3'); HIDeObj('ctset'); HIDeObj('head1'); HIDeObj('needset'); HIDeObj('head2'); HIDeObj('adset');} |
2:
|
评论列表(0条)