模板修正:有朋友使用该风格在首页显示标题.一旦标题太长会影响首页的美观.使得版面错位.
现在提供修正方案..
找到 include/forum.func.php
- $forum['icon'] = "<a href="forumdisplay.php?fid=$forum[fid]"><img src="$forum[icon]" align="right" alt="" border="0" /></a>";
- }
- }
-
复制代码
到
-
- if($lastpost['tid']) {
- $lastpost['dateline'] = gmdate("$dateformat $timeformat", $lastpost['dateline'] + $timeoffset * 3600);
- if($lastpost['author']) {
-
复制代码
之间添加 或者覆盖
-
- $lastpost = array('tid' => 0, 'dateline' => 0, 'subject' => '', 'author' => '');
- list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = is_array($forum['lastpost']) ? $forum['lastpost'] : explode("\t", $forum['lastpost']);
- //首页显示最后发表标题
- $lastpost['subject1'] = cutstr($lastpost['subject'], 20, $dot = ' ...');
- //首页显示最后发表标题
- $forum['folder'] = '<img src="'.IMGDIR.'/'.((isset($_DCOOKIE['fid'.$forum['fid']]) && $_DCOOKIE['fid'.$forum['fid']] > $lastvisit ? $_DCOOKIE['fid'.$forum['fid']] : $lastvisit) < $lastpost['dateline'] ? 'red_' : '').'forum.gif" alt="" />';
-
复制代码
在提供的风格包中 templates/phpwind/discuz.htm
找到
-
- <!--{if is_array($forum['lastpost'])}-->
- <td align="center" style="border-right:1px solid {INNERBORDERCOLOR}" 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][subject]</a></span><br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author'] $forum[lastpost][dateline]<!--{else}-->{lang anonymous}<!--{/if}-->
- </td>
- <!--{else}-->
-
-
-
复制代码
修改为
-
-
- <!--{if is_array($forum['lastpost'])}-->
- <td align="center" style="border-right:1px solid {INNERBORDERCOLOR}" title="{lang forum_lastpost_in}: {$forum[lastpost][subject1]}" nowrap>
- <span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][subject1]</a></span><br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author'] $forum[lastpost][dateline]<!--{else}-->{lang anonymous}<!--{/if}-->
- </td>
- <!--{else}-->
-
复制代码
OK!
因为上传有点问题.还是建议大家手动修改......
标题过长后自动用 省略代替
演示
本风格是在https://discuz.dismall.com/viewthread.php?tid=606931&highlight=%B7%C2phpwind前提下再次转发修改版本.
主要修改原因是:上述版本完全是默认风格整包发布,其实 PW 和 DZ 风格有很多近似处.这里我选择套用默认风格的其他文件仅仅保留做为风格的 css.htm discuz.htm footer.htm header.htm discuz.htm forumdisplay.htm
这样一来风格包就清爽多了.
演示地址:http://www.vipic.com.cn/
下载了要回复哦,顶一下哦.
因为机器有点问题,劳请楚大哥带为发布,在此感谢万分.多谢!!!
[ 本帖最后由 vipic.com.cn 于 2007-6-10 10:56 编辑 ] |