音乐插件如何自己修改模板
2009 六月 16
1,对header.htm
这个文件 在templates\xxxx (这里的xxxx代表你的模板名称)
在大概是第20行
下加入如下代码:
1 2 3 4 5 6 7 8 9 10 11 | <script type="text/javascript" src="./plugins/bg_music/js/sendtoedite.js"> </script> <script type="text/javascript"> <!--论坛背景音乐 if (top.location.href=="{$boardurl}index2.php") { top.location.href = "{$boardurl}"; } // --> </script> |
如果是3.0版的那个(discuz7.0论坛背景音乐插件v3.0(全站播放,带播放列表))或者是dz_bg_music_playerv2.0_build20090606am_FOR_ie.rar
则是加入这个代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <script type="text/javascript" src="./plugins/bg_music/js/sendtoedite.js"> </script> <script type="text/javascript" src="./plugins/bg_music/js/packed.js"> </script> <link rel="stylesheet" href="./plugins/bg_music/style.css" type="text/css" media="screen" /> <script type="text/javascript"> <!--论坛背景音乐 if (top.location.href=="{$boardurl}index2.php") { top.location.href = "{$boardurl}"; } // --> </script> |
2,对于login.htm
(这个文件在templates\default下)
大概是在第19-25行:
1 2 3 4 5 6 7 | {if !empty($floatlogin)} $('messageright').innerHTML = '<h1><a href="javascript:;" onclick="location.reload()">{lang login_refresh}</a></h1>'; setTimeout('location.reload()', $mrefreshtime); {else} $('messageright').innerHTML = '<h1><a href="{echo dreferer()}">{lang login_location}</a></h1>'; setTimeout("window.location.href='{echo dreferer()}'", $mrefreshtime); {/if} |
改为:
1 2 3 4 5 6 7 8 | {if !empty($floatlogin)} $('messageright').innerHTML = '<h1><a href="javascript:;" onclick="parent.location.reload()">{lang login_refresh}</a></h1>'; setTimeout('parent.location.reload()', $mrefreshtime); {else} $('messageright').innerHTML = '<h1><a href="{echo dreferer()}">{lang login_location}</a></h1>'; parent.location.reload(); setTimeout("window.location.href='{echo dreferer()}'", $mrefreshtime); {/if} |



![[discuz X2插件]Hacklog page links](http://static.ihacklog.com/wp-files/2012/02/hacklog-page-links-display-150x81.png)
![Discuz!7.0实现PHP代码高亮[原创]](http://static.ihacklog.com/wp-files/2009/04/editor-21x150.gif)



