[e:loop={欄目ID/專題ID,顯示條數(shù),操作類型,只顯示有標(biāo)題圖片,附加SQL條件,顯示排序}]
我們提供的服務(wù)有:網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、正定ssl等。為上1000+企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的正定網(wǎng)站制作公司
trtd
a href="?=$bqsr[titleurl]?" target="_blank"?=$bqr[title]?/a
(發(fā)布時(shí)間:?=date('Y-m-d',$bqr[newstime])?)
/td/tr[/e:loop]
修改步驟:
1、以下代碼加入到admin/ecmsinfo.php,在任意2個(gè)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); //統(tǒng)計(jì)ID數(shù)量
$tags = RepPostVar($tags);
$tag = explode(",", $tags);
if (emptyempty($count))
{
printerror("未選擇信息ID", "", 1, 0, 1);
}
if (count($tag)1)
{
printerror("只能添加一個(gè)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); //設(shè)置數(shù)組
$tagc=array_values(array_unique($tagb[$i])); //數(shù)組排重
for($t=0;$tcount($tagc);$t++)
{//二級(jí)子循環(huán)TAGS數(shù)組輸出
$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/文件夾內(nèi)
td height="25" colspan="8"
table width="100%" border="0" cellpadding="0" cellspacing="0"
tr
td width="68%" height="25"
font color="#666666"備注:多選框藍(lán)色為未審核信息;發(fā)布者紅色為會(huì)員投稿;信息ID粗體為未生成,點(diǎn)擊ID可刷新頁(yè)面./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
1、登錄后臺(tái),單擊【欄目】菜單——【TAGS管理】——【設(shè)置TAGS參數(shù)】子菜單,進(jìn)入設(shè)置TAGS參數(shù)界面;
2、進(jìn)入設(shè)置TAGS參數(shù)界面, 前臺(tái)開(kāi)啟TAGS:設(shè)置前臺(tái)/e/tags/頁(yè)面是否開(kāi)啟使用。
默認(rèn)使用的模板:選擇tags的列表模板,這里建議選擇和文章一樣的列表模板;
每頁(yè)顯示信息:設(shè)置不指定line情況下默認(rèn)的每頁(yè)顯示信息數(shù)。
那你要把這個(gè)字段值寫進(jìn)去呀。所以你要找到這個(gè)頁(yè)面的提交處理頁(yè)面,然后在這個(gè)頁(yè)面內(nèi)加入你要添加的那個(gè)字段值。最后在前臺(tái)輸出。
本文名稱:關(guān)于帝國(guó)cms通過(guò)tags的信息
當(dāng)前URL:http://muchs.cn/article6/ddcgoig.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、ChatGPT、網(wǎng)站維護(hù)、虛擬主機(jī)、軟件開(kāi)發(fā)、靜態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)