修改步驟:
創新互聯建站是專業的阿榮網站建設公司,阿榮接單;提供網站制作、成都網站制作,網頁設計,網站設計,建網站,PHP網站建設等專業做網站服務;采用PHP框架,可快速的進行阿榮網站開發網頁制作和功能擴展;專業做搜索引擎喜愛的網站,專業的做網站團隊,希望更多企業前來合作!
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也可以設置文章中的關鍵字自動加鏈接,但是要注意一下關鍵詞替換次數,最好是1次。
怎么操作呢?分兩步完成
1.帝國cms文章關鍵字自動加鏈接:后臺 - 其他 - 管理內容關鍵字 - 在框中添加關鍵詞和鏈接
2.設置關鍵詞只顯示一次(關鍵詞鏈接只替換一次)
后臺 - 系統 - 系統 - 系統設置 - 系統參數設置 - 信息設置
找到“信息內容關鍵字重復替換”,把默認的“0”改成“1”