[无界]给自己的用户列表加个【心情音乐】- 来源:爱秀社区
- 作者:无界
- 地址:http://tlb.258club.com/thread-2651-1-11.html
复制代码
具体方法:
1、首先到系统设置→用户→用户组栏目定制,新建两个栏目。



2、修改模版文件viewthread_node.htm,找到- <p>{eval showstars($post['stars']);}</p>
复制代码 在下边加- <div id="my_song" style="width:140px; margin-left:20px;" align="left">
- <!--{if $post[field_5]}-->
- <div class="song_list">
- <ul>
- <li>
- <span class="fl">
- <span class="fl singer_name text_clip">
- <a style="color:#2196F3">$post[field_5]</a>
- </span>
- <span class="fr">
- <span class="icon_tools fl" type="song">
- <a href="javascript:void(0)" onclick="playMP3(this)" url="$post[field_6]" class="icon_play" title="播放"></a>
- <a href="$post[field_6]" class="icon_down" title="下载"></a>
- </span>
- </span>
- </li>
- </ul>
- </div>
- <!--{else}-->
- <font color="#666666"><a href="memcp.php" title="定义自己的主题曲,可以与朋友一起分享哦">点击定义歌曲</a></font>
- <!--{/if}-->
- </div>
复制代码 注意修改$post[field_5]和$post[field_6]
5是心情音乐,6是音乐地址
3、打开css_common模板,把代码放在最下边:- * ~~~~~~~~~~~~~~~~~~~~ 心情音乐~~~~~~~~~~~~~~~~~~~~*/
- #my_song a:hover{text-decoration:none;}
- .icon_tools .icon_play {
- width: 14px;
- background-position: -227px 0;
- }
- .icon_tools a {
- display: inline-block;
- width: 14px;
- height: 14px;
- margin: 5px 0 0 2px;
- background: url('http://kuchingshare.my/template/style/i-share/music.png') right top no-repeat;
- }
- .icon_tools .icon_stop {
- width: 14px;
- background-position: -230px -44px;
- }
- .fr {
- float: right!important;
- }
- .song_list li {
- line-height: 25px;
- }
- .song_list {
- width: 130px;
- }
- .song_list li .song_name {
- margin: 0 10px;
- width: 180px;
- line-height: 23px;
- }
复制代码 4、把这个代码添加到第三方:- <script type="text/javascript" src="http://icode.258club.com/templates/colors/imusic_js.htm"></script>
复制代码 |