TShopping

 找回密碼
 註冊
搜索
查看: 24973|回復: 12
打印 上一主題 下一主題

[教學] [X1,X1.5,X2]論壇版塊直排系統 v2.X 安裝方法

    [複製鏈接]
跳轉到指定樓層
1#
發表於 2011-4-18 16:51:06 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
本插件安裝需要有一定php的知識,新手有一定機率造成不明錯誤的情況。安裝前建議先備份一下。升級 及 全新安裝
找 source\module\forum\forum_index.php
  1. if(empty($gid) && empty($_G['member']['accessmasks']) && empty($showoldetails)) {
  2.         extract(get_index_memory_by_groupid($_G['member']['groupid']));
  3.         if(defined('FORUM_INDEX_PAGE_MEMORY') && FORUM_INDEX_PAGE_MEMORY) {
  4.                 include template('diy:forum/discuz');
  5.                 dexit();
  6.         }
  7. }
複製代碼

  1. //Require Discuz SDK
  2. if(file_exists(DISCUZ_ROOT .'./source/plugin/discuz-sdk/DiscuzSDK.class.php')){
  3.         include_once DISCUZ_ROOT .'./source/plugin/discuz-sdk/DiscuzSDK.class.php'; //X1
  4. }else{
  5.         include_once DISCUZ_ROOT .'./plugins/discuz-sdk/DiscuzSDK.class.php'; //6,7
  6. }
  7. include_once DISCUZ_ROOT .'./source/plugin/straightdisplay/straightdisplay.class.php';
  8. try{
  9.         $sd = StraightDisplay::getInstance();
  10.         $sd->setConfig($sd->helper->getConfigs());
  11.         $sd->setDisplayConfig( unserialize( $sd->helper->getSystemSetting('straightdisplayConfig') ) );     
  12. }catch(SDKException $e){
  13.         switch($e->getMessage()){
  14.                 case DiscuzPluginHelper::PluginNotEnabled:
  15.                         showmessage('插件還沒有啟用,請啟用後再使用,請返回。');
  16.                 break;              
  17.                 case DiscuzPluginHelper::ConfigNotFound:
  18.                         showmessage('發現沒有插件的設定資料,請導入及啟用後再使用本管理系統,請返回。');
  19.                 break;            
  20.                 case DiscuzPluginHelper::SettingNotFound:
  21.                         showmessage('無法從系統設定資料中讀取 '.$e->detail.' ,請檢查安裝是否完成或嘗試更新快取資料,請返回。');               
  22.                 break;        
  23.                 default:
  24.                         SDKException::ExceptionHandler($e);        
  25.         }
  26. }
複製代碼
  1. if(!$gid && (!defined('FORUM_INDEX_PAGE_MEMORY') || !FORUM_INDEX_PAGE_MEMORY)) {
  2.         $announcements = get_index_announcements();
複製代碼
  1. if($sd->CheckViewType()){
  2.          //目前以直排模式顯示
  3.         $data = $sd->Dispatch(null,true);        //讀取所有資料         
  4.         list($group_list,$forumlist,$threads,$posts,$todayposts) = $data;
  5.         }else{ // StraightDisplay End 以下為 本來的顯示模式
複製代碼

  1. if($_G['setting']['whosonlinestatus'] == 1 || $_G['setting']['whosonlinestatus'] == 3) {
  2.                 $_G['setting']['whosonlinestatus'] = 1;
  3.                 $onlineinfo = explode("\t", $_G['cache']['onlinerecord']);
複製代碼
  1. if(!IS_ROBOT && ($_G['setting']['whosonlinestatus'] == 1 || $_G['setting']['whosonlinestatus'] == 3)) {
複製代碼
  1. } // Add by StraightDisplay
複製代碼
X1.5找 template\default\forum\discuz.htm
  1. <div class="fl bm">
  2. <!--{loop $catlist $key $cat}-->
  3. <div class="bm bmw {if $cat['forumcolumns']} flg{/if} cl">
複製代碼
  1. <!--{if empty($gid) && $sd->CheckViewType()}-->
  2.                 {template straightdisplay:forumlist_straightdisplay}
  3.          <!--{else}-->
複製代碼
  1. {hook/index_middle}
複製代碼
複製代碼
  1. <!--{/if}--> <!-- Add By Straightdisplay -->
複製代碼

到插件管理安裝

Discuz-sdk

直排


直排圖片修改方法

找到

source/plugin/straightdisplay/template/images/forum 目錄

裡面放入圖片 假設你的 主板塊 gid 為 1

你的圖片就命名成 gid1.png

上傳即可 大小為 165*73 px

如果想修改成 gif 或jpg圖片

到後台 分區Logo副檔名: 設定 成gif 或 jpg 即可


上述都安裝好以後,才台若秀不出 直排顯示管理

到後台 設計 ->模塊-> 改成 首頁導航項目

前台就看的到了


修改 直排左右位置

找到 source/plugin/straightdisplay/templates/forumlist_straightdisplay.htm

打開檔案

找到
  1. #StraightWrap { padding: 0px; width: 100%;padding: 0 10px 10px 0; display: block; }
複製代碼
改成
  1. #StraightWrap { padding: 0px; width: 800px; margin: 0px auto 10px; display: block; }
複製代碼

或是自行修改 width


修改 板塊間隔大小

找到
  1. .BoxContainer{ width:165px;float:left;margin-left:8px;}
複製代碼
修改
  1. margin-left:20px;
複製代碼

或是自行修改喜歡的間隔大小


如要增加發帖時會有NEW圖片及HOT圖片

打開 straightdisplay_box.htm 檔案

找到
  1. <img src="source/plugin/straightdisplay/template/images/home/bullet_blue.gif" align="middle"> <a href="forum.php?mod=forumdisplay&fid=$forum[fid]" title="今日帖數:$forum[todayposts] {LF}主題數目:$forum[threads] {LF}帖子數目:$forum[posts]" style="{eval echo implode('; ',$forum['nameStyle']);}">$forum[name]</a>
複製代碼

後面加上

  1. <!--{if $forum[todayposts] >= 10}-->
  2. <img src="source/plugin/straightdisplay/template/images/home/hot.gif" alt="總共帖數:$forum[todayposts]" width="24" height="12" border="0">
  3. <!--{elseif $forum[todayposts] >0 &&  $forum[todayposts] <10}-->
  4. <span class="todayposts"><img src="source/plugin/straightdisplay/template/images/home/new.gif" alt="此版今日有$forum[todayposts]帖" width="24" height="12" border="0"></span>
  5. <!--{/if}-->
複製代碼

這樣就可以了


修改主題行高 打開檔案 forumlist_straightdisplay.htm

  1. .sBox ul, s.Box li { list-style: none; margin-left: 10px; line-height:30px;}
複製代碼
  1. list-style: none; margin-left: 10px; line-height:30px;
複製代碼
後面加上
  1. line-height:30px;
複製代碼

 

臉書網友討論
2#
發表於 2012-8-21 00:48:54 | 只看該作者
我幫你 喝喝  

版主招募中

3#
發表於 2013-4-4 05:17:42 | 只看該作者
請問能用在X2嗎?


4#
 樓主| 發表於 2013-4-4 23:16:35 | 只看該作者
ws830106 發表於 2013-4-4 05:17
請問能用在X2嗎?

可以ㄚ~ 本站就是例子


5#
發表於 2013-9-8 22:39:16 | 只看該作者
大大,
不好意思,小弟有一個問題想請教


如何才能設定列表前的小圖案呢?

感謝!


6#
 樓主| 發表於 2013-9-8 23:23:37 | 只看該作者
ws830106 發表於 2013-9-8 22:39
大大,
不好意思,小弟有一個問題想請教

找到 source\plugin\straightdisplay\template\images\home\bullet_blue.gif

檔案 覆蓋過去即可


7#
發表於 2014-9-3 14:48:39 | 只看該作者


  不敢相信哦


8#
發表於 2015-7-18 21:39:06 | 只看該作者
Discuz-sdk
按了安裝 出現空白頁面...
怎麼半...?


9#
發表於 2015-12-2 23:50:43 | 只看該作者
新版本不是不用改東東嗎?


*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-19 14:56 , Processed in 0.046211 second(s), 20 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表