1、帝國cms首頁圖片路徑怎麼修改 看圖
打開首頁模板
找到需要修改的圖片代碼
直接復制圖片路徑到首頁所需修改代碼出進行替換
【備註:圖片在首頁代碼中是採用調用模式,那麼就需要到所調用文章或是圖集中進行替換修改(也可修改調用代碼,對調用圖片集或文件進行指定)。】
2、帝國CMS如何調用內容頁面的圖片?
不知道你主頁面上的這個標題欄是文字還是圖片?如果是圖片,修改圖片替換。如果是寫在主頁模板里的文字,需要在後台主頁模板里改。如果是其他調用,要從被調用的地方去改。
3、帝國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表數據 關聯取附表簡介 並取標簽 附加頂功能 動態瀏覽量等
4、帝國CMS 封面式的專題,如何調用頁面式的內容?
<?
$bqrss = mysql_query("select * from phome_enewsclassadd where classid='$GLOBALS[navclassid]'");
$ksjs=mysql_fetch_row($bqrss);
echo $ksjs[1];//調用頁面內容
?>
5、帝國cms首頁調用欄目最新文章,前四條顯示圖片,其它的沒有圖片
你也是用靈動標簽調取的吧!
前四條新聞可以添加時候設置一級推薦,在靈動標簽調取的時候選擇該欄目下的一級推薦文章,後面不帶圖片的設置成推薦為0,即'isgood=0'就可以了。
6、帝國cms靈動標簽如何調用新聞正文第一張圖片??
在connect.php搜索「//替換列表模板/標簽模板/搜索模板」
在上方增加以下代碼:
//獲取內容頁第一張大圖片
function diy_imgFirst($r){
global $empire,$dbtbpre;
$fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_news_data_1 where id='$r[id]'");
$newstext=stripslashes($fr['newstext']);//去除反斜杠並且獲取文章正文內容
$pattern = "/.*src=\"([^^]*?)\".*/i"; //正則
preg_match_all($pattern, $newstext, $match);
if(count($match[1])>=1){
//return $match[1][0];//返回第一張圖片地址
$diyfpic=$match[1][0];
}else{
$diyfpic=$r['titlepic'];
}
return $diyfpic;
}
還是修改這個文件,搜索
1 $titleurl=sys_ReturnBqTitleLink($r);//鏈接
在下方增加以下代碼:
1 $diyfpic=diy_imgFirst($r);
還是這個文件,搜索
1 $listtemp=str_replace('[!---titleurl--]',$titleurl,$listtemp);
在下方增加以下代碼:
1 $listtemp=str_replace('[!---diyfpic--]',$diyfpic,$listtemp);
後台在 管理列表模板 的list.var中,直接使用[!---diyfpic--]
最好把
$diyfpic=$r['titlepic'];
改成
$diyfpic='e/data/images/notimg.gif';
因為一般沒有大圖,就沒有縮略圖。或者留空也行。
以上方法在帝國CMS 6.6中測試通過,7.0未測試
7、帝國CMS首頁flash圖片調用只顯示一個框
操作類型換成0,欄目ID用指定多個試試看
8、帝國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。
愛建站公益網有詳細教程,你可以看我資料找到網址,在這里就不發了
9、帝國cms首頁如何調用圖片集的圖片
用靈動標簽也可以的