帝国cmstags模板 帝国cms tag

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

修改步骤:

站在用户的角度思考问题,与客户深入沟通,找到富县网站设计与富县网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:做网站、网站制作、企业官网、英文网站、手机端网站、网站推广、域名注册网站空间、企业邮箱。业务覆盖富县地区。

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中怎样设置tag标签

1、登录后台,单击【栏目】菜单——【TAGS管理】——【设置TAGS参数】子菜单,进入设置TAGS参数界面;

2、进入设置TAGS参数界面, 前台开启TAGS:设置前台/e/tags/页面是否开启使用。

默认使用的模板:选择tags的列表模板,这里建议选择和文章一样的列表模板;

每页显示信息:设置不指定line情况下默认的每页显示信息数。

帝国cms 自动生成标签怎么使用

帝国cms的模板标签都有说明的,直接看向导就可以完成了,基本上你想要的任何功能,都有说明的

帝国CMS在标签模板中怎么调用栏目缩略图

谁能帮我写一下代码:在标签模板中写的不是内容模板要调用栏目的缩略图谢谢设置-基本属性里面的站点名称是title\\\\网站关键字是keyword\\\\网站简介是

当前题目:帝国cmstags模板 帝国cms tag
链接URL:https://www.cdcxhl.com/article28/ddesjjp.html

成都网站建设公司_创新互联,为您提供虚拟主机网页设计公司云服务器App设计做网站微信公众号

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都seo排名网站优化