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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

横版显示版块简介、版主、主题数、新帖,版块字体大小

[复制链接]
庄一 发表于 2011-8-24 21:12:14 | 显示全部楼层 |阅读模式
本帖最后由 庄一 于 2011-8-24 21:30 编辑

我想其他跟我一样不懂技术的朋友肯定也有这样的苦恼,想自己修改一下模板代码要摸索半天。

所以今天我就把这个修改方法分享下,
演示站点:http://www.ndmmw.com

主要要修改的是 template/default/forum/ discuz.htm ,这个文件
1.版块字体:
搜索:
  1. $forum[name]</a>
复制代码
替换为
  1. <font style= "font-size : 14.6px">$forum[name]</font></a>
复制代码
这里的14.6px可以更改为你觉得更合适的大小



2.横版显示版块简介、版主、主题数、新帖
搜索
  1. <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: $forum[threads]</em>, <em>{lang forum_posts}: $forum[posts]</em></dd><!--{/if}-->
  2.                                                                         <dd>
  3.                                                                         <!--{if $forum['permission'] == 1}-->
  4.                                                                                 {lang private_forum}
  5.                                                                         <!--{else}-->
  6.                                                                                 <!--{if $forum['redirect']}-->
  7.                                                                                         <a href="$forumurl" class="km2338">{lang url_link}</a>
  8.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  9.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  10.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="km9885"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  11.                                                                                         <!--{else}-->
  12.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
  13.                                                                                         <!--{/if}-->
  14.                                                                                 <!--{else}-->
  15.                                                                                         {lang never}
复制代码
替换
  1. <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: $forum[threads]</em>, <em>{lang forum_posts}: $forum[posts]</em></dd><!--{/if}-->
  2.                                                                         <!--{if empty($forum[redirect])}--><dd><em>$forum[description]</em></dd><!--{/if}-->
  3.                                     <!--{if empty($forum[redirect])}--><dd><em>{lang forum_moderators}: $forum[moderators]</em></dd><!--{/if}-->
  4.                                                                         <dd>
  5.                                                                         <!--{if $forum['permission'] == 1}-->
  6.                                                                                 {lang private_forum}
  7.                                                                         <!--{else}-->新帖:
  8.                                                                                 <!--{if $forum['redirect']}-->
  9.                                                                                         <a href="$forumurl" class="km2338">{lang url_link}</a>
  10.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  11.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  12.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="km9885"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
  13.                                                                                         <!--{else}-->
  14.                                                                                                 <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
  15.                                                                                         <!--{/if}-->
  16.                                                                                 <!--{else}-->
  17.                                                                                         {lang never}
复制代码



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
轩辕战刀 发表于 2011-8-24 21:51:56 | 显示全部楼层
这个才是好贴,事半功倍。
回复

使用道具 举报

素材屋 发表于 2011-8-24 21:59:11 | 显示全部楼层
{:soso_e182:}
回复

使用道具 举报

滨州圈 发表于 2011-8-24 22:57:53 | 显示全部楼层
滨州圈论坛  表示感谢!!!
回复

使用道具 举报

lxp922 发表于 2011-8-25 18:39:52 | 显示全部楼层

好贴 楼主好人啊,感谢分享。
回复

使用道具 举报

ivwtak 发表于 2011-9-23 14:28:42 | 显示全部楼层
请问一下我只要简介的话怎么改代码啊?   主题: , 帖数: 新帖这些都不要
回复

使用道具 举报

 楼主| 庄一 发表于 2011-10-1 16:47:12 | 显示全部楼层
素材屋 发表于 2011-8-24 21:59

{:soso_e100:}谢谢
回复

使用道具 举报

 楼主| 庄一 发表于 2011-10-1 16:47:36 | 显示全部楼层
ivwtak 发表于 2011-9-23 14:28
请问一下我只要简介的话怎么改代码啊?   主题: , 帖数: 新帖这些都不要

看代码修改,把不需要的去掉
回复

使用道具 举报

ivwtak 发表于 2011-10-5 11:09:13 | 显示全部楼层
庄一 发表于 2011-10-1 16:47
看代码修改,把不需要的去掉

我都改错了好几次了,不知道楼主能不能发出来一下呢!只要显示简介就可以了
回复

使用道具 举报

雨墨 发表于 2011-10-10 21:18:12 | 显示全部楼层
dsicuz.htm有好多个地方有 $forum[name]</a>,能具体描述一下吗、
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 17:31 , Processed in 0.418892 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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