| 
 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) 
 
查找: 
 
-                                 <br><br>$attach[attachicon]
 
 -                                 <!--{if $attach['attachimg']}-->
 
 -                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attach_img}</a>:
 
 -                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
 
 -                                         <!--{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>
 
 -                                         <!--{if $attachrefcheck}-->
 
 -                                                 <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);">
 
 -                                         <!--{else}-->
 
 -                                                 <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);">
 
 -                                         <!--{/if}-->
 
  复制代码 
 
替换为: 
 
 
-                                 <br><br>$attach[attachicon]
 
 -                                 <!--{if $attach['attachimg']}-->
 
 -                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">{lang attach_img}</a>:
 
 -                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
 
 -                                         <!--{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>
 
 -                                         <!--{if $attachrefcheck}-->
 
 -                                                 <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);">
 
 -                                         <!--{else}-->
 
 -                                                 <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);">
 
 -                                         <!--{/if}-->
 
 -                                 <!--{elseif $attach['attachwmv']}-->
 
 -                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">影音附件</a>:
 
 -                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
 
 -                                         <!--{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>
 
 -                                                 <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">
 
 -                                                 <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>
 
 -                                 <!--{elseif $attach['attachrm']}-->
 
 -                                         <a href="member.php?action=credits&view=getattach" title="{lang credits_policy_view}" target="_blank">影音附件</a>:
 
 -                                         <!--{if $attach['readperm']}-->, {lang readperm} $attach[readperm]<!--{/if}-->
 
 -                                         <!--{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>
 
 -                                                 <object width="420" height="280" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player_name" viewastext>
 
 -                                                     <param name="Autostart" value="-1"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master">
 
 -                                                         <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">
 
 -                                                     <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">
 
 -                                             </object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=68 width="420" VIEWASTEXT>
 
 -                                                       <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">
 
 -                                                         <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">
 
 -                                                         <param name="BACKGROUNDCOLOR" value="#000000"></object>
 
  复制代码 
 
 
2. viewthread.php 
 
查找: 
 
- $attach['attachimg'] = $attachimgpost && in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
 
  复制代码 
 
下面加: 
 
-                                 $attach['attachwmv'] = $attachimgpost && in_array($extension, array('avi', 'wmv', 'mpg', 'swf', 'wav', 'wma', 'mp3', 'mid')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
 
 -                                 $attach['attachrm'] = $attachimgpost && in_array($extension, array('rm', 'rmvb')) && (!$attach['readperm'] || $readaccess >= $attach['readperm']) ? 1 : 0;
 
  复制代码 
 
 
完工... 
 
[ 本帖最后由 oytktk 于 2007-8-24 09:11 编辑 ] |