帝国CMS批量tag,帝国CMS批量自动排版
当前目录列表:
1、帝国CMS怎么批量添加信息的tags 2、在帝国CMS中,怎么批量导入内容关键词,如图示 3、帝国CMS中怎样设置tag标签 4、帝国CMS 批量修改数据
帝国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($tag1)
{
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中,怎么批量导入内容关键词,如图示
有解决方法的,对于这种批量导入、重复性操作等,我们现在都是用一款叫“极速点击虎”的软件来完成。因为极速点击虎这款软件不需过多复杂的设置,就可自动导入填写,自动录入和自动点击操作。
其实这么说吧,只要是一些重复的来回的手工操作,都可以由“极速点击虎”软件编排替代!实现办公自动化辅助,批量自动运行的!
帝国CMS中怎样设置tag标签
1、登录后台,单击【栏目】菜单——【TAGS管理】——【设置TAGS参数】子菜单,进入设置TAGS参数界面;
2、进入设置TAGS参数界面, 前台开启TAGS:设置前台/e/tags/页面是否开启使用。
默认使用的模板:选择tags的列表模板,这里建议选择和文章一样的列表模板;
每页显示信息:设置不指定line情况下默认的每页显示信息数。
帝国CMS 批量修改数据
用帝国做的商城系统,上传了很多产品图片,后来要求把缩略图改小,很伤脑筋,结果找到上面的帖子,但怎么搞也不行,可能那不是针对6.0.所有自己加以修改终于成功!!!
以下为修改方法:
一、首先,在t_functions.php中添加一下两个函数
1.function Titlepic_all ,$id, $classid, $userid, $username, $pwidth, $pheight
2. {
3. global $empire,$class_r,$class_zr,$dbtbpre,$keys;
4. $count = count ,$id;
5. if ,!$count
6. {
7. printerror ,'Noteditpic', 'history.go(-1');
8. }
9. for ,$i = 0; ($i $count; ++$i)
10. {
11. $r = $empire-fetch1 ,'select * from phome_ecms_'.$class_r[$classid][tbname].' where id='.$id[$i].' and titlepic""';
12. if,!emptyempty($r[id]){
13. ImageResize,"../../".$r[titlepic],$pwidth,$pheight,"../../".$r[titlepic];
14.
15. }
16. }
17.printerror ,'TitlepicAllSuccess', $_SERVER['HTTP_REFERER'];
18. }
19.Function ImageResize,$srcFile,$toW,$toH,$toFile=""
20.{
21. global $keys;
22. if,$toFile==""{ $toFile = substr,$srcFile,0,-4."small".substr,$srcFile,-4; }
23. $info = "";
24. $data = GetImageSize,$srcFile,$info;
25. switch ,$data[2]
26. {
27. case 1:
28. if,!function_exists("imagecreatefromgif"){
29. echo "你的GD库不能使用GIF格式的图片,请使用Jpeg或PNG格式
30.
31.!a href='fontjavascript:/fontgo,-1;'返回/a";
32. exit,;
33. }
34. $im = ImageCreateFromGIF,$srcFile;
35. break;
36. case 2:
37. if,!function_exists("imagecreatefromjpeg"){
38. Echo "你的GD库不能使用jpeg格式的图片,请使用其它格式的图
39.
40.片!a href='fontjavascript:/fontgo,-1;'返回/a";
41. Exit,;
42. }
43. $im = ImageCreateFromJpeg,$srcFile;
44. break;
45. case 3:
46. $im = ImageCreateFromPNG,$srcFile;
47. break;
48.}
49.$srcW = ImageSX,$im;
50.$srcH = ImageSY,$im;
51.$keys= 0;
52.if ,($srcW$toW or ,$srH$toH){
53.if,($srcW/$toW=,$srcH/$toH){
54. $temp_
55. $temp_
56. $src_X=Abs,($toW-$temp_width/2);
57. $src_Y=0;
58. }
59. else{
60. $temp_width=$toW;
61. $temp_height=$srcH/,$srcW/$toW;
62. $src_X=0;
63. $src_Y=Abs,($toH-$temp_height/2);
64. }
65. $temp_img=ImageCreateTrueColor,$temp_width,$temp_height;
66. imagecopyResampled,$temp_img,$im,0,0,0,0,$temp_width,$temp_height,$srcW,$srcH;
67. $ni=ImageCreateTrueColor,$toW,$toH;
68. imagecopyResampled,$ni,$temp_img,0,0,$src_X,$src_Y,$toW,$toH,$toW,$toH;
69.
70.if,Function_exists('imagejpeg') ImageJpeg,$ni,$toFile;
71. else ImagePNG,$ni,$toFile;
72. ImageDestroy,$ni;
73.$keys= 1;
74.}
75.ImageDestroy,$im;
76.}
二、修改 e/admin/ListNews.php{还有个页面:e/admin/ListAllInfo.php},大约在最后几行“选中全部 /td/tr”的后面添加以下代码:
tr bgcolor="#FFFFFF"
td height="25" colspan="8"div align="right"
缩略图宽: input name="pwidth" type="text" value="120" width="60"
缩略图高: input name="pheight" type="text" value="120" width="60"
input type="submit" name="Submit355" value="修改缩略图" onClick="document.listform.enews.value='Titlepic_all';"
/div/td/tr
其中,图宽和图稿的默认值可按自己的情况设定,设定好后,以后操作更方便。
三、在e/admin/ecmsinfo.php中添加如下代码:
//批量加标题图片
elseif,$enews=="Titlepic_all"
{
$id=$_POST['id'];
$classid=$_POST['classid'];
$bclassid=$_POST['bclassid'];
$pwidth=$_POST['pwidth'];
$pheight=$_POST['pheight'];
Titlepic_all,$id,$classid,$logininid,$loginin,$pwidth,$pheight;
}
四、函数中用到“ printerror ,'Noteditpic', 'history.go(-1');”等操作提示,这个提示可加在e/data/language/gb/pub/message.php;当然这一步不加也不影响操作
在message.php 后面加:
'Noteditpic'='没有选择!',
'TitlepicAllSuccess'='操作成功!',
2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
4. 建站教程 > 帝国CMS批量tag,帝国CMS批量自动排版


