TShopping
標題:
[精心傑作]滾動聯盟論壇+方向選擇+首頁伸縮圖標 for 6.0
[打印本頁]
作者:
woff
時間:
2008-9-8 12:17
標題:
[精心傑作]滾動聯盟論壇+方向選擇+首頁伸縮圖標 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[url]\" target=\"_blank\">$flink[name]</a></h5><p>$flink[description]</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[url]\" target=\"_blank\"><img src=\"$flink[logo]\" border=\"0\" alt=\"$flink[name]\" /></a> ";
} else {
$tightlink_text .= "<a href=\"$flink[url]\" target=\"_blank\">[$flink[name]]</a> ";
}
}
複製代碼
更換為
if($flink['description']) {
$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>";
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[url]\" target=\"_blank\"><img src=\"$flink[logo]\" border=\"0\" alt=\"$flink[name]\"></a>";
} else {
$tightlink_text .= "<a href=\"$flink[url]\" target=\"_blank\">$flink[name]></a>";
}
}
複製代碼
2. 後台 -> 更新緩存
3. 修改模板 discuz.htm
找
<!--{if $_DCACHE['forumlinks']}-->
<div class="box">
<span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" alt="" onclick="toggle_collapse('forumlinks');" /></span>
<h4>{lang board_links}</h4>
<table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse[forumlinks]" 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[content]
<!--{/loop}-->
</marquee>
</td>
</tr>
</table>
</div>
<!--{/if}-->
複製代碼
更換為
<!--{if $_DCACHE['forumlinks']}-->
<div class="box">
<span class="headactions"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" alt="" onclick="toggle_collapse('forumlinks');" /></span>
<h4>{lang board_links}</h4>
<table summary="{lang board_links}" cellpadding="0" cellspacing="0" style="$collapse[forumlinks]" 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[content]
<!--{/loop}-->
</marquee>
</td>
</tr>
</table>
</div>
<!--{/if}-->
複製代碼
完成
ps:需要填
論壇
聯盟的文字說明
作者:
新东方法
時間:
2015-6-15 19:04
这是什么?
歡迎光臨 TShopping (http://www.tshopping.com.tw/)
Powered by Discuz! X3.2