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

 找回密码
 立即注册
搜索

Discuz7.2下的Rayfile上传插件(含自动识别音乐试听)

  [复制链接]
德清 发表于 2010-2-21 23:55:02 | 显示全部楼层
我怎么上传的MP3为什么不能播放呢??楼主能不能解决下
回复

使用道具 举报

 楼主| 竹片子 发表于 2010-2-22 00:04:15 | 显示全部楼层
我怎么上传的MP3为什么不能播放呢??楼主能不能解决下
德清 发表于 2010-02-21 23:55


能给我你的url吗?我需要看看你的问题出在哪里?
回复

使用道具 举报

canonsiu 发表于 2010-2-22 00:48:23 | 显示全部楼层
您好,刚用上。但不能播放。
网址:http://www.776city.com/viewthread.php?tid=449&page=1&extra=#pid1388

步骤没错
回复

使用道具 举报

德清 发表于 2010-2-22 00:49:15 | 显示全部楼层
谢谢!!楼主了。。http://www.chinadod.com/viewthread.php?tid=13130&extra=page%3D1

给你个测试论坛帐号和密码已经PM你了 呵呵!!
回复

使用道具 举报

hegeaimei 发表于 2010-2-22 04:47:15 | 显示全部楼层
回复 1# 竹片子


    这个需要修改discuzcode.func.php中的rayfilecode函数,请做如下的替换,我觉得似乎会增加解析负担,当然写的有些急,这部分脑子动得少了,如有修改意见请尽管提出。
  1. //additional plugin code
  2. function rayfilecode($code)
  3. {
  4.         global $discuzcodes;
  5.         $discuzcodes['pcodecount']++;
  6.         $codecount=$discuzcodes['pcodecount'];
  7.         $searcharray = explode("|", $code);//Split [rayfile] tag's content
  8.         $rayfile_url = str_replace("[url]", "", str_replace("[/url]", "", $searcharray[2]));//Get the Rayfile File page url
  9.         $rayfile_code = str_replace("/", "", str_replace("http://www.rayfile.com/files/", "", $rayfile_url));//Get the Rayfile code
  10.         $searcharray_filetype = strtolower(substr(strrchr($searcharray[0], '.'), 1, 5));//Get the extension name of the upload file
  11.         $searcharray_description = $searcharray_wmpnote = $searcharray_wmp = "";//Description of the upload file
  12.         if($searcharray_filetype == "mp3" || $searcharray_filetype == "wma" || $searcharray_filetype == "mid" || $searcharray_filetype == "wav"){
  13.                 $view = "<br /><img src="images/attachicons/rayfile.gif" border="0" class="absmiddle" alt="" /> <span style="white-space: nowrap" id="attach_".$rayfile_code."" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"><a target="_blank" href="".$rayfile_url.""><strong>".$searcharray[0]."</strong></a></strong></a></span>";
  14.                 if ($searcharray[1] != $searcharray[0]) $searcharray_description = "(".$searcharray[1].")";
  15.                 $searcharray_wmpnote = ",下为本曲试听";
  16.                 $searcharray_wmp = "<p>".parseaudio("getrayfileurl.php?rayfilecode=".$rayfile_code."&type=.mp3", 400, 0)."</p>";
  17.                 $view.= $searcharray_description."<div class="t_attach" id="attach_".$rayfile_code."_menu" style="position: absolute; display: none">点击进入Rayfile下载页".$searcharray_wmpnote."</div>".$searcharray_wmp;
  18.         }else{
  19.                 $view = "<br /><table cellspacing="0" class="t_table" style="width:550px"><tr><td><font style="font-size: 9pt"><strong>文件名:</strong> ".$searcharray[0]."<br /><strong>描述:</strong> ".$searcharray[1]."<br /><strong>下载地址:</strong> <a href="".$rayfile_url."" target="_blank">".$rayfile_url."</a></font></td></tr></table>";
  20.         }
  21.         $discuzcodes['codehtml'][$discuzcodes['pcodecount']] = "$view";
  22.   $discuzcodes['codecount']++;
  23.   return "[\tDISCUZ_CODE_$discuzcodes[pcodecount]\t]";
  24. }
  25. }
复制代码
这段代码我换上去  帖子就打不开了   我喜欢你能把除音乐文件以那样的形式展出  
其他文件的形式都想像这样 好些
回复

使用道具 举报

djansan 发表于 2010-2-22 07:40:47 | 显示全部楼层
谢谢楼主的回复!!你的插件已经用上!!谢谢了!官方那些卖钱的要气死了!!我买了三个!现在他们都不理我!哎!杯具!!
回复

使用道具 举报

了了在线 发表于 2010-2-22 08:54:01 | 显示全部楼层
为什么我上传老是碰到http://file.rayfile.com:8421/en/ctrlupload/?830cd787-6217-c1c8-b032-6284c00de548

真郁闷!不知道能不能帮忙解决
回复

使用道具 举报

 楼主| 竹片子 发表于 2010-2-22 09:04:29 | 显示全部楼层
您好,刚用上。但不能播放。
网址:http://www.776city.com/viewthread.php?tid=449&page=1&extra=#pid138 ...
canonsiu 发表于 2010-02-22 00:48


请确定是否上传了getrayfileurl.php?我检查了一下你的某个调用地址,例如:http://www.776city.com/getrayfileurl.php?rayfilecode=d0181c14-1f08-11df-9b9b-0015c55db73d&type=.mp3返回404错误,应该是没有上传getrayfileurl.php引起的。
回复

使用道具 举报

德清 发表于 2010-2-22 09:06:56 | 显示全部楼层
竹片子兄 我的什么问题呢
回复

使用道具 举报

了了在线 发表于 2010-2-22 09:14:20 | 显示全部楼层
明白了  没写邮件
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-24 07:55 , Processed in 0.146144 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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