蠻簡單的
在
首頁上加
公告訊息框.或會員注意事項
演示
http://myth.servegame.com
首先在templates\default\
discuz.htm
找
複製內容到剪貼簿
代碼:
<!--{if empty($gid) && $announcements}-->
<div id="announcement" onmouseover="if(!anncount) {clearTimeout(annst);annst = 0}" onmouseout="if(!annst) annst = setTimeout('announcementScroll()', anndelay);">
<div id="announcementbody"><ul>$announcements</ul></div>
</div>
<script type="text/javascript">
var anndelay = 3000;
var anncount = 0;var annheight = 36;var annst = 0;
function announcementScroll() {
if(!annst) {
$('announcementbody').innerHTML += '
' + $('announcementbody').innerHTML;$('announcementbody').scrollTop = 0;
if($('announcementbody').scrollHeight > annheight * 3) {
annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcement').onmouseover = $('announcement').onmouseout = null;
}
return;
}
if(anncount == annheight) {
if($('announcementbody').scrollHeight - annheight <= $('announcementbody').scrollTop) {
$('announcementbody').scrollTop = $('announcementbody').scrollHeight / 2 - annheight;
}
anncount = 0;annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcementbody').scrollTop++;anncount++;annst = setTimeout('announcementScroll()', 10);
}
}
</script>
<!--{/if}-->下加
引用:
<div class="box">
<span class="headactions"><img id="registernew_img" src="{IMGDIR}/collapsed_no.gif" alt="" onclick="toggle_collapse('registernew');" /></span>
<h4>論壇公告</h4>
<table class="portalbox" cellspacing="0" cellpadding="0" id="forumfour" border="0">
<tr>
<td width="100%">
<table style="border:1px solid #777777;" bgcolor="black">
<td>
<marquee scrollamount='1' scrolldelay='60' direction= 'up' width='300' id=xiaoqing height='120' onmouseover=xiaoqing.stop() onmouseout=xiaoqing.start()>
<BR>加你想加的訊息
<BR>
<BR>加你想加的訊息
<BR>
<BR>本人無聊用用
<BR>
<BR>如有不好的地方請多多包含
<BR>
</marquee>
</td>
</table>
</td>
</tr>
</table>
</div>
完成
[
本帖最後由 kazo 於 2007-9-30 06:25 AM 編輯 ]