QQ咨询 官方微信

添加微信好友

官方小程序

百度小程序

微信小程序

头条小程序

关于我们

其他cms

Discuz 7.2 主题列表页模板(Forumdisplay.htm)修改教程

 admin  2013-07-25 13:57:00

1. 释版风格文件请勿直接用到站点中 因为注释已经把文件加大了
如果用在站点模版中 会造成不必要的拖速 注释文件仅供本地学习与参考!
2. 您或多或少需要对基本的HTML代码有所认识 不然这个注释版可能对您没有帮助。
3. 文件内因为注释很多 如果使用一般的记事本打开阅读的话 会很难阅读
建议使用一些代码编辑器打开阅读 因为只有代码编辑器 才会对注释部分作出高亮
我个人推荐EditPlus 或者更高阶的Dreamweaver 这样能更好的阅读里头的注释。
4. 欢迎转载本帖内容和附件到任何网站
5. 本帖仅供发布 请不要在这里咨询如何修改 自己研究 自己动手 丰衣足食!

文件说明
Forumdisplay.htm为Discuz!程序的主题列表页模板文件
文件路径:Discuz目录/templates/default下


复制代码代码如下:
<!--**********************Forumdisplay.htm模板注释开始*********************************-->
<!--*载入头部模板 header.htm*-->
{subtemplate header}
<!--*判断如果当前用户为本版版主或者超版以上 载入moderate.js.{$jspath}:后台>全局>优化设置>服务器优化>JavaScript脚本目录*-->
<!--{if $forum['ismoderator']}-->
<script type="text/javascript" src="{$jspath}moderate.js?{VERHASH}"></script>
<!--{/if}-->
<!--*页面导航 例:Discuz! 论坛官方 》 首页*-->
<div id="nav"><a id="fjump" href="$indexname"
<!--*判断当前如果开启了论坛跳转菜单 鼠标移到站点名称上时 弹出菜单*-->
{if $forumjump == 1} class="dropmenu" onmouseo/ target=_blank class=infotextkey>seover="showMenu({'ctrlid':this.id})"{/if}>$bbname</a> $navigation</div>
<!--*页内文字广告位*-->
<!--{if $admode && !empty($advlist['text'])}-->
<div id="ad_text" class="ad_text" >
<table summary="Text Ad" cellpadding="0" cellspacing="0">$advlist[text]</table>
</div>
<!--{else}-->
<div id="ad_text"></div>
<!--{/if}-->
<!--*判断边栏是否开启,class="wrap s_clear"为关闭边栏样式,class="wrap with_side s_clear"为开启边栏样式*-->
<div id="wrap"{if $infosidestatus['allow'] < 2} class="wrap s_clear"{else} class="wrap with_side s_clear"{/if}>
<!--*这里是边栏开关按钮,$infosidestatus[allow] == 2为关闭边栏按钮,$infosidestatus[allow] == 1为开启边栏按钮.*-->
<!--{if $infosidestatus[allow] == 2}-->
<a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['{lang sidebar_collapsed_yes}', '{lang sidebar_collapsed_no}']);" class="$collapseimg[sidebar]"><!--{if $collapseimg[sidebar] == 'collapsed_yes'}-->{lang sidebar_collapsed_yes}<!--{else}-->{lang sidebar_collapsed_no}<!--{/if}--></a>
<!--{elseif $infosidestatus[allow] == 1}-->
<a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['', '{lang sidebar_collapsed_no}']);" class="collapsed_yes">{lang sidebar_collapsed_yes}</a>
<!--{/if}-->
<!--*主体部分开始*-->
<div class="main">
<div class="content">
<!--*Discuz插件钩子 详见相关插件开发手册*-->
$pluginhooks[forumdisplay_header]
<div id="forumheader" class="s_clear">
<!--*本版版块名字*-->
<h1>$forum[name]</h1>
<!--*本版资讯 $forum[threads]:主题数,{echo $forum[posts]-$forum[posts]}本版回复数}*-->
<p class="forumstats">[ <strong>$forum[threads]</strong> {lang thread} / {echo $forum[posts]-$forum[threads]} {lang reply} ]</p>
<div class="forumaction">
<div class="right">
$pluginhooks[forumdisplay_forumaction]
<!--*判断当前浏览者是否已登录*-->
<!--{if $discuz_uid}-->
<!--*关注*-->
<a href="my.php?item=attention&type=forum&action=add&fid=$fid" id="ajax_attention" class="attention" onclick="ajaxmenu(this);doane(event);">{lang attention_forum}</a>
<!--*收藏*-->
<a href="my.php?item=favorites&fid=$fid" id="ajax_favorite" onclick="ajaxmenu(this);doane(event);">{lang thread_favorite}</a>
<!--{/if}-->
<!--*如果开启了RSS功能 显示RSS订阅链接*-->
<!--{if $rssstatus}--><a href="rss.php?fid=$fid&auth=$rssauth" target="_blank" class="feed">RSS</a><!--{/if}-->
</div>
<!--*如果本版开启了回收站 就显示回收站链接.(这部分有个bug 少了一个判断 这里应该只有管理组可见才对 普通会员点了都是无权访问的)*-->
<!--{if $forum['recyclebin']}-->
<a href="
<!--*如果当前用户的管理组为管理员 进入的是系统设置里的回收站*-->
{if $adminid == 1}admincp.php?action=recyclebin&frames=yes
<!--*如果当前用户为本版版主或超级版主 进入的则是版主管理中的回收站*-->
{elseif $forum['ismoderator']}modcp.php?action=recyclebins&fid=$fid{/if}" class="recyclebin" target="_blank">{lang forum_recyclebin}</a>
<!--{/if}-->
</div>
<!--*判断本版是否设置了版块简介 存在则显示*-->
<!--{if $forum[description]}--><p class="channelinfo">{lang forum_description}: $forum[description]</p><!--{/if}-->
<p id="modedby">
<!--*判断当前用户如果为本版版主或超级版主 显示下面的链接*-->
<!--{if $forum['ismoderator']}-->
<div class="modlink">
<!--*Discuz插件钩子 详见相关插件开发手册*-->
$pluginhooks[forumdisplay_modlink]
<!--*如果当前本版有用户报告 则提示报告数量*-->
<!--{if $forum['modworks']}-->
<a href="modcp.php?action=report&fid=$fid" target="_blank">{lang mod_works_existence}</a> |
<!--{/if}-->
<!--*版主管理链接*-->
<a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a>
</div>
<!--{/if}-->
<!--*本版版主*-->
{lang forum_modedby}:
<!--*判断本版版主 $moderatedby:本版版主用户名,如果本版无版主 则显示**空缺中***-->
<!--{if $moderatedby}-->$moderatedby<!--{else}-->{lang forum_opening}<!--{/if}-->
</p>
</div>
<!--*Discuz插件钩子 详见相关插件开发手册*-->
$pluginhooks[forumdisplay_top]
<!--*判断本版是否有推荐主题或版规*-->
<!--{if $forum['recommendlist'] || $forum['rules']}-->
<div id="modarea" class="s_clear">
<div class="list">
<!--*收起/展开的按钮*-->
<span class="headactions"><img onclick="toggle_collapse('modarea_c');" alt="{lang spread}" title="{lang spread}" src="{IMGDIR}/$collapseimg[modarea_c].gif" id="modarea_c_img" class="toggle" /></span>
<h3>
<!--*如果存在推荐主题 则显示"推荐主题字样"*-->
<!--{if $forum['recommendlist']}-->
<a href="javascript:;" id="tab_1" class="current"
<!--*如果同时存在版块规则 则加入切换按钮*-->
{if $forum['rules']} onclick="switchTab('tab', 1, 2)"{/if}>{lang forum_recommend}</a>
<!--*如果当前用户为本版版主或者超级版主以上 则显示编辑推荐主题链接*-->
<!--{if $forum['ismoderator']}--><a href="modcp.php?action=forums&op=recommend&show=all&fid=$fid" target="_blank">[{lang edit}]</a><!--{/if}-->
<!--{/if}-->
<!--*如果同时存在推荐主题 则显示一个间隔符*-->
<!--{if $forum['recommendlist'] && $forum['rules']}--><span class="pipe">|</span><!--{/if}-->
<!--*如果现在正在查看的是版块规则 版块规则字样粗体显示*-->
<!--{if $forum['rules']}--><a href="javascript:;" id="tab_2"{if !$forum['recommendlist']} class="current"{/if}
<!--*如果同时存在推荐主题 则加入切换按钮*-->
{if $forum['recommendlist']} onclick="switchTab('tab', 2, 2)"{/if}>{lang forum_rules}</a><!--{/if}-->
</h3>
</div>
<div id="modarea_c" style="$collapse[modarea_c]">
<!--*如果存在推荐主题 载入推荐主题模板 recommend.htm*-->
<!--{if $forum['recommendlist']}-->
<div id="tab_c_1">
{subtemplate recommend}
</div>
<!--{/if}-->
<!--*如果存在版块规则 显示之.$forum[rules]:版规内容*-->
<!--{if $forum['rules']}-->
<div id="tab_c_2"{if $forum['recommendlist']} style="display:none"{/if} class="rule">$forum[rules]</div>
<!--{/if}-->
</div>
</div>
<!--{/if}-->
<!--*判断如果本版存在子版块 载入主题列表页面子版块模板 forumdisplay_subforum.htm*-->
<!--{if $subexists}-->
<div id="subforum" class="mainbox list">{template forumdisplay_subforum}</div>
<!--{/if}-->
$pluginhooks[forumdisplay_middle]
<div class="pages_btns s_clear">
<!--*页数*-->
$multipage
<span
<!--*判断如果启用了显示最近版块访问数量 当鼠标移到返回首页的时候 弹出最近访问版块菜单*-->
<!--{if $visitedforums}-->id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id})"<!--{/if}--> class="pageback"><a href="$indexname">{lang return_index}</a></span>
<!--*发新帖按钮*-->
<span class="postbtn" id="newspecial" prompt="post_newthread" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"><a href="post.php?action=newthread&fid=$fid" onclick="showWindow('newthread', this.href);return false;">{lang send_posts}</a></span>
</div>
<!--*判断如果本版启用了主题分类并且允许按类别浏览 或者 启用了分类信息并且允许按类别浏览*-->
<!--{if $forum['threadtypes'] && $forum['threadtypes']['listable'] || $forum['threadsorts'] && $forum['threadsorts']['listable']}-->
<div class="threadtype">
<!--*主题分类*-->
<!--{if $forum['threadtypes'] && $forum['threadtypes']['listable']}-->
<p>
<!--*当前如果已选中分类浏览 "全部"字样则为超链接并粗体*-->
<!--{if $typeid || $sortid}--><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a><!--{else}--><strong>{lang forum_viewall}</strong><!--{/if}-->
<!--*这里是平板样式的分类列表 如果已选中 此分类名则粗体显示*-->
<!--{loop $forum['threadtypes']['flat'] $id $name}--><!--{if $typeid != $id}--><a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id$sortadd">$name</a><!--{else}--><strong>$name</strong><!--{/if}--> <!--{/loop}-->
<!--*下拉菜单式的分类列表 其他地方和平板样式略同 不重复解释*-->
<!--{if $forum['threadtypes']['selectbox']}-->
<span id="threadtypesmenu" class="dropmenu" onmouseover="showMenu({'ctrlid':this.id})">{lang admin_type_more}</span>
<div class="popupmenu_popup headermenu_popup" id="threadtypesmenu_menu" style="display: none">
<ul>
<!--{loop $forum['threadtypes']['selectbox'] $id $name}-->
<li>
<!--{if $typeid != $id}-->
<a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id$sortadd">$name</a>
<!--{else}-->
<strong>$name</strong>
<!--{/if}-->
</li>
<!--{/loop}-->
</ul>
</div>
<!--{/if}-->
</p>
<!--{/if}-->
<!--*这里是分类信息 下面部分和主题分类部分一样 不重复解释*-->
<!--{if $forum['threadsorts'] && $forum['threadsorts']['listable']}-->
<p>
<!--{if !$forum['threadtypes']['listable']}--><!--{if $sortid}--><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a><!--{else}--><strong>{lang forum_viewall}</strong><!--{/if}--><!--{/if}-->
<!--{loop $forum['threadsorts']['flat'] $id $name}--><!--{if $sortid != $id}--><a href="forumdisplay.php?fid=$fid&filter=sort&sortid=$id$typeadd">$name</a><!--{else}--><strong>$name</strong><!--{/if}--> <!--{/loop}-->
<!--{if $forum['threadsorts']['selectbox']}-->
<span id="threadsortsmenu" class="dropmenu" onmouseover="showMenu({'ctrlid':this.id})">{lang admin_type_more}</span>
<div class="popupmenu_popup headermenu_popup" id="threadsortsmenu_menu" style="display: none">
<ul>
<!--{loop $forum['threadsorts']['selectbox'] $id $name}-->
<li>
<!--{if $sortid != $id}-->
<a href="forumdisplay.php?fid=$fid&filter=sort&sortid=$id$typeadd">$name</a>
<!--{else}-->
<strong>$name</strong>
<!--{/if}-->
</li>
<!--{/loop}-->
</ul>
</div>
<!--{/if}-->
</p>
<!--{/if}-->
</div>
<!--{/if}-->
<!--*主题列表部分*-->
<div id="threadlist" class="threadlist datalist" style="position: relative;">
<!--*管理操作提交*-->
<form method="post" name="moderate" id="moderate" action="topicadmin.php?action=moderate&fid=$fid&infloat=yes&nopost=yes">
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="listextra" value="$extra" />
<table summary="forum_$fid" {if !$separatepos}id="forum_$fid"{/if} cellspacing="0" cellpadding="0" class="datatable">
<thead class="colplural">
<tr>
<!--*主题类型选择菜单*-->
<td colspan="2"> <a href="javascript:;" id="filtertype" class="dropmenu" onclick="showMenu({'ctrlid':this.id});">
<!--*投票贴*-->
<!--{if $filter == poll}-->{lang thread_poll}
<!--*交易帖*-->
<!--{elseif $filter == trade}-->{lang thread_trade}
<!--*活动贴*-->
<!--{elseif $filter == activity}-->{lang thread_activity}
<!--*辩论帖*-->
<!--{elseif $filter == debate}-->{lang thread_debate}
<!--*悬赏帖*-->
<!--{elseif $filter == reward}-->{lang thread_reward}
<!--*这个应该是存在特殊主题插件时显示的"其他"*-->
<!--{else}-->{lang type}<!--{/if}--></a></td>
<!--*判断当前用户如果为本版版主/超级版主以上 这里多一个表格给主题管理选定*-->
<!--{if $forum['ismoderator']}--><td class="icon"> </td><!--{/if}-->
<!--*这里开始为主题过滤索引(不懂怎么解释它 暂时这么命名吧 呵呵)*-->
<th>
<ul class="itemfilter s_clear">
<!--*主题*-->
<li>{lang thread}:</li>
<!--*这里做一个说明 class="current"这个类的用途是当选中这个类型后 这个类型的字样背景高亮显示.比如你选中查看本版精华 那么"精华"字样就会有灰色背景.这里做个统一解释 下面不重复 不然更乱*-->
<!--*全部*-->
<li{if !$filter} class="current"{/if}><a href="forumdisplay.php?fid=$fid"><span>{lang all}</span></a></li>
<!--*精华*-->
<li{if $filter == 'digest'} class="current"{/if}><a class="filter" href="forumdisplay.php?fid=$fid&filter=digest"><span>{lang digestposts}</span></a></li>
<!--*判断本版如果存在推荐主题 就加入"推荐"链接*-->
<!--{if $recommendthread[status]}--><li{if $filter == 'recommend'} class="current"{/if}><a class="filter" href="forumdisplay.php?fid={$fid}&filter=recommend&orderby=recommends"><span>{lang order_recommends}</span></a></li><!--{/if}-->
<li class="pipe">|</li>
<!--*按时间查看*-->
<li>{lang dateline_range}:</li>
<!--*一天*-->
<li{if $filter == 86400} class="current"{/if}><a href="forumdisplay.php?fid=$fid&orderby=$orderby&filter=86400$typeadd$sortadd"><span>{lang last_1_days}</span></a></li>
<!--*2天*-->
<li{if $filter == 172800} class="current"{/if}><a href="forumdisplay.php?fid=$fid&orderby=$orderby&filter=172800$typeadd$sortadd"><span>{lang last_2_days}</span></a></li>
<!--*周*-->
<li{if $filter == 604800} class="current"{/if}><a href="forumdisplay.php?fid=$fid&orderby=$orderby&filter=604800$typeadd$sortadd"><span>{lang last_7_days}</span></a></li>
<!--*月*-->
<li{if $filter == 2592000} class="current"{/if}><a href="forumdisplay.php?fid=$fid&orderby=$orderby&filter=2592000$typeadd$sortadd"><span>{lang last_30_days}</span></a></li>
<!--*季*-->
<li{if $filter == 7948800} class="current"{/if}><a href="forumdisplay.php?fid=$fid&orderby=$orderby&filter=7948800$typeadd$sortadd"><span>{lang last_90_days}</span></a></li>
<!--*如果开启了主题热度 加入"热门"链接*-->
<li class="pipe">|</li>
<li><a class="order {if $orderby == 'heats' || $orderby == 'recommends'}order_active{/if}" href="forumdisplay.php?fid={$fid}&filter=$filter&orderby={if $filter == 'recommend'}recommends{else}heats{/if}$typeadd$sortadd">{lang order_heats}</a></li>
</ul>
</th>
<!--*作者/时间字样部分 点击的话 为按发表时间排序本版主题*-->
<td class="author"><a href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=dateline$typeadd$sortadd" class="order {if $orderby == 'dateline'}order_active{/if}">{lang author}/{lang time}</a></td>
<!--*最后回复字样部分 点击的话 为按回复数量排序本版主题*-->
<td class="nums"><a href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=replies$typeadd$sortadd" class="order {if $orderby == 'replies'}order_active{/if}">{lang replies}</a>
<!--*查看字样部分 点击的话 为按浏览次数排序本版主题*-->
<a href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=views$typeadd$sortadd" class="order {if $orderby == 'views'}order_active{/if}">{lang views}</a></td>
<!--*最后回复字样部分 点击的话 按最后回复排序本版主题*-->
<td class="lastpost"><cite><a href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=lastpost$typeadd$sortadd" class="order {if $orderby == 'lastpost'}order_active{/if}">{lang lastpost}</a></cite></td>
</tr>
</thead>
<!--*判断如果当前为本版第一页并且存在公告 就载入公告表格和内容*-->
<!--{if $page == 1 && !empty($announcement)}-->
<tbody>
<tr>
<!--*公告图标*-->
<td class="folder"><img src="{IMGDIR}/ann_icon.gif" alt="{lang announcement}" /></td>
<td class="icon"> </td>
<!--{if $forum['ismoderator']}--><td class="icon"> </td><!--{/if}-->
<!--*公告字样*-->
<th class="subject"><strong>{lang announcement}:
<!--*如果公告类型为文字公告 就链接到announcement.php查看 $announcement[id]:公告编号,$announcement[subject]为公告标题*-->
<!--{if empty($announcement['type'])}--><a href="announcement.php?id=$announcement[id]#$announcement[id]" target="_blank">$announcement[subject]</a>
<!--*公告类型为网址链接*-->
<!--{else}--><a href="$announcement[message]" target="_blank">$announcement[subject]</a><!--{/if}--></strong></th>
<td class="author">
<!--*公告作者*-->
<cite><a href="space.php?uid=$announcement[authorid]">$announcement[author]</a></cite>
<!--*公告发布时间*-->
<em>$announcement[starttime]</em>
</td>
<td class="nums"> </td>
<td class="lastpost"> </td>
</tr>
</tbody>
<!--{/if}-->
<!--*主题列表开始*-->
<!--{if $threadcount}-->
<!--{loop $threadlist $key $thread}-->
<!--{if $separatepos == $key + 1}-->
<tbody>
<tr>
<td class="folder"></td><td> </td>
<!--{if $forum['ismoderator']}--><td> </td><!--{/if}-->
<th class="subject">{lang forum_thread}</th><td> </td><td> </td><td> </td>
</tr>
</tbody>
<!--{/if}-->
<tbody id="$thread[id]">
<tr>
<!--*主题状态图标*-->
<td class="folder">
<!--*如果点击这里的图标 主题链接就在新窗口打开*-->
<a href="viewthread.php?tid=$thread[tid]&extra=$extra" title="{lang target_blank}" target="_blank">
<!--*如果主题已被关闭 显示锁头图标*-->
<!--{if $thread[folder] == 'lock'}-->
<img src="{IMGDIR}/folder_lock.gif" /></a>
<!--*如果为置顶帖 就按置顶等级载入置顶图标 $thread['displayorder']为置顶等级*-->
<!--{elseif in_array($thread['displayorder'], array(1, 2, 3))}-->
<img src="{IMGDIR}/pin_$thread[displayorder].gif" alt="$threadsticky[3-$thread[displayorder]]" /></a>
<!--{else}-->
<!--*新/旧帖图标*-->
<img src="{IMGDIR}/folder_$thread[folder].gif" /></a>
<!--{/if}-->
</td>
<!--*主题图标*-->
<td class="icon">
<!--*如果本帖为投票帖 这里显示投票图标 下面以此类推*-->
<!--{if $thread['special'] == 1}-->
<a href="forumdisplay.php?fid=$fid&filter=poll"><img src="{IMGDIR}/pollsmall.gif" alt="{lang thread_poll}" /></a>
<!--*交易帖*-->
<!--{elseif $thread['special'] == 2}-->
<a href="forumdisplay.php?fid=$fid&filter=trade"><img src="{IMGDIR}/tradesmall.gif" alt="{lang thread_trade}" /></a>
<!--*悬赏帖*-->
<!--{elseif $thread['special'] == 3}-->
<a href="forumdisplay.php?fid=$fid&filter=reward"><img src="{IMGDIR}/rewardsmall.gif" alt="{lang thread_reward}"
<!--*如果悬赏已结束 图标显示暗色*-->
<!--{if $thread['price'] < 0}-->class="solved"<!--{/if}--> /></a>
<!--*活动贴*-->
<!--{elseif $thread['special'] == 4}-->
<a href="forumdisplay.php?fid=$fid&filter=activity"><img src="{IMGDIR}/activitysmall.gif" alt="{lang thread_activity}" /></a>
<!--*辩论帖*-->
<!--{elseif $thread['special'] == 5}-->
<a href="forumdisplay.php?fid=$fid&filter=debate"><img src="{IMGDIR}/debatesmall.gif" alt="{lang thread_debate}" /></a>
<!--{else}-->
<!--*普通主题则显示用户发帖时选择的图标*-->
$thread['icon']
<!--{/if}-->
</td>
<!--*判断当前用户的如果为本版版主或者超级版主以上 则显示主题管理的复选框*-->
<!--{if $forum['ismoderator']}-->
<td class="icon">
<!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}-->
<input onclick="tmodclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread[tid]" />
<!--{else}-->
<input class="checkbox" type="checkbox" disabled="disabled" />
<!--{/if}-->
</td>
<!--{/if}-->
<th class="subject $thread[folder]">
<label>{$pluginhooks[forumdisplay_thread][$key]} </label>
<!--*如果主题被移动并保留转向 显示"移动"字样*-->
<!--{if $thread['moved']}-->
<!--{if $forum['ismoderator']}-->
<a href="topicadmin.php?action=moderate&optgroup=3&operation=delete&tid=$thread[moved]" onclick="showWindow('mods', this.href);return false">{lang thread_moved}:</a>
<!--{else}-->
{lang thread_moved}:
<!--{/if}-->
<!--{/if}-->
<!--*主题分类前缀*-->
$thread[sortid] $thread[typeid]
<span id="thread_$thread[tid]">
<!--*帖子地址.$thread[subject]为主题标题*-->
<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a></span>
<!--*判断本帖是否设置了阅读权限 如果设置了 显示之*-->
<!--{if $thread['readperm']}--> - [{lang readperm} <span class="bold">$thread[readperm]</span>]<!--{/if}-->
<!--{if $thread['price'] > 0}-->
<!--*如果本帖为悬赏帖 则显示悬赏金额数目*-->
<!--{if $thread['special'] == '3'}-->
- <span style="color: #C60">[{lang thread_reward}{$extcredits[$creditstransextra[2]][title]} <span class="bold">$thread[price]</span> {$extcredits[$creditstransextra[2]][unit]}]</span>
<!--*如果本帖有出售内容 则显示出售价格*-->
<!--{else}-->
- [{lang price} {$extcredits[$creditstransextra[1]][title]} <span class="bold">$thread[price]</span> {$extcredits[$creditstransextra[1]][unit]}]
<!--{/if}-->
<!--*如果悬赏帖已解决 则显示"已解决"字样*-->
<!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->
- <span style="color: #269F11">[{lang reward_solved}]</span>
<!--{/if}-->
<!--*如果本帖存在图片附件 则显示图片附件图标*-->
<!--{if $thread['attachment'] == 2}-->
<img src="images/attachicons/image_s.gif" alt="{lang attach_img}" class="attach" />
<!--*如果附件类型为其他 则显示回形针图标*-->
<!--{elseif $thread['attachment'] == 1}-->
<img src="images/attachicons/common.gif" alt="{lang attachment}" class="attach" />
<!--{/if}-->
<!--{if $thread['displayorder'] == 0}-->
<!--*如果本帖为推荐主题 则显示推荐图标*-->
<!--{if $thread[recommendicon]}-->
<img src="{IMGDIR}/recommend_$thread[recommendicon].gif" class="attach" alt="{lang thread_recommend}" title="{lang thread_recommend}" />
<!--{/if}-->
<!--*如果本帖已经达到要求的热点 则显示热点图标*-->
<!--{if $thread[heatlevel]}-->
<img src="{IMGDIR}/hot_$thread[heatlevel].gif" class="attach" alt="$thread[heatlevel] {lang heats}" title="$thread[heatlevel] {lang heats}" />
<!--{/if}-->
<!--*如果本帖为精华帖 则显示精华图标 $thread[digest]为精华等级*-->
<!--{if $thread['digest'] > 0}-->
<img src="{IMGDIR}/digest_$thread[digest].gif" class="attach" alt="{lang thread_digest} $thread[digest]" title="{lang thread_digest} $thread[digest]" />
<!--{/if}-->
<!--*如果本帖被评分 则显示被评分图标*-->
<!--{if $thread['rate'] > 0}-->
<img src="{IMGDIR}/agree.gif" class="attach" alt="{lang rate_credit_add}" title="{lang rate_credit_add}" />
<!--{/if}-->
<!--{/if}-->
<!--*帖子页数*-->
<!--{if $thread[multipage]}-->
<span class="threadpages">$thread[multipage]</span>
<!--{/if}-->
</th>
<!--*帖子作者*-->
<td class="author">
<cite>
<!--*正常状态下 显示作者用户名和个人资料页链接*-->
<!--{if $thread['authorid'] && $thread['author']}-->
<a href="space.php?uid=$thread[authorid]">$thread[author]</a>
<!--{else}-->
<!--*如果用户匿名或开启了游客发帖 则显示为"匿名" 本版版主以上可点击"匿名"字样得知其身份*-->
<!--{if $forum['ismoderator']}-->
<a href="space.php?uid=$thread[authorid]">{lang anonymous}</a>
<!--{else}-->
<!--*如果用户匿名发帖或开启了游客发帖 则显示为匿名*-->
{lang anonymous}
<!--{/if}-->
<!--{/if}-->
</cite>
<!--*帖子发布时间*-->
<em>$thread[dateline]</em>
</td>
<!--*帖子回复次数和浏览次数*-->
<td class="nums"><strong>$thread[replies]</strong>/<em>$thread[views]</em></td>
<!--*最后回复*-->
<td class="lastpost">
<!--*最后回复作者 如果用户匿名发帖则显示匿名 **这里有个判断条件有待确认 $thread[digest] != -2 暂时保留 欢迎指点***-->
<cite><!--{if $thread['lastposter']}--><a href="{if $thread[digest] != -2}space.php?username=$thread[lastposterenc]{else}viewthread.php?tid=$thread[tid]&page={echo max(1, $thread[pages]);}{/if}">$thread[lastposter]</a><!--{else}-->{lang anonymous}<!--{/if}--></cite>
<!--*最后回复时间 **这里有个判断条件有待确认$thread[digest] != -2 暂时保留 欢迎指点***-->
<em><a href="{if $thread[digest] != -2}redirect.php?tid=$thread[tid]&goto=lastpost$highlight#lastpost{else}viewthread.php?tid=$thread[tid]&page={echo max(1, $thread[pages]);}{/if}">$thread[lastpost]</a></em>
</td>
</tr>
</tbody>
<!--{/loop}-->
<!--{else}-->
<!--*如果本版无主题 则显示"本版尚无主题"*-->
<tbody><tr><th colspan="6"><p class="nodata">{lang forum_nothreads}</p></th></tr></tbody>
<!--{/if}-->
</table>
<!--*如果选中主题管理的复选框 载入管理操作模板 topicadmin_modlayer.htm*-->
<!--{if $forum['ismoderator'] && $threadcount}-->
{template topicadmin_modlayer}
<!--{/if}-->
</form>
</div>
<div class="pages_btns s_clear">
<!--*页数*-->
$multipage
<!--*判断如果启用了显示最近版块访问数量 当鼠标移到返回首页的时候 弹出最近访问版块菜单*-->
<span <!--{if $visitedforums}-->id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id})"<!--{/if}--> class="pageback"><a href="$indexname">{lang return_index}</a></span>
<!--*发新帖按钮*-->
<span class="postbtn" id="newspecialtmp" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"><a href="post.php?action=newthread&fid=$fid" onclick="showWindow('newthread', this.href);return false;">{lang send_posts}</a></span>
</div>
<!--*本版在线会员 可以参考discuz.htm注释版中的在线会员列表注释部分 这里不重复了*-->
<!--{if $whosonlinestatus}-->
<dl id="onlinelist">
<!--{if $detailstatus}-->
<dd>
<span class="headactions"><a href="forumdisplay.php?fid=$fid&page=$page&showoldetails=no#online"><img src="{IMGDIR}/collapsed_no.gif" alt="" /></a></span>
<h3>{lang forum_activeusers}</h3>
</dd>
<dd>
<ul class="s_clear">
<!--{loop $whosonline $key $online}-->
<li title="{lang time}: $online[lastactivity]{LF} {lang action}: $online[action]{LF} {lang forum}: $forumname">
<img src="images/common/$online[icon]" alt="" />
<!--{if $online['uid']}-->
<a href="space.php?uid=$online[uid]">$online[username]</a>
<!--{else}-->
$online[username]
<!--{/if}-->
</li>
<!--{/loop}-->
</ul>
</dd>
<!--{else}-->
<dt>
<span class="headactions"><a href="forumdisplay.php?fid=$fid&page=$page&showoldetails=yes#online" class="nobdr"><img src="{IMGDIR}/collapsed_yes.gif" alt="" /></a></span>
<h3>{lang forum_activeusers}</h3>
</dt>
<!--{/if}-->
</dl>
<!--{/if}-->
$pluginhooks[forumdisplay_bottom]
</div>
</div>
<!--*Discuz和qihoo合作的边栏搜索 可以不理会*-->
<!--{if $infosidestatus[allow] == 2}-->
<div id="sidebar" class="side" style="$collapse[sidebar]">
<!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 2)}-->
<div id="qihoosearch" class="sidebox">
<form method="post" action="search.php?srchtype=qihoo" onSubmit="this.target='_blank';">
<input type="hidden" name="searchsubmit" value="yes" />
<input type="text" class="txt" name="srchtxt" size="20" value="$qihoo_searchboxtxt" />
<button type="submit">{lang search}</button>
</form>
</div>
<!--{/if}-->
<!--{if $infosidestatus[0]}-->
<!--{if !empty($qihoo['status']) && ($qihoo['searchbox'] & 2)}-->
<hr class="shadowline"/>
<!--{/if}-->
<!--*边栏*-->
<div id="infoside">
{eval request($infosidestatus, 1, 0);}
</div>
<!--{/if}-->
</div>
<!--{/if}-->
<!--*下面都是发帖类型相关的 不复杂 相关的可以参考上面的主题类型*-->
<!--{if $allowpost && ($allowposttrade || $allowpostpoll || $allowpostreward || $allowpostactivity || $allowpostdebate || $threadplugins || $forum['threadsorts'])}-->
<ul class="popupmenu_popup postmenu" id="newspecial_menu" style="display: none">
<!--{if !$forum['allowspecialonly']}--><li><a href="post.php?action=newthread&fid=$fid" onclick="showWindow('newthread', this.href);doane(event)">{lang post_newthread}</a></li><!--{/if}-->
<!--{if $allowpostpoll}--><li class="poll"><a href="post.php?action=newthread&fid=$fid&special=1">{lang post_newthreadpoll}</a></li><!--{/if}-->
<!--{if $allowpostreward}--><li class="reward"><a href="post.php?action=newthread&fid=$fid&special=3">{lang post_newthreadreward}</a></li><!--{/if}-->
<!--{if $allowpostdebate}--><li class="debate"><a href="post.php?action=newthread&fid=$fid&special=5">{lang post_newthreaddebate}</a></li><!--{/if}-->
<!--{if $allowpostactivity}--><li class="activity"><a href="post.php?action=newthread&fid=$fid&special=4">{lang post_newthreadactivity}</a></li><!--{/if}-->
<!--{if $allowposttrade}--><li class="trade"><a href="post.php?action=newthread&fid=$fid&special=2">{lang post_newthreadtrade}</a></li><!--{/if}-->
<!--{if $threadplugins}-->
<!--{loop $forum['threadplugin'] $tpid}-->
<!--{if array_key_exists($tpid, $threadplugins) && @in_array($tpid, $allowthreadplugin)}-->
<li class="popupmenu_option"{if $threadplugins[$tpid][icon]} style="background-image:url($threadplugins[$tpid][icon])"{/if}><a href="post.php?action=newthread&fid=$fid&specialextra=$tpid">{$threadplugins[$tpid][name]}</a></li>
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->
<!--{if $forum['threadsorts'] && !$forum['allowspecialonly']}-->
<!--{loop $forum['threadsorts']['types'] $id $threadsorts}-->
<!--{if $forum['threadsorts']['show'][$id]}-->
<li class="popupmenu_option"><a href="post.php?action=newthread&fid=$fid&extra=$extra&sortid=$id">$threadsorts</a></li>
<!--{/if}-->
<!--{/loop}-->
<!--{loop $forum['typemodels'] $id $model}-->
<li class="popupmenu_option"><a href="post.php?action=newthread&fid=$fid&extra=$extra&modelid=$id">$model[name]</a></li>
<!--{/loop}-->
<!--{/if}-->
</ul>
<!--{/if}-->
<ul class="popupmenu_popup headermenu_popup filter_popup" id="filtertype_menu" style="display: none;">
<li><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a></li>
<!--{if $showpoll}--><li {if $filter == 'poll'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=poll">{lang thread_poll}</a></li><!--{/if}-->
<!--{if $showtrade}--><li {if $filter == 'trade'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=trade">{lang thread_trade}</a></li><!--{/if}-->
<!--{if $showreward}--><li {if $filter == 'reward'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=reward">{lang thread_reward}</a></li><!--{/if}-->
<!--{if $showactivity}--><li {if $filter == 'activity'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=activity">{lang thread_activity}</a></li><!--{/if}-->
<!--{if $showdebate}--><li {if $filter == 'debate'}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=debate">{lang thread_debate}</a></li><!--{/if}-->
<!--{if $threadplugins}-->
<!--{loop $forum['threadplugin'] $tpid}-->
<!--{if array_key_exists($tpid, $threadplugins) && @in_array($tpid, $allowthreadplugin)}-->
<li {if $filter == 'special' && $extraid == $tpid}class="active"{/if}><a href="forumdisplay.php?fid=$fid&filter=special&extraid=$tpid">{$threadplugins[$tpid][name]}</a></li>
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->
</ul>
<!--*最近访问版块的弹出菜单*-->
<!--{if $visitedforums}-->
<ul class="popupmenu_popup" id="visitedforums_menu" style="display: none">
$visitedforums
</ul>
<!--{/if}-->
<!--*论坛跳转菜单*-->
<!--{if $forumjump}-->
<div class="popupmenu_popup" id="fjump_menu" style="display: none">
$forummenu
</div>
<!--{/if}-->
<!--*如果设置了主题列表最大页数值 当用户要访问的页数超出最大限制的时候 只能跳转到设置的最大值页数上*-->
<!--{if $maxpage > 1}-->
<script type="text/javascript">document.onkeyup = function(e){keyPageScroll(e, {if $page > 1}1{else}0{/if}, {if $page < $maxpage}1{else}0{/if}, 'forumdisplay.php?fid=$fid$forumdisplayadd', $page);}</script>
<!--{/if}-->
<!--*载入尾部模板 footer.htm*-->
{subtemplate footer}
<!--**********************Forumdisplay.htm模板注释结束*********************************-->

 

¥ 打赏
×
如果您觉得文章帮助了您就打赏一下吧
非常感谢你的打赏,我们将继续分享更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏

本文《Discuz 7.2 主题列表页模板(Forumdisplay.htm)修改教程》发布于石头博客文章,作者:admin,如若转载,请注明出处:https://www.pweb123.com/cms/morecms/321.html,否则禁止转载,谢谢配合!

文章点评

我来说两句 已有0条评论
点击图片更换

添加微信好友

添加微信好友

微信小程序

百度小程序