资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

帝国cms分类批量导入 帝国cms批量添加文章

帝国cms怎么批量添加信息的tags

修改步骤:

我们提供的服务有:成都网站设计、网站制作、微信公众号开发、网站优化、网站认证、南皮ssl等。为成百上千企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的南皮网站制作公司

1、以下代码加入到admin/ecmsinfo.php,在任意2个elseif中间插入就行

elseif($enews=="AddTags_all")//列表批量添加Tags

{

$classid=$_POST['classid'];

$id=$_POST['id'];

$tags=$_POST['add_listtags'];

$newstime=time();

eInsertTags2($tags,$classid,$id,$newstime);

}

2、将以下代码加入到class/uesrfun.php

//加入TAG表

function eInsertTags2($tags,$classid,$id,$newstime){

global $empire,$dbtbpre,$class_r;

if(!trim($tags))

{

printerror("TAGS信息不能为空", "", 1, 0, 1);

return '';

}

$count = count($id); //统计ID数量

$tags = RepPostVar($tags);

$tag = explode(",", $tags);

if (emptyempty($count))

{

printerror("未选择信息ID", "", 1, 0, 1);

}

if (count($tag)1)

{

printerror("只能添加一个TAGS词", "", 1, 0, 1);

}

$classid=(int)$classid;

$id[$i] = (int)$id[$i];

$mid=(int)$class_r[$classid][modid];

for($i=0;$i$count;$i++)

{

$tbname=$class_r[$classid][tbname];//获取表名

$r=$empire-fetch1("select tagid from {$dbtbpre}enewstags where tagname='$tags' limit 1");

$t = $empire-fetch1("select infotags from {$dbtbpre}ecms_".$tbname." where id='$id[$i]'");

$taga=$t['infotags'].",".$tags; //组合TAGS

$tagb[$i] = explode(",",$taga); //设置数组

$tagc=array_values(array_unique($tagb[$i])); //数组排重

for($t=0;$tcount($tagc);$t++)

{//二级子循环TAGS数组输出

$newtags[$i].= ",".$tagc[$t];

}

if($r[tagid])

{

$datar=$empire-fetch1("select tagid,classid,newstime from {$dbtbpre}enewstagsdata where tagid='$r[tagid]' and id='$id[$i]' and mid='$mid' limit 1");

if($datar[tagid])

{

if($datar[classid]!=$classid||$datar[newstime]!=$newstime)

{

$empire-query("update {$dbtbpre}enewstagsdata set classid='$classid',newstime='$newstime' where tagid='$r[tagid]' and id='$id[$i]' and mid='$mid' limit 1");

}

}

else

{

$empire-query("update {$dbtbpre}enewstags set num=num+1 where tagid='$r[tagid]'");

$empire-query("update {$dbtbpre}ecms_".$tbname." set infotags='".trim($newtags[$i],",")."' where id='$id[$i]'");

$empire-query("insert into {$dbtbpre}enewstagsdata(tagid,classid,id,newstime,mid) values('$r[tagid]','$classid','$id[$i]','$newstime','$mid');");

}

}

else

{

$empire-query("update {$dbtbpre}ecms_".$tbname." set infotags='".trim($newtags[$i],",")."' where id='$id[$i]'");

$empire-query("insert into {$dbtbpre}enewstags(tagname,num,isgood,cid) values('$tags',1,0,0);");

$tagid=$empire-lastid();

$empire-query("insert into {$dbtbpre}enewstagsdata(tagid,classid,id,newstime,mid) values('$tagid','$classid','$id[$i]','$newstime','$mid');");

}

}

printerror("批量添加TAGS成功", "", 1, 0, 1);

}

3、信息管理列表模板最后一列修改成以下代码,在e/data/html/list/文件夹内

td height="25" colspan="8"

table width="100%" border="0" cellpadding="0" cellspacing="0"

tr

td width="68%" height="25"

font color="#666666"备注:多选框蓝色为未审核信息;发布者红色为会员投稿;信息ID粗体为未生成,点击ID可刷新页面./font

/td

td width="32%" input type="text" name="add_listtags" id="add_listtags" size="50" value="" /

input type="submit" name="Submit100" value="添加TAGS" onClick="document.listform.enews.value='AddTags_all';document.listform.action='ecmsinfo.php';"

/td

/tr

/table

/td

用帝国cms后台制作一个网站,现在想从原网站将新闻数据导进来,dedecms数据库表怎么导入帝国cms数据表

一、批量导入栏目:

insert into phome_enewsclass (classid,bclassid,classname,myorder,classpath,intro,classpagekey) select id,reid,typename,sortrank,typedir,description,keywords from dede_arctype

二、导入文章

insert into phome_ecms_news (id,classid,truetime,onclick,title,titlepic,filename,newstime,lastdotime,smalltext,keyboard) select id,typeid,sortrank,click,title,litpic,filename,pubdate,senddate,description,keywords from dede_archives

三、导入文章来源作者

update `dede_archives` da,phome_ecms_news_data_1 men set da.source=men.befrom,da.writer=men.writer where da.id=men.id

四、导入文章body(内容)

insert into phome_ecms_news_data_1 (id,classid,newstext) select aid,typeid,body from dede_addonarticle men

如果你DEDE数据表中开头为其他的,代码中的dede_也要换成你dede数据库中的开头。

在帝国cms中,怎么批量导入内容关键词,如图示

有解决方法的,对于这种批量导入、重复性操作等,我们现在都是用一款叫“极速点击虎”的软件来完成。因为极速点击虎这款软件不需过多复杂的设置,就可自动导入填写,自动录入和自动点击操作。

其实这么说吧,只要是一些重复的来回的手工操作,都可以由“极速点击虎”软件编排替代!实现办公自动化辅助,批量自动运行的!


当前文章:帝国cms分类批量导入 帝国cms批量添加文章
本文路径:http://cdkjz.cn/article/ddspceh.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220