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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] 上传的音乐附件(MP3/WMV/RM/FLASH)在线播放 For 4.10 By Oytktk

[复制链接]
oytktk 发表于 2006-3-24 18:52:22 | 显示全部楼层 |阅读模式
Oytktk(靖飒)带 您 欣 赏 时 间

http://www.huasa.net/bbs/viewthread.php?tid=3234
http://www.huasa.net/bbs/viewthread.php?tid=4694
http://www.huasa.net/bbs/viewthread.php?tid=4695


▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷



[发布编号]:靖字     第:0004

[插件名称]:上传的音乐附件(MP3/WMV/RM/FLASH)在线播放

[适用版本]: Discuz! 4.1.0

[插件作者]:Oytktk(靖飒)

[插件发布]:Powered by 上海华飒科技   © 2006

[发布日期]:2006-4-15

[插件用途]:


将用户上传到论坛上的音乐或视频类型的文件以播放器播放的形式体现在页面上.

▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷


关于安装与使用的说明

一、需要修改的文件列表:
1、模板(viewthread.htm)
2、viewthread.php

二、修改文件完毕并上传至您的服务器以后,您将需要在您的后台“更新缓存”方可使用!

方法:

1. 模板(viewthread.htm)

查找:

  1.                                 <br><br>$attach[attachicon]
  2.                                 <!--{if $attach['attachimg']}-->
  3.                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attach_img}</a>:
  4.                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
  5.                                         <!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br><br>
  6.                                         <!--{if $attachrefcheck}-->
  7.                                                 <img src="attachment.php?aid=$attach[aid]&noupdate=yes" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('attachment.php?aid=$attach[aid]');}" onmousewheel="return imgzoom(this);">
  8.                                         <!--{else}-->
  9.                                                 <img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('$attachurl/$attach[attachment]');}" onmousewheel="return imgzoom(this);">
  10.                                         <!--{/if}-->
复制代码


替换为:


  1.                                 <br><br>$attach[attachicon]
  2.                                 <!--{if $attach['attachimg']}-->
  3.                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attach_img}</a>:
  4.                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
  5.                                         <!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br><br>
  6.                                         <!--{if $attachrefcheck}-->
  7.                                                 <img src="attachment.php?aid=$attach[aid]&noupdate=yes" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('attachment.php?aid=$attach[aid]');}" onmousewheel="return imgzoom(this);">
  8.                                         <!--{else}-->
  9.                                                 <img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='{lang image_open_zoom}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(!this.resized) {return false;} else {window.open('$attachurl/$attach[attachment]');}" onmousewheel="return imgzoom(this);">
  10.                                         <!--{/if}-->
  11.                                 <!--{elseif $attach['attachwmv']}-->
  12.                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">影音附件</a>:
  13.                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
  14.                                         <!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br><br>
  15.                                                 <object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="450" height="340" ><PARAM NAME="AUTOSTART" VALUE="true" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="attachment.php?aid=$attach[aid]&noupdate=yes">
  16.                                                 <embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="attachment.php?aid=$attach[aid]&noupdate=yes" width="420" height="340"></embed></object>
  17.                                 <!--{elseif $attach['attachrm']}-->
  18.                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">影音附件</a>:
  19.                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
  20.                                         <!--{if $attach['description']}-->[{$attach[description]}]<!--{/if}--> <a href="attachment.php?aid=$attach[aid]" target="_blank" class="bold">$attach[filename]</a> ($attach[dateline], $attach[attachsize])<br><br>
  21.                                                 <object width="420" height="280" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player_name" viewastext>
  22.                                                     <param name="Autostart" value="-1"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master">
  23.                                                         <param name="LOOP" value="0"><param name="CENTER" value="0"><param name="_ExtentX" value="9525"><param name="_ExtentY" value="7938"><param name="SHUFFLE" value="0">
  24.                                                     <param name="PREFETCH" value="0"><param name="NOLABELS" value="0"><param name="NUMLOOP" value="0"><param name="MAINTAINASPECT" value="0"><param name="BACKGROUNDCOLOR" value="#000000">
  25.                                             </object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=68 width="420" VIEWASTEXT>
  26.                                                       <param name="_ExtentX" value="9525"><param name="_ExtentY" value="1693"><param name="Autostart" value="-1"><param name="LOOP" value="0"><param name="CENTER" value="0">
  27.                                                         <param name="SRC" value="{$attachurl}\{$attach[attachment]}"><param name="SHUFFLE" value="0"><param name="PREFETCH" value="0"><param name="NOLABELS" value="0"><param name="NUMLOOP" value="0"><param name="MAINTAINASPECT" value="0">
  28.                                                         <param name="BACKGROUNDCOLOR" value="#000000"></object>
复制代码



2. viewthread.php

查找:

  1. $attach['attachimg'] = $attachimgpost && in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
复制代码


下面加:

  1.                                 $attach['attachwmv'] = $attachimgpost && in_array($extension, array('avi', 'wmv', 'mpg', 'swf', 'wav', 'wma', 'mp3', 'mid')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
  2.                                 $attach['attachrm'] = $attachimgpost && in_array($extension, array('rm', 'rmvb')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
复制代码



完工...

[ 本帖最后由 oytktk 于 2007-8-24 09:11 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
离恨天 发表于 2006-3-24 19:00:09 | 显示全部楼层
继续支持
回复

使用道具 举报

javascrif 发表于 2006-3-24 19:00:26 | 显示全部楼层
呵呵,不错,感谢分享!
回复

使用道具 举报

YY之王 发表于 2006-3-24 19:00:34 | 显示全部楼层
晕  装了无效...汗~~~~~
http://www.bengua.com/viewthread.php?tid=1231&extra=page%3D1

LZ请帮忙看下偶那里设置错了~

[ 本帖最后由 YY之王 于 2006-3-24 19:18 编辑 ]
回复

使用道具 举报

lu5266 发表于 2006-3-24 19:21:14 | 显示全部楼层
今天兄弟来这么多啊
哈哈
回复

使用道具 举报

amoshuang 发表于 2006-3-24 19:26:09 | 显示全部楼层
占位
回复

使用道具 举报

xjbl 发表于 2006-3-24 19:27:05 | 显示全部楼层
哦..
回复

使用道具 举报

zcbzw 发表于 2006-3-24 19:44:14 | 显示全部楼层
绝对支持
回复

使用道具 举报

jjpan 发表于 2006-3-24 19:47:33 | 显示全部楼层
强烈支持
回复

使用道具 举报

zjcx 发表于 2006-3-24 19:49:05 | 显示全部楼层
已用了靖枫for4.0的
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-29 01:11 , Processed in 0.122572 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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