
此教程需要修改forumdisplay.htm模板
修改模版前的重要教學:
修改模版教程:
forumdisplay.htm 懒人包:
【移动管理checkbox到最左边】
HTML:
<!--{if $forum['ismoderator']}-->
<td class="icon">
<!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}-->
<!--{if $thread['displayorder'] <= 3 || $adminid == 1}-->
<input onclick="tmodclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread[tid]" />
<!--{else}-->
<input class="checkbox" type="checkbox" disabled="disabled" />
<!--{/if}-->
<!--{else}-->
<input class="checkbox" type="checkbox" disabled="disabled" />
<!--{/if}-->
</td>
<!--{/if}-->
移到
HTML:
<tbody id="$thread[id]">
<tr>
的下面
【帖子图标移到帖子标题左边】
HTML:
<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>
<!--{elseif in_array($thread['displayorder'], array(1, 2, 3, 4))}-->
<img src="{IMGDIR}/pin_$thread[displayorder].gif" alt="$threadsticky[3-$thread[displayorder]]" /></a>
<!--{else}-->
<img src="{IMGDIR}/folder_$thread[folder].gif" /></a>
<!--{/if}-->
和
HTML:
<!--{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}-->
移到
HTML:
<th class="subject $thread[folder]">
下面
【加头像】
HTML:
<td class="folder">
(第三个,后面空白那个)在下面加上
HTML:
<img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small" width="45px" height="45px" style="float:left;" />
【标题下添加帖子信息】
HTML:
<span class="threadpages">$thread[multipage]</span>
<!--{/if}-->
下面加
HTML:
<br/><span style="color: #999;">楼主:
<!--{if $thread['authorid'] && $thread['author']}-->
<a style="color: #999;" href="space.php?uid=$thread[authorid]">$thread[author]</a>
<!--{else}-->
<!--{if $forum['ismoderator']}-->
<a style="color: #999;" href="space.php?uid=$thread[authorid]">{lang anonymous}</a>
<!--{else}-->
{lang anonymous}
<!--{/if}-->
<!--{/if}--> <span style="margin: 0 10px 0 5px;">$thread[dateline]</span> 最后回复:<!--{if $thread['lastposter']}--><a style="color: #999;" 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}--> <span style="margin: 0 10px 0 5px;">$thread[lastpost]</span> </span>
【右侧浏览数和回复数】
HTML:
<td class="lastpost">
<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>
<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>
换成
HTML:
<td class="lastpost">
<span style="float: right;display: block;background: #f4f4f4;width: 54px;height: 36px;padding: 4px 0;margin: 0 0 0 10px;border-radius: 3px;overflow: hidden;line-height: 18px;text-align: center;color: #999;"><em style="font-size: 12px;display: block;font-weight: 700;text-align: center;padding-left: 0;color: #999;">$thread[views]</em>浏览</span>
<span style="display: block;background: #f4f4f4;width: 54px;height: 36px;padding: 4px 0;margin: 0 0 0 10px;border-radius: 3px;overflow: hidden;line-height: 18px;text-align: center;color: #999;"><em style="font-size: 12px;display: block;font-weight: 700;text-align: center;padding-left: 0;color: #999;">$thread[replies]</em>回复</span>
</td>
【最新发表 & 最后回复】
HTML:
<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>
变成
HTML:
<td class="lastpost" style="width: 125px;text-align: center;"><a href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=dateline$typeadd$sortadd" class="order {if $orderby == 'dateline'}order_active{/if}">最新发表</a>
<a style="10px!important" href="forumdisplay.php?fid={$fid}&filter=$filter&orderby=lastpost$typeadd$sortadd" class="order {if $orderby == 'lastpost'}order_active{/if}">最后回复</a> </td>
【删掉多余的两栏】
CSS:
<style>
.author, .nums, icon {display: none;}
.datatable .subject {padding: 13px 0px;}
.datalist th, .datalist td {border: none; border-bottom: 1px dashed #dcdcdc;}
.colplural th, .colplural td {border: none;}
</style>
丢进第三方
轉載至