Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[模型] supesite资讯首页模板函数说明

[复制链接]
chaoboke 发表于 2011-12-28 22:28:24 | 显示全部楼层 |阅读模式

昨天分享了supesite首页模板标签调用,今天分享一下资讯页面的模板函数

页面顶部广告:
<!–{if empty($thecat['catid']) && empty($itemid)}–>
<!–{eval $ads = getad(‘system’, ‘news’, ’1′);}–>
<!–{if !empty($ads['pageheadad'])}–>
<div class=”banner”>$ads[pageheadad]</div>
<!–{/if}–>
<!–{elseif !empty($itemid)}–>
<!–{eval $ads3 = getad(‘system’, ‘news’, ’3′);}–>
<!–{if !empty($ads3['pageheadad'])}–>
<div class=”banner”>$ads3[pageheadad]</div>
<!–{/if}–>
<!–{else}–>
<!–{eval $ads2 = getad(‘system’, ‘news’, ’2′);}–>
<!–{if !empty($ads2['pageheadad'])}–>
<div class=”banner”>$ads2[pageheadad]</div>
<!–{/if}–>
<!–{/if}–>

资讯根分类导航菜单:
<!–{block name=”category” parameter=”type/news/isroot/1/order/c.displayorder/limit/0,100/cachetime/10800/cachename/category/tpl/data”}–>

循环显示资讯根分类导航菜单:
<!–{loop $_SBLOCK['category'] $value}–> <li><a href=”$value[url]“>$value[name]</a></li> <!–{/loop}–>

您的位置:
<a href=”{S_URL}/”>$_SCONFIG[sitename]</a> <!–{loop $guidearr $value}–> &gt;&gt; <a href=”$value[url]“>$value[name]</a><!–{/loop}–>

页面中央横幅广告:
<!–{if !empty($ads['pagecenterad'])}–><div class=”banner”> $ads[pagecenterad] </div><!–{/if}–>

用户控制面板:
<script src=”{S_URL}/batch.panel.php?rand={eval echo rand(1, 999999)}” type=”text/javascript” language=”javascript”></script>

一周评论热点:
<!–{block name=”spacenews” parameter=”dateline/604800/order/i.replynum DESC/limit/0,13/subjectlen/28/cachetime/68000/cachename/replyhot/tpl/data”}–>

循环一周评论热点:
<!–{loop $_SBLOCK['replyhot'] $value}–><li><a href=”$value[url]“>$value[subject]</a></li><!–{/loop}–>

图文资讯幻灯片:
<!–{block name=”spacenews” parameter=”haveattach/1/showattach/1/order/i.dateline DESC/limit/0,4/cachetime/11930/cachename/picnews/tpl/data”}–>

一周好评榜:
<!–{block name=”spacenews” parameter=”dateline/604800/order/i.goodrate DESC/limit/0,7/subjectlen/30/subjectdot/1/cachetime/18000/cachename/goodrateweek/tpl/data”}–>

循环一周好评榜:
<!–{loop $_SBLOCK['goodrateweek'] $value}–><li><a href=”$value[url]“>$value[subject]</a></li><!–{/loop}–>

一周点击排行头条:
<!–{block name=”spacenews” parameter=”dateline/604800/showattach/1/showdetail/1/order/i.viewnum DESC/limit/0,1/subjectlen/34/subjectdot/1/messagelen/80/messagedot/1/cachetime/18600/cachename/headnews/tpl/data”}–>

站内最新资讯列表:
<!–{block name=”spacenews” parameter=”order/i.dateline DESC/limit/0,15/subjectlen/38/cachetime/13800/cachename/newnews/tpl/data”}–>

循环站内最新资讯列表:
<!–{loop $_SBLOCK['newnews'] $value}–><li><cite>#date(“m-d”, $value["dateline"])# </cite><a href=”$value[url]“>$value[subject]</a></li><!–{/loop}–>

图片资讯显示:
<!–{block name=”spacenews” parameter=”haveattach/1/showattach/1/order/i.lastpost DESC/subjectlen/12/subjectdot/1/limit/0,6/cachetime/8000/cachename/picnews/tpl/data”}–>

循环显示图片资讯:
<!–{loop $_SBLOCK['picnews'] $value}–><li class=”list1line”><div><a href=”$value[url]” target=”_blank”><img src=”$value[a_thumbpath]” alt=”$value[subjectall]” /></a></div><p><a href=”$value[url]” target=”_blank” title=”$value[subjectall]“>$value[subject]</a></p></li><!–{/loop}–>

最热资讯TAG列表:
<!–{block name=”tag” parameter=”order/spacenewsnum DESC/limit/0,18/cachetime/18000/cachename/hottag/tpl/data”}–>

循环热门tag:
<!–{loop $_SBLOCK['hottag'] $value}–><a href=”$value[url]“>$value[tagname]<em>($value[spacenewsnum])</em></a><!–{/loop}–>

站内热门资讯列表(一周):
<!–{block name=”spacenews” parameter=”dateline/604800/order/i.viewnum DESC/limit/0,18/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data”}–>

循环站内热门资讯列表(一周):
<!–{loop $_SBLOCK['hotnews1'] $value}–><li><cite>#date(“m-d”, $value["dateline"])# </cite><a href=”$value[url]“>$value[subject]</a> <span class=”smalltxt”>($value[viewnum])</span></li><!–{/loop}–>

站内热门资讯列表(一月):
<!–{block name=”spacenews” parameter=”dateline/2592000/order/i.viewnum DESC/limit/0,18/cachetime/97200/subjectlen/40/subjectdot/1/cachename/hotnews2/tpl/data”}–>

循环站内热门资讯列表(一月):
<!–{loop $_SBLOCK['hotnews2'] $value}–><li><cite>#date(“m-d”, $value["dateline"])# </cite><a href=”$value[url]“>$value[subject]</a> <span class=”smalltxt”>($value[viewnum])</span></li><!–{/loop}–>

站内热门资讯列表(全部):
<!–{block name=”spacenews” parameter=”order/i.viewnum DESC/limit/0,18/cachetime/99400/subjectlen/40/subjectdot/1/cachename/hotnews3/tpl/data”}–>

循环站内热门资讯列表(循环):
<!–{loop $_SBLOCK['hotnews3'] $value}–><li><cite>#date(“m-d”, $value["dateline"])# </cite><a href=”$value[url]“>$value[subject]</a> <span class=”smalltxt”>($value[viewnum])</span></li><!–{/loop}–>

最新评论资讯:
<!–{block name=”spacenews” parameter=”order/i.lastpost DESC/limit/0,10/cachetime/7500/cachename/newnews/tpl/data”}–>

循环最新评论资讯:
<!–{loop $_SBLOCK['newnews'] $value}–><dt><a href=”$value[url]“>$value[subject]</a></dt><!–{/loop}–>

月度评论热点:
<!–{block name=”spacenews” parameter=”lastpost/2592000/order/i.replynum DESC/limit/0,10/cachetime/75400/subjectlen/40/subjectdot/1/cachename/replyhot/tpl/data”}–>

循环月度评论热点:
<!–{loop $_SBLOCK['replyhot'] $value}–><dt><a href=”$value[url]“>$value[subject]</a></dt><!–{/loop}–>

各分类最新资讯列表:
<!–{loop $_SBLOCK['category'] $ckey $cat}–>
<!–{eval $ctime=1800+30*$ckey;}–>
<!–{block name=”spacenews” parameter=”catid/$cat[subcatid]/order/i.dateline DESC/limit/0,10/cachetime/$ctime/subjectlen/40/cachename/newslist/tpl/data”}–><div class=”blockcategory”><h3><strong><a href=”#action/category/catid/$cat[catid]#”>$cat[name]</a></strong><a href=”#action/category/catid/$cat[catid]#” class=”more”>更多</a></h3><ul class=”msgtitlelist”><!–{loop $_SBLOCK['newslist'] $value}–><li><cite>#date(“m-d”, $value["dateline"])# </cite><a href=”$value[url]“>$value[subject]</a></li><!–{/loop}–></ul></div>
<!–{/loop}–>

页面对联广告和页面漂浮广告:
<!–{if !empty($ads['pagemovead']) || !empty($ads['pageoutad'])}–>
<!–{if !empty($ads['pagemovead'])}–>
<div id=”coupleBannerAdv” style=”z-index: 10; position: absolute; width:100px;left:10px;top:10px;display:none”><div style=”position: absolute; left: 6px; top: 6px;”>$ads[pagemovead]<br /><img src=”{S_URL}/images/base/advclose.gif” onMouseOver=”this.style.cursor=’hand’” onClick=”closeBanner(‘coupleBannerAdv’);”></div><div style=”position: absolute; right: 6px; top: 6px;”>$ads[pagemovead]<br /><img src=”{S_URL}/images/base/advclose.gif” onMouseOver=”this.style.cursor=’hand’” onClick=”closeBanner(‘coupleBannerAdv’);”></div></div>
<!–{/if}–>
<!–{if !empty($ads['pageoutad'])}–>
<div id=”floatAdv” style=”z-index: 10; position: absolute; width:100px;left:10px;top:10px;display:none”><div id=”floatFloor” style=”position: absolute; right: 6px; bottom:-700px”>$ads[pageoutad]</div></div>
<!–{/if}–>
<script type=”text/javascript” src=”{S_URL}/include/js/floatadv.js”></script>
<script type=”text/javascript”>
<!–{if !empty($ads['pageoutad'])}–>
var lengthobj = getWindowSize();
lsfloatdiv(‘floatAdv’, 0, 0, ‘floatFloor’ , -lengthobj.winHeight).floatIt();
<!–{/if}–>
<!–{if !empty($ads['pagemovead'])}–>
lsfloatdiv(‘coupleBannerAdv’, 0, 0, ”, 0).floatIt();
<!–{/if}–>
</script>
<!–{/if}–>

页面底部广告:
<!–{if empty($thecat['catid']) && empty($itemid)}–>
<!–{if !empty($ads['pagefootad'])}–>
<div class=”banner”>$ads[pagefootad]</div>
<!–{/if}–>
<!–{elseif !empty($itemid)}–>
<!–{if !empty($ads3['pagefootad'])}–>
<div class=”banner”>$ads3[pagefootad]</div>
<!–{/if}–>
<!–{else}–>
<!–{if !empty($ads2['pagefootad'])}–>
<div class=”banner”>$ads2[pagefootad]</div>
<!–{/if}–>
<!–{/if}–>


jkak 发表于 2011-12-30 13:26:44 | 显示全部楼层

回帖奖励 +1 枚金币

:o:o
回复

使用道具 举报

路边找虫 发表于 2012-1-11 17:21:50 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-12-26 00:56 , Processed in 0.024375 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表