模块:QGMOD_MSGLIST
参数:
$cateid:支持只调用一个分类ID号,支持调用多个分类ID号(调用多个分类ID号要求用英文逗号隔开),支持调用article,picture,download,product四个模块的参数。
$length:标题长度限制
$orderby:排序,支持 news,hot,cold,vouch,best 五个基本参数,支持基本的SQL排序参数(不熟悉SQL里的排序参数请不要使用)
$limit:限制条数,默认10
$iscache:是否启用缓存,默认为是
调用的变量:
id:主题ID
subject:主题全部名称
cut_subject:被截断的主题长度
url:主题链接地址
target:是否在新窗口打开(所有外部链接均会在新窗口打开,所有内容链接均在当前面打开)
thumb:缩略图地址
mark:水印图/大图地址(图片、商品、下载等使用)
cateid:主题对应的分类ID
catename:主题对应的分类名称
hits:点击率
standard:规格(商品使用)
number:编号(商品使用)
m_price:市场价格(商品使用)
s_price:商城价格(商品使用)
clou:描述说明
promotions:促销说明(商品使用)
softlang:软件语言(下载使用)
softlicense:授权方式(同上)
softsize:文件大小(同上)
softsystem:系统平台(同上)
softadmin:软件开发人员(同上)
softemail:软件开发人员的联系邮箱(同上)
softother:其他说明(同上)
更多调用代码请参考数据表结构说明
示例一:
- <div class="global_sub"><div class="incbg">最新资讯</div></div>
- <!-- run:$list = QGMOD_MSGLIST("article","30","new","10") -->
- <div class="border_no_top">
- <!-- $list[msglist] AS $key=>$value -->
- <div> <img src="images/lead.gif" border="0" align="absmiddle"> <a href="{:$value[url]}"{:$value[target]}>{:$value[subject]}</a></div>
- <!-- end -->
- </div>
- <!-- run:unset($msglist) -->
示例二:
- <div class="global_sub">最新商品</div>
- <!-- run:$list = QGMOD_MSGLIST("product","30","new","6") -->
- <div class="border_no_top">
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <!-- $list[msglist] AS $key=>$value -->
- <td width="50%">
- <table width="100%">
- <tr>
- <td width="140px" align="center">
- <!-- if($value[thumb] && file_exists($value[thumb])) -->
- <a href="msg.php?id={:$value[id]}" title="{:$value[subject]}"><img src="{:$value[thumb]}" border="0" width="120px" height="120px"></a>
- <!-- else -->
- <a href="msg.php?id={:$value[id]}" title="{:$value[subject]}"><img src="images/nopicture.gif" border="0" width="100px" height="100px" style="border:1px #D2DFE6 solid;"></a>
- <!-- end -->
- </td>
- <td valign="top">
- <div class="wtr">名称:<a href="msg.php?id={:$value[id]}" title="{:$value[subject]}" style="{:$value[style]}">{:$value[cut_subject]}</a> <a href="msg.php?id={:$value[id]}"><img src="images/product_msg.gif" border="0" align="absmiddle"></a></div>
- <div class="dtr">分类:<a href="list.php?id={:$value[cateid]}" title="{:$value[catename]}">{:$value[catename]}</a></div>
- <div class="wtr">
- <table width="100%">
- <tr>
- <td width="50%">规格:{:$value[standard]}</td>
- <td>编号:{:$value[number]}</td>
- </tr>
- </table>
- </div>
- <div class="dtr">
- <table width="100%">
- <tr>
- <td>市场价:<span style="text-decoration:line-through;">{:$value[m_price]}</span> 元</td>
- <td>商城价:<span style="color:red;font-size:16px;font-weight:bold;">{:$value[s_price]}</span> 元</td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- <div class="wtr" style="border-bottom:0px;"><div style="border:1px dashed #C5D4DB;padding:1px 3px;margin:3px;">{:$value[clou]}<!-- if($value[promotions]) --><br /> <span style="color:red;">促销:</span><span style="color:darkblue;">{:$value[promotions]}</span><!-- end --></div></div>
- </td>
- <!-- row:2 -->
- <!-- end -->
- </tr>
- </table>
- </div>
- <!-- run:unset($list) -->