Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

仿PW首页显示最后发表标题、作者、时间 修正美化版 for discuz!5.0

[复制链接]
gtr_0106 发表于 2006-11-21 00:34:34 | 显示全部楼层 |阅读模式
插件作用:完全仿PW在首页显示每个版块最新回复主题的标题、时间、作者。并完美适用任何风格,不撑开表格,不影响美观。
说      明:插件原创不是我,只是记得以前游人发过,我修改了一下而已!
适用版本:Discuz! 5。0正式版
修改文件:include/forum.func.php、templates/default/discuz.htm模板
安装难易:简
演  示:http://www.9icity.net
修正了安装后标题和作者一个前一个后(错位)的问题、稍做美化,本论坛修正没有发现其他错误!
提醒:修改前请做好备份!

插件安装开始
一、修改 include/forum.func.php
查找:
  1. list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = is_array($forum['lastpost']) ? $forum['lastpost'] : explode("\t", $forum['lastpost']);
复制代码


在后添加:
  1.         //首页显示最后发表标题BY 9icity.net
  2.           $lastpost['subject1'] = cutstr($lastpost['subject'], 20, $dot = ' ...');
  3.         //其中20是主题的字符长度,可自行修改
  4.      //首页显示最后发表标题BY 9icity.net
复制代码


二、修改 风格文件/discuz.htm
查找:
  1. <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}
  2. <!--{/if}-->
复制代码


替换为:
  1. <!--首页显示最后发表标题--BY 9icity.net>
  2. <td align="left"  nowrap>
  3. ┌{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>
  4. ├作者: <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--><br>
  5. └时间: <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a>
  6. <!--首页显示最后发表标题--BY 9icity.net>
复制代码

[ 本帖最后由 gtr_0106 于 2006-11-21 01:23 编辑 ]
 楼主| gtr_0106 发表于 2006-11-21 00:34:56 | 显示全部楼层
占位!~~
回复

使用道具 举报

 楼主| gtr_0106 发表于 2006-11-21 01:23:30 | 显示全部楼层
顶上去!~~~
回复

使用道具 举报

H5N1 发表于 2006-11-21 01:33:56 | 显示全部楼层
占满没有?????????????????
回复

使用道具 举报

kvstar 发表于 2006-11-21 09:18:06 | 显示全部楼层
演示签名
回复

使用道具 举报

界加 发表于 2006-11-21 11:01:22 | 显示全部楼层
不错,演示http://www.fyue.net/
回复

使用道具 举报

sysoul 发表于 2006-11-21 16:46:12 | 显示全部楼层
二、修改 风格文件/discuz.htm
查找:

[Copy to clipboard]
CODE:
<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}-->

找不到
回复

使用道具 举报

 楼主| gtr_0106 发表于 2006-11-21 20:28:37 | 显示全部楼层
二、修改 风格文件/discuz.htm
查找:

[Copy to clipboard]
CODE:
<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}-->

找不到

可以查找
  1. <td align="center" title="{lang forum_lastpost_in}:
复制代码

然后在找到
  1. <!--{/if}-->
复制代码

之间的这段代码!!!

[ 本帖最后由 gtr_0106 于 2006-11-21 20:30 编辑 ]
回复

使用道具 举报

120108686 发表于 2006-11-22 02:11:24 | 显示全部楼层
怎么修改
┌标题:
├作者:
└时间:

的颜色?
回复

使用道具 举报

nokiaseries 发表于 2006-11-22 02:15:05 | 显示全部楼层
真的没问题吗。。
之前用一个害到我论坛无法显示。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-17 15:46 , Processed in 0.102703 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表