Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖

aquamp播放器清单分页==终于写好了

[复制链接]
 楼主| lu5266 发表于 2005-6-15 13:06:22 | 显示全部楼层
原帖由 freddy 于 2005-6-15 09:32 发表
我顶!加精了!
支持一下
原帖由 qilin520 于 2005-6-15 09:33 发表
不错!~`好东西 支持

谢谢支持
回复

使用道具 举报

拒买日本货 发表于 2005-7-12 09:19:05 | 显示全部楼层
出错了!

原播放器里有给选择打勾的小框框,,,现在没了?!

也就是说,此功能没有了,,,

请更改...这样才完美..........
回复

使用道具 举报

秋本健太 发表于 2005-7-14 15:45:41 | 显示全部楼层
好东西!!!
回复

使用道具 举报

 楼主| lu5266 发表于 2005-7-14 23:07:17 | 显示全部楼层
原帖由 拒买日本货 于 2005-7-12 09:19 发表
出错了!

原播放器里有给选择打勾的小框框,,,现在没了?!

也就是说,此功能没有了,,,

请更改...这样才完美..........

有的
等我的电脑可以上网的时候
我再放上来吧
我的论坛里是有的
但是聚网不能访问了啊
回复

使用道具 举报

 楼主| lu5266 发表于 2005-7-15 11:00:36 | 显示全部楼层
原帖由 拒买日本货 于 2005-7-12 09:19 发表
出错了!

原播放器里有给选择打勾的小框框,,,现在没了?!

也就是说,此功能没有了,,,

请更改...这样才完美..........


说明一下:
选择打勾的小框框,是圆圆的,我拿来用的,谢了圆圆.


在player.js里
查找

  1. function getPlaylist(target,obj) {
  2.         if(typeof(wmp) != "undefined") {
  3.                 var res = "";
  4.                 var count = wmp.currentPlaylist.count;
  5.                 res += "<table width=100% style=table-layout:fixed; cellpadding=0 cellspacing=0>\n";
  6.                 for(i=0;i<=count-1;i++) {
  7.                         var itemname = wmp.currentPlaylist.item(i).name;
  8.                         var n = i+1;
  9.                         res += "        <tr><td align=right id=no>"+n+"</td><td nowrap id=name title=""+itemname+""><span style=cursor:hand; onclick=playItem("+n+");>"+itemname+"</span></td><td align=right id=button><img src=images/btn_listen.gif style=cursor:hand; align=absmiddle onclick=playItem("+n+");><img src=images/btn_delete.gif style=cursor:hand; align=absmiddle onclick=deleteItem("+n+");getPlaylist();></td></tr>\n";
  10.                 }
  11.                 res += "</table>\n";
  12.                 if(!target) {
  13.                         playlist.innerHTML = res;
  14.                 } else {
  15.                         target.innerHTML = res;
  16.                 }
  17.         }
  18. }
复制代码



替换为:
  1. var page=1;       

  2. function getpage(no)
  3.        {   
  4.           page=no;
  5.           getPlaylist();
  6.         }      

  7. function getPlaylist(target,obj) {
  8.         if(typeof(wmp) != "undefined") {
  9.                 var res = "";               
  10.                
  11.                 var startpage,pagemax=15,allpage,start,end,j;
  12.                        
  13.                 var count = wmp.currentPlaylist.count;
  14.                
  15.                 startpage=page;       
  16.                                
  17.                 if(pagemax>count)
  18.                      pagemax=count;       
  19.                                          
  20.                 allpage=Math.ceil(count/pagemax);               
  21.                   
  22.                 start=(startpage-1)*pagemax;
  23.                 end=startpage*pagemax;
  24.                   
  25.                 if(page==allpage)
  26.                   end=count;
  27.                   
  28.                 res += "<table width=100% style=table-layout:fixed; cellpadding=0 cellspacing=0>\n";
  29.                 for(i=start;i<=end-1;i++) {
  30.                         var itemname = wmp.currentPlaylist.item(i).name;
  31.                         var n = i+1;
  32.                         res += "<tr><td align=right id=no>"+n+"</td><td id=cb width=25><input type=checkbox name=plitem value="+n+" checked></td><td nowrap id=name title=""+itemname+""><span style=cursor:hand; onclick=playItem("+n+");>"+itemname+"</span></td><td align=right id=button><img src=images/btn_listen.gif style=cursor:hand; align=absmiddle onclick=playItem("+n+");><img src=images/btn_delete.gif style=cursor:hand; align=absmiddle onclick=deleteItem("+n+",true);></td></tr>\n";
  33.                 }
  34.                
  35.                 res += "</table>\n";
  36.                
  37.                 res += "<table width=100%    cellpadding=0 cellspacing=0 > ";
  38.                 res +="<tr><td nowrap background="images/page01.gif"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   共有:&nbsp;&nbsp;&nbsp;<font color=#FF0000> "+allpage+"</font>页";
  39.         res +="&nbsp;&nbsp;&nbsp;&nbsp;当前页:&nbsp;&nbsp;    <font color=#FF0000>   "+page+"</font>/"+allpage+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=cursor:hand; onclick=deleteItem("+n+",true);>删除所选</span></td></tr>";
  40.                 res +=" <tr><td background="images/page.gif">&nbsp;&nbsp;<font color=red >跳页-></font>";
  41.                
  42.                 for( j=1; j<=allpage; j++)
  43.                 {
  44.                 if(!(j%15))
  45.                 res +="<br>";
  46.                 res +="&nbsp;<a href="javascript:getpage(" + j + ")">[" + j + "]<a> ";
  47.                 }
  48.                 res +="</td></tr>";
  49.                 res += "</table>";
  50.                 if(!target) {
  51.                         playlist.innerHTML = res;
  52.                 } else {
  53.                         target.innerHTML = res;
  54.                 }
  55.         }
  56. }
复制代码



查找

  1. function deleteItem(no) {
  2.         var cfm = confirm("Are you sure you want this media to be deleted?");
  3.         if(cfm) {
  4.                 var stats = wmp.playState;
  5.                 media = wmp.currentPlaylist.item(no-1);
  6.                 wmp.currentPlaylist.removeItem(media);
  7.                 if(stats == 3) { wmp.controls.play(); }
  8.         }
  9. }
复制代码


替换为:
  1. function deleteItem(no,reload) {
  2.         var plitem_sel = 0;
  3.         var cfm_textadd = "";
  4.         var del_count = 0;
  5.         if(typeof(plitem) != "undefined") for(i=0;i<plitem.length;i++) { if(plitem[i].checked == true) plitem_sel++; }
  6.         if(plitem_sel<1 && !no) return false;
  7.         if(plitem_sel>1) cfm_textadd = " 你选定了"+plitem_sel+"首!\n\n ";
  8.         var cfm = confirm(cfm_textadd+"你确定要把它们从播放列表中删除!?\n");
  9.         if(cfm) {
  10.                 var stats = wmp.playState;
  11.                 if(plitem_sel>1) {
  12.                         for(i=0;i<plitem.length;i++) {
  13.                                 if(plitem[i].checked == true) {
  14.                                         media = wmp.currentPlaylist.item(plitem[i].value - (1+del_count));                                       
  15.                                         wmp.currentPlaylist.removeItem(media);                                       
  16.                                         del_count++;
  17.                                                                        
  18.                                        }
  19.                         }
  20.                 } else {
  21.                         media = wmp.currentPlaylist.item(no-1);
  22.                         wmp.currentPlaylist.removeItem(media);
  23.                 }
  24.                 if(stats == 3) aPlay();
  25.                 if(reload == true) getPlaylist();
  26.         } else {
  27.                 return false;
  28.         }
  29. }
复制代码


搞定

[ 本帖最后由 lu5266 于 2005-7-15 11:09 编辑 ]
回复

使用道具 举报

sweven 发表于 2005-10-15 09:20:29 | 显示全部楼层
我的问题更郁闷,是我更换播放列表以后再单位的机器上正常,可是在家里确还是原来的列表无法更新成新的播放列表,论坛一部分能是新列表,另一部分则无法更新成新列表,我都郁闷死了,谁能告诉我怎么解决啊?我现在不知道问题出在哪里了,所以也没法下手解决
回复

使用道具 举报

 楼主| lu5266 发表于 2005-10-15 10:05:28 | 显示全部楼层
原帖由 sweven 于 2005-10-15 09:20 发表
我的问题更郁闷,是我更换播放列表以后再单位的机器上正常,可是在家里确还是原来的列表无法更新成新的播放列表,论坛一部分能是新列表,另一部分则无法更新成新列表,我都郁闷死了,谁能告诉我怎么解决啊?我现在 ...


有可能是浏览器的问题

但是你给地址帮你测试看
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-2 16:20 , Processed in 0.099390 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表