woff 發表於 2009-10-31 18:36:28

論壇版塊直排系統 v1.1 For Dz 7.1 (加修改include版本)

注意:本插件作者為NTF,本人只係轉換到能讓大家於7.1使用。
如果不想Dz7.1原本個index 可以修改Dz7.1inclde/index_classics.inc.php在#2
轉換修改Dz7.1 BY:TCheung

/**
@name Forum Board Straight Display Style System - Control Panel
@version 1.1
@author ntf
@license Attribution-No Derivative Works 3.0 Hong Kong http://creativecommons.org/licenses/by-nd/3.0/hk/
*/


演示:http://www.tshopping.com.tw

1.

SQL升級: 全新安裝適用ALTER TABLE `cdb_forums` ADD `straightdisplay` SMALLINT( 1 ) NOT NULL DEFAULT '0';
由於Dz7.1 個index.php 已經與Dz7.0 完全不同所以大家需要上傳新index.php



2.
打開 templates/discuz.htm<!--{loop $catlist $key $cat}-->
      <!--{if $cat['forumscount']}-->
                <div class="mainbox list">
                        <span class="headactions">
                              <!--{if $cat['moderators']}-->{lang forum_category_modedby}: $cat<!--{/if}-->
                              <img id="category_$cat_img" src="{IMGDIR}/$cat" title="{lang spread}" alt="{lang spread}"/>
                        </span>
                        <h3><a href="$indexname?gid=$cat">$cat</a></h3>
                        <table id="category_$cat" summary="category$cat" cellspacing="0" cellpadding="0" style="$collapse['category_'.$cat]">
                        <!--{if !$cat['forumcolumns']}-->
                              <!--{loop $cat $forumid}-->
                                        <!--{eval $forum=$forumlist[$forumid];}-->
                                        <tbody id="forum$forum">
                                                <tr>
                                                      <th$forum>
                                                                $forum
                                                                <div class="left">
                                                                <h2><a href="forumdisplay.php?fid=$forum" {if $forum}target="_blank"{/if}>$forum</a><!--{if $forum && !$forum['redirect']}--><em> ({lang index_today}: <strong>$forum</strong></em><!--{/if}--></h2>
                                                                <!--{if $forum}--><p>$forum</p><!--{/if}-->
                                                                <!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
                                                                <!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--><p>{lang forum_moderators}: $forum</p><!--{else}--><span class="dropmenu" id="mod$forum" >{lang forum_moderators}</span><ul class="popupmenu_popup headermenu_popup" id="mod$forum_menu" style="display: none">$forum</ul><!--{/if}--><!--{/if}-->
                                                                </div>
                                                      </th>
                                                      <td class="forumnums">
                                                                <!--{if $forum['redirect']}-->N/A<!--{else}--><em>$forum</em> / $forum<!--{/if}-->
                                                      </td>
                                                      <td class="forumlast">
                                                      <!--{if $forum['permission'] == 1}-->
                                                                {lang private_forum}
                                                      <!--{else}-->
                                                                <!--{if $forum['redirect']}-->
                                                                        <a href="forumdisplay.php?fid=$forum">{lang url_link}</a>
                                                                <!--{elseif is_array($forum['lastpost'])}-->
                                                                        <p><a href="redirect.php?tid=$forum&goto=lastpost#lastpost">{echo cutstr($forum, 30)}</a></p>
                                                                        <cite><!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum</cite>
                                                                <!--{else}-->
                                                                        {lang never}
                                                                <!--{/if}-->
                                                      <!--{/if}-->
                                                      </td>
                                                </tr>
                                        </tbody>
                              <!--{/loop}-->
                        <!--{else}-->
                              <tr class="narrowlist">
                              <!--{loop $cat['forums'] $forumid}-->
                                        <!--{eval $forum=$forumlist[$forumid];}-->
                                        <!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
                                                </tr></tbody>
                                                <!--{if $forum['orderid'] < $cat['forumscount']}-->
                                                      <tbody><tr>
                                                <!--{/if}-->
                                        <!--{/if}-->
                                        <th width="$cat"{$forum}>
                                                <h2><a href="forumdisplay.php?fid=$forum" {if $forum}target="_blank"{/if}>$forum</a><!--{if $forum}--><em> ({lang index_today}: <strong>$forum</strong></em><!--{/if}--></h2>
                                                <!--{if !$forum}-->
                                                      <p>{lang forum_threads}: $forum, {lang forum_posts}: $forum</p>
                                                      <!--{if $forum['permission'] == 1}-->
                                                                <p>{lang private_forum}
                                                      <!--{else}-->
                                                                <p>{lang forum_lastpost}:
                                                                        <!--{if is_array($forum['lastpost'])}-->
                                                                              <a href="redirect.php?tid=$forum&goto=lastpost#lastpost" title="{echo cutstr($forum, 30)} {lang forum_lastpost_by} {if $forum['lastpost']['author']}$forum['lastpost']['authorusername']{else}{lang anonymous}{/if}">$forum</a>
                                                                        <!--{else}-->
                                                                              {lang never}
                                                                        <!--{/if}-->
                                                                </p>
                                                      <!--{/if}-->
                                                <!--{else}-->
                                                      <p>{lang url_link}</p>
                                                <!--{/if}-->
                                        </th>
                              <!--{/loop}-->
                              $cat['endrows']
                        <!--{/if}-->
                        </table>
                </div>
                <!--{if $admode && !empty($advlist['intercat']) && ($advlist['intercat'][$key] = array_merge(($advlist['intercat'] ? $advlist['intercat'] : array()), ($advlist['intercat'][$key] ? $advlist['intercat'][$key] : array())))}--><div class="ad_column" id="ad_intercat_$key"><!--{echo $advitems[$advlist['intercat'][$key][$key])]]}--></div><!--{else}--><div id="ad_intercat_$key"></div><!--{/if}-->
      <!--{/if}-->
<!--{/loop}-->修改為:<!--{if $gid || $showforumlist == 'default'}-->
{template forumlist_default}
<!--{elseif empty($gid) && $showforumlist == 'straightdisplay'}-->
{template forumlist_straightdisplay}
<!--{/if}-->
換功能 顯示位置: (如需要)<!--{if $gid || $showforumlist == 'default'}-->
<a href="index.php?showforumlist=straightdisplay">變更為直排顯示</a>
<!--{elseif empty($gid) && $showforumlist == 'straightdisplay'}-->
<a href="index.php?showforumlist=default">變更為普通顯示</a>
<!--{/if}-->3.上傳附件

4.後台導入數據http://www.alan888.com/Discuz/images/attachicons/rar.gif discuz_plugin_straightdisplay.rar (717 Bytes)
注要: 安裝時,如果為非BIG5,請把本導入數據先轉碼



4.請變更/新增版塊後 到 管理系統straightdisplay.php 直接按 [提交] 更新   即係(你的網站網址.straightdisplay.php)

5.後台更新緩存

a0951251 發表於 2010-1-19 10:56:42

感謝大大分享!!

a0951251 發表於 2010-1-19 11:11:23

謝謝指教分享!!

xgameover 發表於 2010-8-8 16:43:30

回復 1# woff

請問7.2 可以使用嗎?貴站目前是使用這個嗎?

woff 發表於 2010-8-8 22:45:51

7.2版本的要測試看看才知道了

不過你可試試看

不行再幫你測試看看

xgameover 發表於 2010-8-8 23:55:28

本帖最後由 xgameover 於 2010-8-8 23:59 編輯

我的是7.2的
請問
1.
SQL升級: 全新安裝適用
那個代碼是做什麼的呢?看不懂

大大,貴站的直排風格好漂亮哦!是自己改的嗎?裝了這個就是和貴站一模一樣的直排嗎?

woff 發表於 2010-8-9 00:14:51

是自己改的 裝了就會一樣

但是那個主題的圖不會一樣

要自己用圖片修改軟體修改

代碼是 程式碼
PHP MYSQL HTML CSS程式碼
要花點時間學是真的
不過按表操課保證成功就是了

xgameover 發表於 2010-8-9 09:15:34

大大您好,我是 http://twdudu.com 的管理員
我是使用7.2的discuz

其它的地方我都知道怎麼改,唯獨下面這張圖,要怎麼改呢?看不懂
http://img835.imageshack.us/img835/8527/123rp.jpg

woff 發表於 2010-8-9 10:42:47

後台 數據庫 升級 把代碼貼入就可以了

xgameover 發表於 2010-8-9 10:44:39

本帖最後由 xgameover 於 2010-8-9 10:54 編輯

回復 9# woff

這要動用到數據庫呀!若是後悔了不想裝了怎麼恢復?

我發現貴站的論壇有沒改好的地方
使用firefox瀏覽貴站的論壇,會出錯誤,安全提示、及登入邊框失效、以及無法刪除文章和使用代碼模式編輯文章

http://www.alan888.com/Discuz/viewthread.php?tid=179074&highlight=firefox
用了上面這個網址後,就可以修改好了。
頁: [1] 2
查看完整版本: 論壇版塊直排系統 v1.1 For Dz 7.1 (加修改include版本)