1、帝國cms 首頁怎麼添加帶圖片和標題的新內容啊?
你是說首頁調用吧,用靈動標簽很簡單。
[e:loop={1,10,0,0}]
<a href="<?=$bqsr['titleurl']?>" target="_blank"><img src="<?=$bqr['titlepic']?>"><?=$bqr['title']?></a> <br>
[/e:loop]
這段代碼是調用欄目id為1的10條最新信息。
其中<?=$bqsr['titleurl']?>是調用文章的地址,<?=$bqr['titlepic']?>是圖片路徑,<?=$bqr['title']?>是文章標題。這種調用如果文章沒有標題圖片就調用不出來圖片。可以用這種寫法
<img src="<?=$bqr[titlepic]?$bqr[titlepic]:$public_r[newsurl]."e/data/images/notimg.gif"?>" width="60" height="60" alt="">,這樣如果沒有標題圖片會調用默認圖片notimg。
愛建站公益網有詳細教程,你可以看我資料找到網址,在這里就不發了
2、帝國cms首頁多表調用,要調用欄目縮略圖+標題。
本來不想回答 去年做過項目4表聯合 拿去自己改吧 不會改就沒辦法 不解釋
[e:loop={'select *
from
(
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news where istop=1 order by newstime desc limit 13 )
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news1 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news2 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news3 where istop=1 order by newstime desc limit 13)
) as A order by newstime desc limit 20',0,24,0}]
<?php
$fb=$empire->fetch1("select *
from
(
(select id,classid,smalltext from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
?>
<li class="clearfix">
<a target='_blank' href="<?=$bqr[titleurl]?>" title="<?=$bqr[title]?>" class="index-img"><img src="<?=$bqr[titlepic]?$bqr[titlepic]:'404.jpg'?>" alt="<?=$bqr[title]?>"></a>
<div class="index-text">
<h1><a target='_blank' href="<?=$bqr[titleurl]?>"><?=$bqr[title]?></a>
</h1>
<div class="index-con"></div>
<div class="index-intro"><a target="_blank" href="<?=$bqr[titleurl]?>?from=index_new_intro"><?=$fb[smalltext]?></a></div>
<div class="index-like clearfix">
<span class="time">
<?php
$fr=$empire->fetch1("select *
from
(
(select id,classid,infotags from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
$keyr=explode(',',$fr[infotags]);
for($i=0;$i<2;$i++)
{
echo'<span><a href="/liaotian/tags-'.$keyr[$i].'-0.html" target=_blank>'.$keyr[$i].'</a></span> ';
}
?>
</span>
<span class="time"><?=format_datetime($bqr[newstime],"m-d")?></span>
<div class="post-ope">
<a href="/e/public/digg/?classid=<?=$bqr[classid]?>&id=<?=$bqr[id]?>&dotop=1&ajaxarea=diggnum<?=$bqr[id]?>" class="post-like-btn post-like" id="post-like-top-btn">
<script>
document.write('<script src="/e/public/ViewClick/?classid=<?=$bqr[classid]?>&id=<?=$bqr[id]?>&down=5?t='+Math.random()+'"><'+'/script>');
</script>
</a>
</div>
</div>
</div>
</li>
[/e:loop]
功能:聯合取4表數據 關聯取附表簡介 並取標簽 附加頂功能 動態瀏覽量等
3、圖片+標題+摘要 帝國cms靈動標簽怎麼調?
用e:loop 調用
[e:loop={17,1,0,1}]
標題圖片:<img src="<?=$bqr[titlepic]?>" alt="<?=$bqsr[title]?>" />
內容簡介截取前200個位元組(一個中文字元是兩個位元組):<?=esub($bqr[smalltext],200)?>
標題:<?=$bqsr[title]?>
[/e:loop]
4、如何製作帝國cms內容頁的調用欄目縮略圖
TAG:帝國cms
如何製作帝國cms內容頁的調用欄目縮略圖
帝國cms6.0後已經無法用[!--class.classimg--]直接調用欄目縮略圖了,5.1以前的能行,現在只能在列表頁能用[!--class.classimg--]調用縮略圖標簽,現在只有用靈動或者萬能標簽才能調用,調用代碼如下
[e:loop={"select classimg from phome_enewsclass where classid='$GLOBAL[navclassid]'",1,24,0}]
[/e:loop]
5、帝國cms怎麼獲取列表頁當前欄目鏈接和欄目名稱
列表頁獲取當前欄目鏈接 :
<?=sys_ReturnBqClassUrl($class_r[$GLOBALS[navclassid]]);?>
列表頁獲取當前欄目名稱 :
[!--class.name--]
6、如何製作帝國cms內容頁的調用欄目縮略圖
TAG:帝國cms
如何製作帝國cms內容頁的調用欄目縮略圖
帝國cms6.0後已經無法用[!--class.classimg--]直接調用欄目縮略圖了,5.1以前的能行,現在只能在列表頁能用[!--class.classimg--]調用縮略圖標簽,現在只有用靈動或者萬能標簽才能調用,調用代碼如下
[e:loop={"select classimg from phome_enewsclass where classid='$GLOBAL[navclassid]'",1,24,0}]
[/e:loop]
7、帝國cms列表頁,內容頁怎麼自定義標題呢?
網站的title 如果在模板裡面有定義的話,是可以在 後台 設置的
首頁支持的變數:
[!--pagetitle--]:網站名稱
[!--pagedes--]:頁面描述
[!--pagekey--]:頁面關鍵字
模板內寫好變數後, 在後台 : 系統 -> 系統設置 -> 系統參數設置
網站名稱 對應的就是 模板里的 [!--pagetitle--]
8、帝國cms 左邊顯示圖片 右邊欄目列表
不知道你的意思是想表達什麼
如果是左邊調用第一條,右邊調用第2-4條,可以內在調用條數那裡用容'0,1' 和'1,3'來實現。
如果是左邊調用推薦等特殊屬性,右邊調最新,那就更簡單了,標簽後台有。
不知道是否是你需要的,有問題歡迎追問。
9、帝國Cms怎麼給欄目頁和內容頁添加標題
內容頁:[!--pagetitle--]<-[!--class.name--]<-<a href="/">首頁</a>
一級欄目頁:[!--class.name--]<-<a href="/">首頁</a>
二級欄目頁:[!--class.name--]<-[!--bclass.name--]<-<a href="/">首頁</a>
三級以上的欄目頁需要修改代碼了或自己寫代碼。
10、帝國CMS怎樣調用如下圖,在文章前面加個欄目名稱
欄目名稱標簽
[!--class.name--] :欄目名稱(帶鏈接)
[!--this.classname--] :欄目名稱(不帶鏈接)
看你的標簽[ecmsinfo]0,10,28,1,4,2,0[/ecmsinfo]用的是標簽模板里ID為2 的 《標題列表模板》
點擊標題列表模板後面的修改,
在「列表內容模板(list.var) (*)」里把欄目名稱標簽加上
如:
<li>[!--class.name--]<a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]</a></li>