[問題]Attach Mod 多媒體檔名問題!
發表於 : 2004-11-21 20:11
請問一下前輩,Attach Mod提供很多不同的副檔名做多媒體的資源!
如用wmv時可以線上播放,不知道rm是否也可以做到\r
我試過將rm檔加入,但好像沒辦法線上播放!
有人試過嗎???
謝謝~請指教
如用wmv時可以線上播放,不知道rm是否也可以做到\r
我試過將rm檔加入,但好像沒辦法線上播放!
有人試過嗎???
謝謝~請指教
代碼: 選擇全部
此為 media player
<OBJECT ID="WMPlay" WIDTH=320 HEIGHT=240
CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/
nsmp2inf.cab#Version=6,4,5,715"
STANDBY="Loading Microsoft? Windows Media? Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="****.mpg">
<PARAM NAME="ShowControls" VALUE="False">
<PARAM NAME="AutoRewind" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
</OBJECT>
<br>
<br>
此為 realplayer
<OBJECT ID=RAOCX CLASSID=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA WIDTH=320 HEIGHT=240 align="middle">
<PARAM NAME=controls VALUE=imagewindow>
<PARAM NAME=console VALUE=Clip1>
<PARAM NAME=autostart VALUE=True>
<PARAM NAME=controls VALUE=playbutton>
<PARAM NAME=controls VALUE=PositionSlider>
<PARAM NAME=src VALUE=****.rm>
<EMBED HEIGHT=144 WIDTH=176 src=*.rm CONTROLS=imagewindow AUTOSTART=false console=Clip1 plugpage=http://www.real.com></embed>
</OBJECT> 代碼: 選擇全部
在\r
if ($stream)
{
找到 $template->assign_block_vars('postrow.attach.cat_stream', array(
在之前加上:
if(strrchr ($filename,".")=='.rm') // 判斷是否副檔名為 rm
{
$template->assign_block_vars('postrow.attach.realplayer', array(
'U_DOWNLOAD_LINK' => $filename,
'S_UPLOAD_IMAGE' => $upload_image,
'U_DOWNLOAD_LINK' => append_sid('download.' . $phpEx . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),
'DOWNLOAD_NAME' => $display_name,
'FILESIZE' => $filesize,
'SIZE_VAR' => $size_lang,
'COMMENT' => $comment,
'L_DOWNLOADED_VIEWED' => $lang['Viewed'],
'L_DOWNLOAD_COUNT' => sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']))
);
}
else
{
找到\r
'L_DOWNLOAD_COUNT' => sprintf($lang['Download_number'],$attachments['_' . $post_id][$i]['download_count']))
);
在 ; 之後加上 }
代碼: 選擇全部
找到 <!-- END cat_stream -->
在之後加上
<!-- BEGIN realplayer -->
<div align="center"><hr width="95%" /></div>
<table width="95%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="2" class="attachheader" align="center"><b><span class="gen">{postrow.attach.realplayer.DOWNLOAD_NAME}</span></b></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed"> {L_DESCRIPTION}:</span></td>
<td width="75%" class="attachrow">
<table width="100%" border="0" cellpadding="0" cellspacing="4" align="center">
<tr>
<td class="attachrow"><span class="genmed">{postrow.attach.realplayer.COMMENT}</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed"> {L_FILESIZE}:</span></td>
<td width="75%" class="attachrow"><span class="genmed"> {postrow.attach.realplayer.FILESIZE} {postrow.attach.realplayer.SIZE_VAR}</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed"> {postrow.attach.realplayer.L_DOWNLOADED_VIEWED}:</span></td>
<td width="75%" class="attachrow"><span class="genmed"> {postrow.attach.realplayer.L_DOWNLOAD_COUNT}</span></td>
</tr>
<tr>
<td colspan="2" align="center"><br />
</OBJECT>
<br>
<br>
<OBJECT ID=RAOCX CLASSID=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA WIDTH=320 HEIGHT=240 align="middle">
<PARAM NAME=controls VALUE=imagewindow>
<PARAM NAME=console VALUE=Clip1>
<PARAM NAME=autostart VALUE=True>
<PARAM NAME=controls VALUE=playbutton>
<PARAM NAME=controls VALUE=PositionSlider>
<PARAM NAME=src VALUE={postrow.attach.realplayer.U_DOWNLOAD_LINK}>
<EMBED HEIGHT=144 WIDTH=176 src={postrow.attach.realplayer.U_DOWNLOAD_LINK} CONTROLS=imagewindow AUTOSTART=false console=Clip1 plugpage=http://www.real.com></embed>
</OBJECT>
<br /><br />
</td>
</tr>
</table>
<div align="center"><hr width="95%" /></div>
<!-- END realplayer -->