1、請問帝國cms6.5中靈動標簽按sql語句查詢怎麼做
<ul>
[e:loop={"select title from {$dbtbpre}ecms_flag where id='$navinfor[wfrom]' order by id desc",1,24,0,'',''}]
<li>
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a>
(<?=date('Y-m-d',$bqr[newstime])?>)
</li>
[/e:loop]
</ul>
2、帝國cms靈動標簽怎麼調用某一子欄目
[e:loop={'select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=1 and showclass=0 order by myorder,classid desc',0,24,0}]
<li><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_blank"><?=$bqr[classname]?></a></li>
[/e:loop]
可以實現帝國CMS用靈動標簽來實現任意頁面調用指定欄目下的所有子欄目。
這段JS是用以實現當前欄目高亮的樣式區分,如不需要當前子欄目高亮,可刪除這段JS代碼。
3、帝國cms 首頁分頁問題?首頁調用靈動標簽後,增加自定義列表,生成到網站根目錄 但首頁也不分頁啊?
自定義列表,生成到根目錄
4、帝國cms靈動標簽每次循環css不同怎麼實現
通常通過值傳遞的實際參數, 只能用作函數的輸入參數。
如果需要函數輸出一個參數, 唯一的辦法就是傳遞一個「指針值」 —— 依然是傳值——該值保存了另一個對象(變數?)的地址。
然後通過指針(保存的地址)去修改那個對象, 達到「輸出」的目的。
舉例: 一個老掉牙的例子 ……
void swap(int p1 /*input*/, int p2 /*input*/) {
int t = p1;
p1 = p2;
p2 = p1;
}
void f() {
int a1 = 1212, a2 = 326;
swap(a1, a2);
assert( a1 == 1212 && a2 == 326);
/* 不會因為plus中對形式參數的修改,導致實際參數的變化
它們依然是原來的值
*/
}
5、這種布局,用帝國cms靈動標簽要怎麼循環?
循環的時候用$bqno判斷一下循環的是第幾條,然後
[e:loop={1,3,0,0,'','newstime DESC'}]
<?php
if($bqno==2){
echo '特殊樣式';
}else{
echo '一般樣式';
}
?>
[/e:loop]
6、帝國CMS靈動標簽
這個不是帝國cms的問題,是css的問題,你寫一個css控制下就 ok了
<body>7、如何靈動標簽實現循環子欄目信息 帝國cms
比如欄目下有動作片,喜劇片,愛情片,且需循環以下代碼,顯示結果見附件
<div class="AntVideoMain mb5px">
<div class="Left">
<div class="AntCom" style="height:210px;">
<h2><em class="Vod2"></em><a href="" target="_blank">更多>></a>動作片</h2>
<div class="AntNewVideo">
<ul>
[e:loop={0,5,3,1}]
<li>
<div class="Img">
<a href="<?=$bqsr[titleurl]?>"
target="_blank"><img src="<?=$bqr[titlepic]?>" width="120"
height="90" /></a>
</div>
<div class="Ti"><a href="<?=$bqsr[titleurl]?>"
target="_blank"><?=$bqr[title]?></a></div>
<div><em
class="pl"><?=$bqr[onclick]?></em><em
class="co"><?=$bqr[plnum]?></em></div>
</li>[/e:loop]
</ul>
</div>
</div>
</div>
<div class="Right">
<div class="AntCom" style="height:210px;">
<h2><em class="Vod1"></em><a href="" target="_blank">更多>></a>動作片排行</h2>
<div class="AntRankingVideo">
<div class="AntVideoList">
<ul>
[e:loop={0,1,3,1}]<li class="Current">
<div class="in"><a href="<?=$bqsr[titleurl]?>"
target="_blank"><?=$bqr[title]?></a><em>播放:&
lt;?=$bqr[onclick]?></em><em>評論:<?=$bqr[plnum]?>&
lt;/em></div>
<div class="upimg"><a
href="<?=$bqsr[titleurl]?>" target="_blank"><img
src="<?=$bqr[titlepic]?>" width="130" height="100"
/></a></div>
</li>[/e:loop]
[e:loop={0,4,3,1}]<li class="de" style="line-height:22px; height:22px;">
<div class="in"><a
href="<?=$bqsr[titleurl]?>"
target="_blank"><?=$bqr[title]?></a><em>播放:&
lt;?=$bqr[onclick]?></em><em>評論:<?=$bqr[plnum]?>&
lt;/em>
</div>[/e:loop]
</li>
</ul>
</div>
</div>
</div>
</div>
8、圖片+標題+摘要 帝國cms靈動標簽怎麼調?
用e:loop 調用
[e:loop={17,1,0,1}]9、帝國CMS靈動標簽調用指定欄目的問題
使用靈動標簽首先要在系統參數設置---信息設置---模板支持程序代碼(開啟)
靈動標簽 (e:loop)的格式:
[e:loop={欄目ID/專題ID,顯示條數,操作類型,只顯示有標題圖片,附加SQL條件,顯示排序}]模板代碼內容[/e:loop]
實例3:如果信息帶有圖片信息,則標題上帶有圖片標志
[e:loop=
{'selfinfo',20,0,0}]<?$newimg="";if(!empty($bqr[titlepic]))
{ $newimg="<img src='http://bbs.zhnews.net/bbs/static/image
/filetype/image_s.gif' />";}?><tr class="even"><
td class="title"><h1><a href="<?=$bqsr[titleurl]?&
gt;" target="_blank"><?=sub($bqr[title],0,24,false)?></a&
gt;<?=$newimg?></h1><p class="intro">&
lt;?=$bqr[smalltext]?>[<a title="閱讀全文" href="&
lt;?=$bqsr[titleurl]?>" target="_blank">詳細內容</a>]</p>&
lt;/td><td><?=$bqr[myarea]?></td><td><?=date('Y-m-d H:i:s', $bqr[newstime])?></td></tr>[/e:loop]
10、帝國CMS靈動標簽的原型PHP,有知道的大神給逐行解釋一下嗎
<?php
echo ' web-root = '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo ' current-file = '.__FILE__.'<br>';
echo ' current-dir = '.dirname(__FILE__).'<br>';
echo ' http-root = '.$_SERVER['HTTP_HOST'].'<br>';
echo ' web-position = '.$_SERVER['PHP_SELF'].'<br>';
$file='c:/webroot/index.php';
echo ' file-position = '.$file.'<br>';
$fileWebAddress='http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$_SERVER['HTTP_HOST'],$file);
echo ' file-web-position = '.$fileWebAddress.'<br>';
?>