參考阿杰老師的方法....在這裡
1.修改 includes/media.standard.php
找到
$smarty->assign('EMBED_CODE', htmlspecialchars($mediainfo->getEmbedCode($mediainfo->media_key)));
改成
$smarty->assign('EMBED_CODE', htmlspecialchars($mediainfo->getEmbedCode($mediainfo->getId())));
2.修改 includes/class.mediainformation.php
function getEmbedCode($mediaKey, $player = false) {
global $main;
return '<script type="text/javascript" src="'. $main->getConfig('base_url') .'js/embed.js.php?key='. $mediaKey . (($player) ? '#embedparam#' : '') .'"></script>';
}
改成舊版設定
function getEmbedCode($mediaId) {
global $main;
$playerWidth = $main->getConfig('player_emb_width');
$playerHeight = $main->getConfig('player_emb_height');
$baseURL = $main->getConfig('base_url');
$hostURL = $baseURL .'flashcomm.php';
$embedCode = array();
//$embedCode[] = '<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
name="c6a80378-3eb2-47e7-8415-ba1f7cff037e"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="'. $playerWidth .'" height="'. $playerHeight .'"
align="middle">';
//$embedCode[] = '<param name="movie" value="'. $baseURL
.'vimp.swf?mediaid='. $mediaId .'&hosturl='.
urlencode($hostURL) .'" />';
//$embedCode[] = '<param name="width" value="'. $playerWidth .'" />';
//$embedCode[] = '<param name="height" value="'. $playerHeight .'" />';
//$embedCode[] = '<param name="align" value="middle" />';
//$embedCode[] = '<param name="quality" value="high" />';
//$embedCode[] = '<param name="allowScriptAccess" value="always" />';
$embedCode[] = '<embed src="'. $baseURL .'vimp.swf?mediaid='. $mediaId
.'&hosturl='. urlencode($hostURL) .'" width="'. $playerWidth
.'" height="'. $playerHeight .'" align="middle" quality="high"
allowscriptaccess="always" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
//$embedCode[] = '</object>';
return implode('', $embedCode);
}
影片的連結為
<embed src="http://video.fyjh.tpc.edu.tw/vimp.swf?mediaid=389&hosturl=http%3A%2F%2Fvideo.fyjh.tpc.edu.tw%2Fflashcomm.php" width="480" height="360" align="middle" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>