TShopping

 找回密碼
 註冊
搜索
查看: 3177|回復: 1

[教學] [精心傑作]滾動聯盟論壇+方向選擇+首頁伸縮圖標 for 6.0

  [複製鏈接]
發表於 2008-9-8 12:17:49 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
修改自 : http://alan888.com/Discuz/thread-104441-1-1.html


適用版本: Discuz! 6.0
作者: alan888
修正:deadxp
6.0版:ericb
演示: http://hkec.coms.hk/
修改文件: include/cache.func.php, discuz.htm


此帖是根據 Discuz4.1 插件 "用滾動圖示顯示聯盟論壇" 修正及使用在 Discuz 5.0 上
再根據5.0 修改用於 Discuz 5.5上
再根據5.5 修改用於 Discuz 6.0上

本插件暫時未能支援FireFox的瀏覽器

1. 修改 include/cache.func.php

  1. if($flink['description']) {
  2.                                                 $forumlink['content'] = "<h5><a href=\"$flink[url]\" target=\"_blank\">$flink[name]</a></h5><p>$flink[description]</p>";
  3.                                                 if($flink['logo']) {
  4.                                                         $forumlink['type'] = 1;
  5.                                                         $forumlink['logo'] = $flink['logo'];
  6.                                                 } else {
  7.                                                         $forumlink['type'] = 2;
  8.                                                 }
  9.                                                 $data[] = $forumlink;
  10.                                         } else {
  11.                                                 if($flink['logo']) {
  12.                                                         $tightlink_logo .= "<a href=\"$flink[url]\" target=\"_blank\"><img src=\"$flink[logo]\" border=\"0\" alt=\"$flink[name]\" /></a> ";
  13.                                                 } else {
  14.                                                         $tightlink_text .= "<a href=\"$flink[url]\" target=\"_blank\">[$flink[name]]</a> ";
  15.                                                 }
  16.                                         }
複製代碼
更換為

  1. if($flink['description']) {
  2.                                                 $forumlink['content'] = "<a href=\"$flink[url]\" target=\"_blank\" title=\"$flink[name]\r\n$flink[description]\"><img src=\"$flink[logo]\" border=\"0\" alt=\"$flink[name]\r\n$flink[description]\"></a>";
  3.                                                 if($flink['logo']) {
  4.                                                         $forumlink['type'] = 1;
  5.                                                         $forumlink['logo'] = $flink['logo'];
  6.                                                 } else {
  7.                                                         $forumlink['type'] = 2;
  8.                                                 }
  9.                                                 $data[] = $forumlink;
  10.                                         } else {
  11.                                                 if($flink['logo']) {
  12.                                                         $tightlink_logo .= "<a href=\"$flink[url]\" target=\"_blank\"><img src=\"$flink[logo]\" border=\"0\" alt=\"$flink[name]\"></a>";
  13.                                                 } else {
  14.                                                         $tightlink_text .= "<a href=\"$flink[url]\" target=\"_blank\">$flink[name]></a>";
  15.                                                 }
  16.                                         }
複製代碼
2. 後台 -> 更新緩存

3. 修改模板 discuz.htm



  1. <!--{if $_DCACHE['forumlinks']}-->
  2. <div class="box">
  3.         <span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" alt="" onclick="toggle_collapse('forumlinks');" /></span>
  4.         <h4>{lang board_links}</h4>
  5.         <table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse[forumlinks]" id="forumlinks">
  6.                 <tr>
  7.                         <th style="padding: 0 10px">滾動方向 [<font face="webdings" onMouseOver="if(getElementById(ericb).direction == 'left')getElementById(ericb).scrollAmount=6;" onMouseOut="getElementById(ericb).scrollAmount=4;" onMouseUp="getElementById(ericb).scrollAmount=12;"onMouseDown="getElementById(ericb).direction='left';getElementById(ericb).scrollAmount=10;"> <span style="cursor:pointer;cursor:hand" title="向左滾動">7</span></font> <font face="webdings" onClick="stop=0;getElementById(ericb).start();"><span style="cursor:pointer;cursor:hand" title="開始">4</span></font> <font face="webdings" onClick="stop=1;getElementById(ericb).stop();"><span style="cursor:pointer;cursor:hand" title="暫停"><</span></font> <font face="webdings" onMouseOver="if(getElementById(ericb).direction == 'right') getElementById(ericb).scrollAmount=6;"onMouseOut="getElementById(ericb).scrollAmount=4;" onMouseUp="getElementById(ericb).scrollAmount=12;" onMouseDown="getElementById(ericb).direction='right';getElementById(ericb).scrollAmount=10;"> <span style="cursor:pointer;cursor:hand" title="向右滾動">8</font> ]</th>
  8.                 </tr>
  9.                 <tr>
  10.                         <td>
  11.                                 <marquee scrollamount="5" id="ericb" onmouseover="this.stop();" onmouseout="this.start();">
  12.                                         <!--{loop $_DCACHE['forumlinks'] $flink}-->
  13.                                                 $flink[content]
  14.                                         <!--{/loop}-->
  15.                                 </marquee>
  16.                         </td>
  17.                 </tr>
  18.         </table>
  19. </div>
  20. <!--{/if}-->
複製代碼
更換為




  1. <!--{if $_DCACHE['forumlinks']}-->
  2. <div class="box">
  3.         <span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" alt="" onclick="toggle_collapse('forumlinks');" /></span>
  4.         <h4>{lang board_links}</h4>
  5.         <table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse[forumlinks]" id="forumlinks">
  6.                 <tr>
  7.                         <th style="padding: 0 10px">滾動方向 [<font face="webdings" onMouseOver="if(document.all.ericb.direction == 'left')document.all.ericb.scrollAmount=6;" onMouseOut="document.all.ericb.scrollAmount=4;" onMouseUp="document.all.ericb.scrollAmount=12;"onMouseDown="document.all.ericb.direction='left';document.all.ericb.scrollAmount=10;"> <span style="cursor:pointer;cursor:hand" title="向左滾動">7</span></font> <font face="webdings" onClick="stop=0;document.all.ericb.start();"><span style="cursor:pointer;cursor:hand" title="開始">4</span></font> <font face="webdings" onClick="stop=1;document.all.ericb.stop();"><span style="cursor:pointer;cursor:hand" title="暫停"><</span></font> <font face="webdings" onMouseOver="if(document.all.ericb.direction == 'right') document.all.ericb.scrollAmount=6;"onMouseOut="document.all.ericb.scrollAmount=4;" onMouseUp="document.all.ericb.scrollAmount=12;" onMouseDown="document.all.ericb.direction='right';document.all.ericb.scrollAmount=10;"> <span style="cursor:pointer;cursor:hand" title="向右滾動">8</font> ]</th>
  8.                 </tr>
  9.                 <tr>
  10.                         <td>
  11.                                 <marquee scrollamount="5" id="ericb" name="ericb" onmouseover="this.stop();" onmouseout="this.start();">
  12.                                         <!--{loop $_DCACHE['forumlinks'] $flink}-->
  13.                                                 $flink[content]
  14.                                         <!--{/loop}-->
  15.                                 </marquee>
  16.                         </td>
  17.                 </tr>
  18.         </table>
  19. </div>
  20. <!--{/if}-->
複製代碼
完成


ps:需要填論壇聯盟的文字說明

 

臉書網友討論
發表於 2015-6-15 19:04:12 | 顯示全部樓層


  这是什么?

版主招募中

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

本版積分規則



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

GMT+8, 2024-3-29 01:47 , Processed in 0.049087 second(s), 19 queries .

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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