原帖由 goldenfaith 于 2007-4-10 02:57 发表
SS我没用过,你把这个页面的模板文件贴一下
- <?exit?>
- {template news_header}
- <!--{if !empty($_SCONFIG['listadcenter'])}-->
- <div class="content" style="background: none; margin-bottom: 0.5em;">
- $_SCONFIG[listadcenter]
- </div>
- <!--{/if}-->
- <!-- Content内容 -->
- <div class="contentR">
- <div class="sideR">
- <!--{if $thecat['thumb'] || $thecat['note']}-->
- <div class="catepic sideblock">
- <!--{if $thecat['thumb']}-->
- <div><img src="{A_URL}/$thecat[thumb]" alt="" /></div>
- <!--{/if}-->
- <!--{if $thecat['note']}-->
- <p>$thecat[note]</p>
- <!--{/if}-->
- </div>
- <!--{/if}-->
-
- <!--子分类-->
- <!--{block name="category" parameter="upid/$thecat[catid]/ischannel/2/order/c.displayorder/limit/0,100/cachetime/10900/cachename/subarr/tpl/data"}-->
- <!--{if $_SBLOCK['subarr']}-->
- <div class="sideblock">
- <h3>分类</h3>
- <ul class="msgtitlelist">
- <!--{loop $_SBLOCK['subarr'] $value}-->
- <li><a href="$value[url]" target="_self">$value[name]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- <!--{/if}-->
-
- <!--专题列表-->
- <!--{block name="category" parameter="upid/$thecat[catid]/ischannel/1/showattach/1/order/c.displayorder/limit/0,100/cachetime/16400/cachename/channel/tpl/data"}-->
- <!--{if $_SBLOCK['channel']}-->
- <div class="sideblock">
- <h3>专题</h3>
- <ul class="imglogolist">
- <!--{loop $_SBLOCK['channel'] $value}-->
- <li>
- <a href="#action/category/catid/$value[catid]#" target="_self"><img src="$value[thumb]" alt="" /></a>
- <p><a href="#action/category/catid/$value[catid]#" target="_self">$value[name]</a></p>
- </li>
- <!--{/loop}-->
- </ul>
- </div>
- <!--{/if}-->
-
- <!--月度关注热点-->
- <!--{block name="spacenews" parameter="dateline/2592000/catid/$thecat[subcatid]/order/i.viewnum DESC/limit/0,15/cachetime/17200/cachename/hotnews/tpl/data"}-->
- <!--{if $_SBLOCK['hotnews']}-->
- <div class="sideblock">
- <h3>月度关注热点</h3>
- <dl>
- <!--{loop $_SBLOCK['hotnews'] $value}-->
- <dt><a href="$value[url]">$value[subject]</a></dt>
- <dd><a href="#uid/$value[uid]/action/space#">$value[username]</a> / <a href="$value[url]">点击($value[viewnum])</a></dd>
- <!--{/loop}-->
- </dl>
- </div>
- <!--{/if}-->
-
- </div>
- <div class="mainarea">
- <!--根分类最新日志列表-->
- <!--{if $_SGET['page']<2 || empty($_SGET['mode'])}-->
- <!--{block name="spacenews" parameter="perpage/40/catid/$thecat[subcatid]/order/i.dateline DESC/cachename/newlist/tpl/data"}-->
- <!--{if $_SBLOCK['newlist']}-->
- <div class="category">
- <h3><strong>$thecat[name]</strong></h3>
- <ul class="msgtitlelist">
- <!--{loop $_SBLOCK['newlist'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
-
- <div class="pages">
- <!--{if $_SBLOCK[newlist_multipage]}-->
- $_SBLOCK[newlist_multipage]
- <!--{else}-->
- <table summary="" class="xspace-page"><tr><td class="xspace-totlerecord">当前只有一页</td></tr></table>
- <!--{/if}-->
- </div>
-
- </div>
- <!--{/if}-->
- <!--{/if}-->
- <!--论坛资源列表-->
- <!--{if !empty($thecat['bbsmodel'])}-->
- <!--{if $_SGET['page']<2 || !empty($_SGET['mode'])}-->
- <!--{eval $_SGET['mode']='bbs';}-->
- <!--{block name="bbsthread" parameter="perpage/40/$thecat[blockparameter]/cachename/bbsthreadlist/tpl/data"}-->
- <!--{if $_SBLOCK['bbsthreadlist']}-->
- <div class="category">
- <h3><strong>论坛资源</strong></h3>
- <ul class="msgtitlelist">
- <!--{loop $_SBLOCK['bbsthreadlist'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
-
- <div class="pages">
- <!--{if $_SBLOCK[bbsthreadlist_multipage]}-->
- $_SBLOCK[bbsthreadlist_multipage]
- <!--{else}-->
- <table summary="" class="xspace-page"><tr><td class="xspace-totlerecord">当前只有一页</td></tr></table>
- <!--{/if}-->
- </div>
- </div>
- <!--{/if}-->
- <!--{/if}-->
- <!--{/if}-->
- <!--{if $_SGET['page']<2}-->
- <!--{loop $_SBLOCK['subarr'] $ckey $cat}-->
- <!--{eval $ctime=1800+30*$ckey;}-->
- <!--{block name="spacenews" parameter="catid/$cat[subcatid]/order/i.dateline DESC/limit/0,10/cachetime/$ctime/cachename/subnewlist/tpl/data"}-->
- <!--{if $_SBLOCK['subnewlist']}-->
- <div class="category">
- <h3>
- <strong><a href="#action/category/catid/$cat[catid]#" target="_self">$cat[name]</a></strong>
- <a href="#action/category/catid/$cat[catid]#" class="more" target="_self">更多</a>
- </h3>
- <ul class="msgtitlelist">
- <!--{loop $_SBLOCK['subnewlist'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{/if}-->
- </div>
- </div>
- <!-- /Content -->
- <!--{if !empty($_SCONFIG['listadfloating']) || !empty($_SCONFIG['listadside'])}-->
- <script type="text/javascript" src="{S_URL}/include/js/floatadv.js"></script>
- <script type="text/javascript">
- <!--{if !empty($_SCONFIG['listadfloating'])}-->
- var lengthobj = getWindowSize();
- lsfloatdiv('floatAdv', 0, 0, "<div style="position: absolute; right: 6px; bottom: -"+lengthobj.winHeight+"px;"><!--{eval echo jsstrip($_SCONFIG['listadfloating']);}--></div>").floatIt();
- <!--{/if}-->
- <!--{if !empty($_SCONFIG['listadside'])}-->
- lsfloatdiv('coupleBannerAdv', 0, 0, "<div style="position: absolute; left: 6px; top: 6px;"><!--{eval echo jsstrip($_SCONFIG['listadside']);}--><br><img src="{S_URL}/images/system/advclose.gif" onMouseOver="this.style.cursor='hand'" onClick="closeBanner('coupleBannerAdv');"></div><div style="position: absolute; right: 6px; top: 6px;"><!--{eval echo jsstrip($_SCONFIG['listadside']);}--><br><img src="{S_URL}/images/system/advclose.gif" onMouseOver="this.style.cursor='hand'" onClick="closeBanner('coupleBannerAdv');"></div>").floatIt();
- <!--{/if}-->
- </script>
- <!--{/if}-->
- {template news_footer}
复制代码
这个是资讯分类的模板news_category.html.php代码,分类演示:http://www.aiyifu.com/html/74/category_catid_74.html 这个是我的网站资讯版块下的一个分类。资讯版块首页的头条就是抓取有图片附件新闻的例子。这个地方的默认设置就是如果有图片的话则以一定的方式显示图片和标题以及内容,如果没有图片则只显示标题和内容。这个模块的代码如下:
- <!--审核等级5的资讯-->
- <!--{block name="spacenews" parameter="grade/5/showattach/1/showdetail/1/order/i.dateline DESC/limit/0,1/subjectlen/34/subjectdot/1/messagelen/80/messagedot/1/cachetime/18600/cachename/headnews/tpl/data"}-->
- <!--{if !empty($_SBLOCK['headnews'])}-->
- <!--{loop $_SBLOCK['headnews'] $value}-->
- <div id="headline" class="cleanblock">
- <!--{if !empty($value['a_thumbpath'])}--><a href="$value[url]"><img src="$value[a_thumbpath]" alt="" /></a><!--{/if}-->
- <strong><a href="$value[url]">$value[subject]</a></strong>
- <p>$value[message]</p>
- </div>
- <!--{/loop}-->
- <!--{else}-->
- <div id="headline" class="cleanblock">
- <strong>最新头条阅读</strong>
- <p>该区域显示的资讯需要满足的条件为:<br><u>资讯的审核等级为5</u></p>
- </div>
- <!--{/if}-->
复制代码 |