首页显示最后发表标题、作者、时间 修正美化版 discuz!5.5
插件作用:首页显示每个版块最新回复主题的标题、时间、作者。并完美适用任何风格,不撑开表格,不影响美观。
说 明:插件原创不是我,只是记得以前游人发过,我修改了一下而已!
适用版本:Discuz! 5。5正式版
修改文件:include/forum.func.php、templates/default/discuz.htm模板
安装难易:简
演示:http://www.sczzz.cn/bbs 四川站长站论坛 http://www.sczzz.cn
看了后,请支持一下<四川站长站 http://www.sczzz.cn>,谢谢!
修正了安装后标题和作者一个前一个后(错位)的问题、稍做美化,本论坛修正没有发现其他错误!
提醒:修改前请做好备份!
插件安装开始
一、修改 include/forum.func.php
查找:
list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = is_array($forum['lastpost']) ? $forum['lastpost'] : explode("\t", $forum['lastpost']);
在后添加:
//首页显示最后发表标题BY www.wwwsc.cn
$lastpost['subject1'] = cutstr($lastpost['subject'], 20, $dot = ' ...');
//其中20是主题的字符长度,可自行修改
//首页显示最后发表标题BY www.windowsba.com Windowsba系统吧!
二、修改 风格文件/discuz.htm
查找:
<td align="center" title="{lang forum_lastpost_in}: {$forum[lastpost][subject]}" nowrap>
<span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a></span><br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->
替换为:
//首页显示最后发表标题BY www.kangding.sc.cn康定旅游网
<td align="left" nowrap>{lang forum_lastpost_in}: <span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="{lang forum_lastpost_in}: {$forum[lastpost][subject]}">$forum[lastpost][subject1]</a></span><br>
作者: <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->(<a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a>)<br> //首页显示最后发表标题BY www.wwwsc.cn
几位网友要求横排的代码.我修改如下:
方法是:在
<tr class="smalltxt"><td colspan="3">{lang forum_lastpost}: 后面插入以下代码:
<span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="{lang forum_lastpost_in}: {$forum[lastpost][subject]}">$forum[lastpost][subject1]</a></span><BR>
如果不会,可向本人索取源代码.
[ 本帖最后由 小熊设计屋 于 2007-7-18 21:23 编辑 ] |