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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

首页横排美化+最后发表主题(进化)+版主显示依模式不同位置 for Dz6.0 (1/4 更新一樓)

[复制链接]
jillyz 发表于 2007-11-15 22:03:25 | 显示全部楼层 |阅读模式

=============================================
2008/5/8 補充:新版已發布!!

[正宗]横排美化 第四版 (开关控制+整体 )for 6.1, 6.0 [已发布]
https://discuz.dismall.com/thread-920341-1-1.html


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




2008/2/2 補充:
自即日起, 不再回答任何問題了.
若使用上有什麼問題, 請翻帖找答案, 或是自己多試試看.
請勿再傳短消息給我,詢問和本橫排安裝有關的問題囉. 一律不回答.
一個主題維護了兩個多月我想也夠了, 接下來的時間我想自己運用, 不想在花時間在這上面了...
你們遇到的問題也請自己解決囉~~

*****************************************************

鄭重聲明!!!
我極度不歡迎任何形式的轉載,包含你拿我的附件另外發帖(無論是不是在Discuz!發帖)
*再次強調,修改之前,一定要備份你原有的文件!
如果你改過之後,覺得這樣的橫排慢,那就別用了。 用你原先備份的文件覆蓋回去即可。

請勿以任何形式轉載 本內容 或 本下載包
要用的請直接貼個網址, 連過來discuz的這個主題~~~感謝~~~

再次提醒!
子板塊的主題無法調用~~請勿再問囉(因為我也不會改呀)

---------------------------------------------------------------------
名称:首页横排美化+最后发表主题(进化)+版主显示依模式不同位置 for Dz6.0
美化修改作者:jillyz  ( http://www.kimhaneul.net ) <----看最新演示,請到此論壇
发布日期:2007-11-15
参考来源:Maxspeed 5.2 (for Discuz 5.5)
----------------------------------------------------------------------

这次是基于我前两天发的 首页横排美化+ 横排板块显示最后发表主题五笔 for 6.0 (完美修正!!)  的修改
--------------------------------------------------------------------------------------------
2007/11/15 发布。修改:

横排版块(演示1),基于之前的修改:

  • 版块排版再细调
  • 背景图已修改,支持到 7行 ( images/listbg_li.gif )    ( 最新主题设置 超过7行的就请自行修改图啰)
  • 添加 依发布时间排序主题 的连结图   (那颗 notice灯泡图, 可改)
  • 添加 版主显示 (建议用下拉菜单,美观极了)
  • 添加 显示子版块    (之前漏了这, 不好意思)



--------------------------------------------------------------------------------------------

传统模式版块(演示2),修改:

  • 版主显示的位置,依据显示模式(下拉菜单/平面显示)而不同。
  • 小调整,主题帖数的统计。



--------------------------------------------------------------------------------------------
修改方法請看下載包!!!
測試過了, 安裝應該沒問題~~~
有問題的話,請在本主題回覆~~^^
安裝成功的, 也請給個網址吧

================================================================================
修改時請注意

修改 discuz.htm 時, 注意這一段
  1. <thead class="category" align="center">
  2.         <tr>
  3.                 <th>{lang forum_name} / 最新主题</th>
  4.                 <th>{lang forum_name} / 最新主题</th>
  5.                 <th>{lang forum_name} / 最新主题</th>
  6.         </tr>
  7. </thead>
复制代码
其中這一句:
<th>{lang forum_name} / 最新主题</th>
你的橫排一行若設置 N 個版塊,那麼代碼中,這一句就要複製放 N 行。

如果你的論壇不固定一行版塊數,那請拿掉一整段代碼  (<thread>到</thread>)
================================================================================

2008-01-04更新(附件裡頭沒更新哦,請自己修改更新這一段)
刪掉的主題,還會顯示在首頁上,令其不顯示的修改方法:

index.php 已修改後, 在添加的那段
  1. $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' ORDER BY t.dateline DESC LIMIT $v) UNION ";
复制代码
改成下面的: (就是把 AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 插進去)
  1. $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
复制代码
================================================================================
2008/1/1
這個修改, 感謝 落雪★无痕 提出建議

-----------------------
若在高亮标题时会出现“   标题内容">标题内容”  
discuz.htm中
<a href="forumdisplay.php?fid=$forum[fid]" title="$forum[name]">$forum[name]</a>
应该替换为
<a href="forumdisplay.php?fid=$forum[fid]">$forum[name]</a>
================================================================================

其它的修改說明請看3樓,
附件下載包可能就不另外更新其它修改說明了

...

--------------------------------------------------------------------------------

我首頁目前的橫排,
是確定不會發布出來, 也不會告知如何做的... 敬請見諒了. 所以請大家別再繼續問囉
原因請看此(195樓):
https://discuz.dismall.com/viewth ... ;page=13#pid6659509

--------------------------------------------------------------------------------

修改完後,請記得到後台設置橫排,才會有效果。
後台[论坛管理>编辑版块],進入分區板塊的"編輯",設置一行要幾個板塊個數


[ 本帖最后由 jillyz 于 2008-5-8 20:26 编辑 ]

本帖子中包含更多资源

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

x

评分

2

查看全部评分

freeregent 发表于 2007-11-15 22:10:01 | 显示全部楼层
等着看看!
www.intomotor.com
回复

使用道具 举报

 楼主| jillyz 发表于 2007-11-15 22:11:20 | 显示全部楼层
補充(樓主下載包,安裝之後的)其他修改方法:
------------------------------------------------------------------------------
問題[1]
拿掉 最後發表 的方法?
discuz.htm 模板,拿掉這段
  1. <div style="color:{LIGHTTEXT}; overflow: hidden; height:1.5em; width: 100%">
  2.         <!--{if is_array($forum['lastpost'])}-->
  3.                 {lang forum_lastpost}: <a style="color:{LIGHTTEXT}" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="$forum[lastpost][subject]  ($forum[lastpost][dateline])">{echo cutstr($forum[lastpost][subject], 35)}</a>
  4.                 ({lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author'])<!--{else}-->{lang anonymous}<!--{/if}-->
  5.         <!--{else}-->
  6.                 {lang never}
  7.         <!--{/if}-->
  8. </div>
复制代码
------------------------------------------------------------------------------
問題[2]
私密論壇,若設置不隱藏 當無權訪問時, 其橫排的顯示主題標題
演示:

修改 discuz.htm 模板
discuz.htm 模板。最新主題列表,找
  1. <!--{loop ${"new_no".$forum[fid]."_threadlist"} $row}-->
  2.         <div style="overflow: hidden; height:20px; width:100%"><small style="float:right; color:#9C8B88; margin: 0 0 0 5px">$row['date']</small><a href="viewthread.php?tid=$row[tid]" title="$row[subject]" target='_self'>$row[view_subject]</a></div>
  3. <!--{/loop}-->
复制代码
替換為
  1. <!--{loop ${"new_no".$forum[fid]."_threadlist"} $row}-->
  2.         <div style="overflow: hidden; height:20px; width:100%">
  3.         <!--{if $forum['permission'] == 1}-->
  4.         {lang private_forum}, 您目前没有权限可查阅主题及内容
  5.         <!--{else}-->
  6.         <small style="float:right; color:#9C8B88; margin: 0 0 0 5px">$row['date']</small><a href="viewthread.php?tid=$row[tid]" title="$row[subject]" target='_self'>$row[view_subject]</a>
  7.         <!--{/if}-->
  8.         </div>
  9. <!--{/loop}-->
复制代码
discuz.htm 模板。最後發表那裡,找
  1. <!--{if is_array($forum['lastpost'])}-->
  2.         {lang forum_lastpost}: <a style="color:{LIGHTTEXT}" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="$forum[lastpost][subject]  ($forum[lastpost][dateline])">{echo cutstr($forum[lastpost][subject], 35)}</a>
  3.         ({lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author'])<!--{else}-->{lang anonymous}<!--{/if}-->
  4. <!--{else}-->
复制代码
替換為
  1. <!--{if is_array($forum['lastpost'])}-->
  2.         <!--{if $forum['permission'] == 1}-->
  3.         {lang forum_lastpost}: 您目前没有权限可查阅主题及内容
  4.         <!--{else}-->
  5.         {lang forum_lastpost}: <a style="color:{LIGHTTEXT}" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="$forum[lastpost][subject]  ($forum[lastpost][dateline])">{echo cutstr($forum[lastpost][subject], 35)}</a>
  6.         ({lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author'])<!--{else}-->{lang anonymous}<!--{/if}-->
  7.         <!--{/if}-->
  8. <!--{else}-->
复制代码
------------------------------------------------------------------------------
問題[3]
如何将每个版块所显示的:     版主: *** | 主题:317 / 帖数:799 / 今日:0
这段放到  相应版块的论坛名称后面?


後面? 還是下面?
discuz.htm 模板裡,版主,統計 那些的, 是這段
  1. <div style="color:{LIGHTTEXT}; overflow: hidden; height:1.5em; width: 100%">
  2.         <!--{if $forum['moderators']}-->
  3.                 <!--{if $moddisplay == 'flat'}-->
  4.                 <span>{lang forum_moderators}: $forum[moderators]</span>
  5.                 <!--{else}-->
  6.                 <span class="dropmenu" id="mod$forum[fid]" onmouseover="showMenu(this.id)">{lang forum_moderators}</span>
  7.                 <ul class="moderators popupmenu_popup" id="mod$forum[fid]_menu" style="display: none; width: 80px;">$forum[moderators]</ul>
  8.                 <!--{/if}-->
  9.         <!--{else}-->
  10.                 <span style="color:{LIGHTTEXT}">无版主</span>
  11.         <!--{/if}-->
  12.          |
  13.         {lang forum_threads}:{if $forum['redirect']}--{else}$forum[threads]{/if} /
  14.         {lang forum_posts}:{if $forum['redirect']}--{else}$forum[posts]{/if} /
  15.         <!--{if $forum[todayposts] && !$forum['redirect']}--><em style="color:{HIGHLIGHTLINK}">{lang index_today}:$forum[todayposts]</em><!--{else}-->{lang index_today}:0<!--{/if}-->
  16. </div>
复制代码
這是論壇名稱和 依發布時間排序主題icon+ink
  1. <div style="overflow: hidden; width:100%; display:block">      
  2.         <div style="float:left; height: 20px; width:90%; overflow:hidden;">
  3.                 <h2 style="margin: 0 0 3px 0; "><a href="forumdisplay.php?fid=$forum[fid]" title="$forum[name]">$forum[name]</a></h2>
  4.         </div>
  5.         <div style="float:right;">
  6.                 <a href="forumdisplay.php?fid=$forum[fid]&filter=0&orderby=dateline&ascdesc=DESC" title="依发布时间排序主题"><img src="images/common/notice.gif"></a>
  7.         </div>
  8. </div>
复制代码
請自行移動修改囉

------------------------------------------------------------------------------
問題[4]
修改 版主  下拉菜單的寬度
discuz.htm
搜尋(有兩處)
class="moderators popupmenu_popup"
會找到類似這樣的代碼
<ul class="moderators popupmenu_popup" id="mod$forum[fid]_menu" style="display: none; width: 80px">$forum[moderators]</ul>
width: 80px  自行修改寬度

------------------------------------------------------------------------------
問題[5]
版塊,當有論壇圖標時顯示最新發布主題的列表;無圖標時不顯示最新主題列表。
演示:

改法,discuz.htm 模板,
思路是,用這一句去改
<!--{if $forum[icon]}-->有圖標時顯示<!--{else}-->無圖標時<!--{/if}-->
所以找到最新主題代碼
  1.                                                 <ul class="list" style="background-image: url(images/listbg_li.gif); padding:1px 2px 0 10px; list-style-type: none; line-height: 20px; margin:6px 0 4px 0; clear: both;">
  2.                                                         <!--{loop ${"new_no".$forum[fid]."_threadlist"} $row}-->
  3.                                                                 <div style="overflow: hidden; height:20px; width:100%">
  4.                                                                 <!--{if $forum['permission'] == 1}-->
  5.                                                                 {lang private_forum}, 您目前没有权限可查阅主题及内容
  6.                                                                 <!--{else}-->
  7.                                                                 <small style="float:right; color:#9C8B88; margin: 0 0 0 5px">$row['date']</small><a href="viewthread.php?tid=$row[tid]" title="$row[subject]" target='_self'>$row[view_subject]</a>
  8.                                                                 <!--{/if}-->
  9.                                                                 </div>
  10.                                                         <!--{/loop}-->
  11.                                                 </ul>
复制代码
替換為
  1.                                                 <!--{if $forum[icon]}-->
  2.                                                 <ul class="list" style="background-image: url(images/listbg_li.gif); padding:1px 2px 0 10px; list-style-type: none; line-height: 20px; margin:6px 0 4px 0; clear: both;">
  3.                                                         <!--{loop ${"new_no".$forum[fid]."_threadlist"} $row}-->
  4.                                                                 <div style="overflow: hidden; height:20px; width:100%">
  5.                                                                 <!--{if $forum['permission'] == 1}-->
  6.                                                                 {lang private_forum}, 您目前没有权限可查阅主题及内容
  7.                                                                 <!--{else}-->
  8.                                                                 <small style="float:right; color:#9C8B88; margin: 0 0 0 5px">$row['date']</small><a href="viewthread.php?tid=$row[tid]" title="$row[subject]" target='_self'>$row[view_subject]</a>
  9.                                                                 <!--{/if}-->
  10.                                                                 </div>
  11.                                                         <!--{/loop}-->
  12.                                                 </ul>
  13.                                                 <!--{else}--><!--{/if}-->
复制代码
------------------------------------------------------------------------------
問題[6]
最新主題列表,如何顯示高亮顏色?
1.
index.php 添加的那段,

$query = $db->query($sql);
while ($row = $db->fetch_array($query)){
上面加
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');

2.
模板 discuz.htm

<a href="viewthread.php?tid=$row[tid]"
替換為
<a href="viewthread.php?tid=$row[tid]" $row[highlight]

------------------------------------------------------------------------------
問題[7]
发现有个问题,如果版块名称里使用了html代码会出现如下情况

不能正确识别版块名称里的html代码。

試試看,您的版塊名稱裡,HTML代碼不要加引號。
比如原先是 <font color="red">版塊名稱</font>
引號拿掉變成  <font color=red>版塊名稱</font>  這樣

------------------------------------------------------------------------------
問題[8]
刪掉的主題,還會顯示在首頁上,令其不顯示的修改方法:

index.php 已修改後, 在添加的那段
  1. $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' ORDER BY t.dateline DESC LIMIT $v) UNION ";
复制代码
改成下面的: (就是把 AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 插進去)
  1. $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
复制代码

[ 本帖最后由 jillyz 于 2008-1-6 16:00 编辑 ]
回复

使用道具 举报

glider 发表于 2007-11-16 00:20:18 | 显示全部楼层
收藏~~~~~~~~~~~~~~~
回复

使用道具 举报

fishmix 发表于 2007-11-16 01:04:05 | 显示全部楼层
看看是什么 ~~速度发啊!!

期待ing ..
回复

使用道具 举报

sycfifa 发表于 2007-11-16 03:30:49 | 显示全部楼层
问题大了``怎么全乱了`````
回复

使用道具 举报

aujs 发表于 2007-11-16 03:33:57 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

sycfifa 发表于 2007-11-16 03:41:11 | 显示全部楼层

这是什么啊``刚开始的版本还没有这个问题`怎么越改问题越大了呢

本帖子中包含更多资源

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

x
回复

使用道具 举报

 楼主| jillyz 发表于 2007-11-16 03:56:27 | 显示全部楼层
原帖由 sycfifa 于 2007-11-16 03:41 发表
203340
这是什么啊``刚开始的版本还没有这个问题`怎么越改问题越大了呢

你是指  版块 / 最新主题  這裡嗎
---------------------------------------------------------------------

discuz.htm

注意这一句:
<th>{lang forum_name} / 最新主题</th>

你的横排一行若设置 N 个版块,那么代码中,这一句就要复制放 N 行。(替换代码是一行3个版块的例子)

如果你的论坛不固定一行版块数,那拿掉這一整段。
                                <thead class="category" align="center">
                                         <tr>
                                                <th>{lang forum_name} / 最新主题</th>
                                                <th>{lang forum_name} / 最新主题</th>
                                                <th>{lang forum_name} / 最新主题</th>
                                        </tr>
                                </thead>
回复

使用道具 举报

sycfifa 发表于 2007-11-16 05:20:19 | 显示全部楼层
请问一下怎么去掉最后发表这一段啊``我不太喜欢这段``谢谢
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-10-5 13:23 , Processed in 0.141032 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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