[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]
” target=”_blank”>=$bqr[title]?>
(=date(‘Y-m-d’,$bqr[newstime])?>)
[/e:loop]
标签说明:灵动标签是无需做标签模板,且模板内容为PHP代码,因而更灵活,可以使用php所有处理函数。使用本标签,需开启模板支持程序代码(参数设置)。
参数:
栏目ID/专题ID:查看栏目ID点这里,查看专题ID点这里,当前ID=’selfinfo’,多个栏目ID与专题ID可用,号格开,如’1,2’。
显示条数:显示前几条记录。
操作类型:具体看操作类型说明。
只显示有标题图片:0为不限制,1为只显示有标题图片的信息。
附加SQL条件:附加调用条件,如:”title=’帝国'”。
显示排序:可指定按相应的字段排序,如:”id desc”。
变量说明:
$bqr:$bqr[字段名]:显示字段的内容
$bqsr:$bqsr[titleurl]:标题链接,$bqsr[classname]:栏目名称,$bqsr[classurl]:栏目链接
$bqno:$bqno:为调用序号
$public_r:$public_r[newsurl]:网站地址
常用函数介绍:
文字截取:esub(字符串,截取长度),例子:esub($bqr[title],30)截取标题前30个字符。
时间格式:date(‘格式字串’,时间字段),例子:date(‘Y-m-d’,$bqr[newstime])时间显示格式为”2008-10-01″。
[php]
[e:loop={2,7,0,1,”,’newstime DESC’}]
//print_r($bqr);
?>
[/e:loop]
$bqr 数组键值对
Array
(
[0] => 78
[id] => 78
[1] => 37
[classid] => 37
[2] => 0
[ttid] => 0
[3] => 29
[onclick] => 29
[4] => 0
[plnum] => 0
[5] => 0
[totaldown] => 0
[6] => 2012-12-10
[newspath] => 2012-12-10
[7] => 78
[filename] => 78
[8] => 1
[userid] => 1
[9] => admin
[username] => admin
[10] => 0
[firsttitle] => 0
[11] => 1
[isgood] => 1
[12] => 1
[ispic] => 1
[13] => 0
[istop] => 0
[14] => 0
[isqf] => 0
[15] => 0
[ismember] => 0
[16] => 0
[isurl] => 0
[17] => 1355124518
[truetime] => 1355124518
[18] => 1488849597
[lastdotime] => 1488849597
[19] => 1
[havehtml] => 1
[20] => 0
[groupid] => 0
[21] => 0
[userfen] => 0
[22] =>
[titlefont] =>
[23] => /news/sports/2012-12-10/78.html
[titleurl] => /news/sports/2012-12-10/78.html
[24] => 1
[stb] => 1
[25] => 1
[fstb] => 1
[26] => 1
[restb] => 1
[27] =>
[keyboard] =>
[28] => 中国男乒第16次捧起斯韦思林杯
[title] => 中国男乒第16次捧起斯韦思林杯
[29] =>
[ftitle] =>
[30] => 1355124518
[newstime] => 1355124518
[31] => http://img1.qq.com/sports/pics/8865/8865651.jpg
[titlepic] => http://img1.qq.com/sports/pics/8865/8865651.jpg
[32] => 第49届世乒赛男团决赛的争夺,中国队最终凭借马琳、王皓和王励勤三员虎将的出色发挥以3比0干净利落的击败韩国队,延续了世乒赛上逢韩必胜的历史,历史上第16次捧起斯韦思林杯!
[smalltext] => 第49届世乒赛男团决赛的争夺,中国队最终凭借马琳、王皓和王励勤三员虎将的出色发挥以3比0干净利落的击败韩国队,延续了世乒赛上逢韩必胜的历史,历史上第16次捧起斯韦思林杯!
[33] => 0
[diggtop] => 0
)
$bqsr 数组键值对
Array
(
[titleurl] => /news/sports/2012-12-10/77.html
[classname] => 体育
[classurl] => /news/sports/
)
[/php]