Manyou诚邀开发者加盟 | 常见问题
《站长》俱乐部官方群公布 城市联络员机会多多
立即免费下载 Discuz!7.0.0 正式版
安装升级指南 | 用户手册 | 新手建站学堂
基于.net架构的Discuz!NT2.6正式版发布
Comsenz公司2009年招贤纳士,期待您的加盟
Discuz!收费服务内容及价格
7月重庆、成都、西安三地社区运营实战特训速报名
Discuz!/UCHome 专用官方虚拟主机
牧场新服一起联运:豆浆机免费带回家
基于Discuz!的免费论坛空间5D6D
康盛创想《站长》俱乐部18城市互动之旅报名ing
返回列表 回复 发帖

首页 美化 显示最后主题/回复 For 5.0RC+4.1

========================================================
||HACK:首页显示最后主题+美化 For 5.0+4.1 [5.0已成功测试]
||作者: 折翼の天使♂
||性质: 人性化
||安装: 易
||修改文件(建议先备份):templates/default/index.htm  include/forum.func.php templates/default/forumdisplay_subforum.h
||演示:  http://www.rplive.cn/index.php
||演示:  http://www.rplive.cn/forum-41-1.html
||更多HACK请见:http://www.rplive.cn
========================================================



=========================================
注:首页改过的..已有相关说明....


①index.htm[5.0 找 discuz.htm]模板,查找:
  1.                         <!--{if is_array($forum['lastpost'])}-->
  2.                                 <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  3.                                 <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $forum[lastpost][subject]" nowrap>
  4.                                 $forum[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></td>
  5.                                 <td nowrap> <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
  6.                                 </tr></table></td>
  7.                         <!--{else}-->
复制代码
替换成:
  1. <!--{if is_array($forum['lastpost'])}--><td class="altbg2" height="52"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" class="smalltxt" title="发布时间: $forum[lastpost][dateline]{LF}完整标题: $forum[lastpost][subject]" nowrap><span style=\"altbg2\"><fieldset style=\"margin: 2em; margin-top: 3px; padding: 10px; border: ".INNERBORDERWIDTH."px solid ".BORDERCOLOR."; word-break: break-all\" align=\"center\"><legend><span class=\"smalltxt\"><strong></strong></span></legend></span><br>┌标题: <a title="发布时间: $forum[lastpost][dateline]{LF}完整标题: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][subjectsc]</a><br>├时间: <a title="发布时间: $forum[lastpost][dateline]{LF}完整标题: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a><br>└作者: <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></fieldset></td></tr></table></td><!--{else}-->
复制代码
注:首页改过的..跳过...②...
②查找:
  1.                 <td width="5%"> </td>
  2.                 <td width="51%">{lang forum_name}</td>
  3.                 <td width="5%">{lang forum_threads}</td>
  4.                 <td width="5%">{lang forum_posts}</td>
  5.                 <td width="5%">{lang forum_todayposts}</td>
  6.                 <td width="13%">{lang forum_lastpost}</td>
  7.                 <td width="16%">{lang forum_moderators}</td>
复制代码
替换成:
  1.                 <td width="5%"> </td>
  2.                 <td width="48%">{lang forum_name}</td>
  3.                 <td width="5%">{lang forum_threads}</td>
  4.                 <td width="5%">{lang forum_posts}</td>
  5.                 <td width="5%">{lang forum_todayposts}</td>
  6.                 <td width="16%">{lang forum_lastpost}</td>
  7.                 <td width="16%">{lang forum_moderators}</td>
复制代码
这个可以根据你自己的情况修改。

③include/forum.func.php,查找:
  1.                 $lastpost['dateline'] = gmdate("$dateformat $timeformat", $lastpost['dateline'] + $timeoffset * 3600);
复制代码
下面添加:
  1.                 $lastpost['subjectsc'] = cutstr($lastpost['subject'], 23);
复制代码
以上23数值是标题的长度。

============================

以下是子版的修改

============================

编辑模板 - forumdisplay_subforum.htm
查找
  1. <!--{if is_array($sub['lastpost'])}-->
  2.                                 <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  3.                                 <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $sub[lastpost][subject]" nowrap>
  4.                                 $sub[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></td>
  5.                                 <td nowrap> <a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
  6.                                 </tr></table></td>
  7.                         <!--{else}-->
复制代码
替换成
  1. <!--{if is_array($sub['lastpost'])}--><td class="altbg2" height="52"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" class="smalltxt" title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" nowrap><span style=\"altbg2\"><fieldset style=\"margin: 2em; margin-top: 3px; padding: 10px; border: ".INNERBORDERWIDTH."px solid ".BORDERCOLOR."; word-break: break-all\" align=\"center\"><legend><span class=\"smalltxt\"><strong></strong></span></legend></span><br>┌标题: <a title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][subjectsc]</a><br>├时间: <a title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][dateline]</a><br>└作者: <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></fieldset></td></tr></table></td><!--{else}-->
复制代码
找到
  1. <td width="5%"> </td>
  2.                 <td width="51%">{lang forum_name}</td>
  3.                 <td width="5%">{lang forum_threads}</td>
  4.                 <td width="5%">{lang forum_posts}</td>
  5.                 <td width="5%">{lang forum_todayposts}</td>
  6.                 <td width="13%">{lang forum_lastpost}</td>
  7.                 <td width="16%">{lang forum_moderators}</td>
复制代码
替换成
  1. <td width="5%"> </td>
  2.                 <td width="48%">{lang forum_name}</td>
  3.                 <td width="5%">{lang forum_threads}</td>
  4.                 <td width="5%">{lang forum_posts}</td>
  5.                 <td width="5%">{lang forum_todayposts}</td>
  6.                 <td width="16%">{lang forum_lastpost}</td>
  7.                 <td width="16%">{lang forum_moderators}</td>
复制代码
===============================================================
  1. <!--{if is_array($sub['lastpost'])}-->
  2.                                 <td class="altbg2"><table cellpadding="0" cellspacing="0" border="0" width="100%">
  3.                                 <tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $sub[lastpost][subject]" nowrap>
  4.                                 $sub[lastpost][dateline]<br>{lang forum_lastpost_by} <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></td>
  5.                                 <td nowrap> <a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
  6.                                 </tr></table></td>
  7.                         <!--{else}-->
复制代码
替换成
  1. <!--{if is_array($sub['lastpost'])}--><td class="altbg2" height="52"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" class="smalltxt" title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" nowrap><span style=\"altbg2\"><fieldset style=\"margin: 2em; margin-top: 3px; padding: 10px; border: ".INNERBORDERWIDTH."px solid ".BORDERCOLOR."; word-break: break-all\" align=\"center\"><legend><span class=\"smalltxt\"><strong></strong></span></legend></span><br>┌标题: <a title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][subjectsc]</a><br>├时间: <a title="发布时间: $sub[lastpost][dateline]{LF}完整标题: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][dateline]</a><br>└作者: <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></fieldset></td></tr></table></td><!--{else}-->
复制代码
=========================================


注:要去掉...边框的..打开 index.htm

  1. <span style=\"altbg2\"><fieldset style=\"margin: 2em; margin-top: 3px; padding: 10px; border: ".INNERBORDERWIDTH."px solid ".BORDERCOLOR."; word-break: break-all\" align=\"center\"><legend><span class=\"smalltxt\"><strong></strong></span></legend></span><br>
复制代码
  1. <!--{/if}--></fieldset></td></tr>
复制代码
替换成
  1. <!--{/if}--></td></tr>
复制代码
演示图...稍候送上....

[ 本帖最后由 折翼の天使♂ 于 2007-3-12 07:35 编辑 ]
演示图:

[ 本帖最后由 折翼の天使♂ 于 2006-8-8 08:07 编辑 ]
ys.GIF
留用./..
不错,挺好看的
用的。。顶下!!
感谢大大分享...送你IP一个..
楼主5.0的ndex.htm是空白的啊,怎么改?
原帖由 squaly 于 2006-8-8 09:10 发表
楼主5.0的ndex.htm是空白的啊,怎么改?
找..discuz.htm
谢谢了
改一下4.1的吧,5.0还没准备装
返回列表