woff 發表於 2008-9-8 12:17:49

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

修改自 : 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

if($flink['description']) {
                                                $forumlink['content'] = "<h5><a href=\"$flink\" target=\"_blank\">$flink</a></h5><p>$flink</p>";
                                                if($flink['logo']) {
                                                      $forumlink['type'] = 1;
                                                      $forumlink['logo'] = $flink['logo'];
                                                } else {
                                                      $forumlink['type'] = 2;
                                                }
                                                $data[] = $forumlink;
                                        } else {
                                                if($flink['logo']) {
                                                      $tightlink_logo .= "<a href=\"$flink\" target=\"_blank\"><img src=\"$flink\" border=\"0\" alt=\"$flink\" /></a> ";
                                                } else {
                                                      $tightlink_text .= "<a href=\"$flink\" target=\"_blank\">[$flink]</a> ";
                                                }
                                        }更換為
if($flink['description']) {
                                                $forumlink['content'] = "<a href=\"$flink\" target=\"_blank\" title=\"$flink\r\n$flink\"><img src=\"$flink\" border=\"0\" alt=\"$flink\r\n$flink\"></a>";
                                                if($flink['logo']) {
                                                      $forumlink['type'] = 1;
                                                      $forumlink['logo'] = $flink['logo'];
                                                } else {
                                                      $forumlink['type'] = 2;
                                                }
                                                $data[] = $forumlink;
                                        } else {
                                                if($flink['logo']) {
                                                      $tightlink_logo .= "<a href=\"$flink\" target=\"_blank\"><img src=\"$flink\" border=\"0\" alt=\"$flink\"></a>";
                                                } else {
                                                      $tightlink_text .= "<a href=\"$flink\" target=\"_blank\">$flink></a>";
                                                }
                                        }2. 後台 -> 更新緩存

3. 修改模板 discuz.htm



<!--{if $_DCACHE['forumlinks']}-->
<div class="box">
      <span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg" alt="" onclick="toggle_collapse('forumlinks');" /></span>
      <h4>{lang board_links}</h4>
      <table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse" id="forumlinks">
                <tr>
                        <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>
                </tr>
                <tr>
                        <td>
                              <marquee scrollamount="5" id="ericb" onmouseover="this.stop();" onmouseout="this.start();">
                                        <!--{loop $_DCACHE['forumlinks'] $flink}-->
                                                $flink
                                        <!--{/loop}-->
                              </marquee>
                        </td>
                </tr>
      </table>
</div>
<!--{/if}-->更換為



<!--{if $_DCACHE['forumlinks']}-->
<div class="box">
      <span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg" alt="" onclick="toggle_collapse('forumlinks');" /></span>
      <h4>{lang board_links}</h4>
      <table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse" id="forumlinks">
                <tr>
                        <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>
                </tr>
                <tr>
                        <td>
                              <marquee scrollamount="5" id="ericb" name="ericb" onmouseover="this.stop();" onmouseout="this.start();">
                                        <!--{loop $_DCACHE['forumlinks'] $flink}-->
                                                $flink
                                        <!--{/loop}-->
                              </marquee>
                        </td>
                </tr>
      </table>
</div>
<!--{/if}-->完成


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

新东方法 發表於 2015-6-15 19:04:12



这是什么?
頁: [1]
查看完整版本: [精心傑作]滾動聯盟論壇+方向選擇+首頁伸縮圖標 for 6.0