当前位置:首页 > 多媒体 > Flash

解决discuz3.2 中无法显示swf( flash)的有关问题

优良自学吧提供解决discuz3.2 中无法显示swf( flash)的有关问题,解决discuz3.2 中无法显示swf( flash)的问题 文件 function_discuzcode.php, 中找到function parsemedia($params, $url) {} 然后用 function parsemedia($params, $url)

解决discuz3.2 中无法显示swf( flash)的问题

文件 function_discuzcode.php,

中找到function parsemedia($params, $url) {}

然后用

function parsemedia($params, $url) {
        $params = explode(',', $params);
        $width = intval($params[1]) > 800 ? 800 : intval($params[1]);
        $height = intval($params[2]) > 600 ? 600 : intval($params[2]);
        $url = addslashes($url);
        if($flv = parseflv($url, $width, $height)) {
                return $flv;
        }
        if(in_array(count($params), array(3, 4))) {
                $type = $params[0];
                $url = str_replace(array('<', '>'), '', str_replace('\\"', '\"', $url));
                switch($type) {
                        case 'mp3':
                        case 'wma':
                        case 'ra':
                        case 'ram':
                        case 'wav':
                        case 'mid':
                                return parseaudio($url, $width);
                        case 'rm':
                        case 'rmvb':
                        case 'rtsp':
                                $mediaid = 'media_'.random(3);
                                return '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'.$width.'" height="'.$height.'"><param name="autostart" value="0" /><param name="src" value="'.$url.'" /><param name="controls" value="imagewindow" /><param name="console" value="'.$mediaid.'_" /><embed src="'.$url.'" autostart="0" type="audio/x-pn-realaudio-plugin" controls="imagewindow" console="'.$mediaid.'_" width="'.$width.'" height="'.$height.'"></embed></object><br /><object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="'.$width.'" height="32"><param name="src" value="'.$url.'" /><param name="controls" value="controlpanel" /><param name="console" value="'.$mediaid.'_" /><embed src="'.$url.'" autostart="0" type="audio/x-pn-realaudio-plugin" controls="controlpanel" console="'.$mediaid.'_" width="'.$width.'" height="32"></embed></object>';
                        case 'flv':
                                $randomid = 'flv_'.random(3);
                                return '<span id="'.$randomid.'"></span><script type="text/javascript" reload="1">$(\''.$randomid.'\').innerHTML=AC_FL_RunContent(\'width\', \''.$width.'\', \'height\', \''.$height.'\', \'allowNetworking\', \'internal\', \'allowScriptAccess\', \'never\', \'src\', \''.STATICURL.'image/common/flvplayer.swf\', \'flashvars\', \'file='.rawurlencode($url).'\', \'quality\', \'high\', \'wmode\', \'transparent\', \'allowfullscreen\', \'true\');</script>';
                        case 'swf':
                                $randomid = 'swf_'.random(3);
                                return '<span id="'.$randomid.'"></span><script type="text/javascript" reload="1">$(\''.$randomid.'\').innerHTML=AC_FL_RunContent(\'width\', \''.$width.'\', \'height\', \''.$height.'\', \'allowNetworking\', \'internal\', \'allowScriptAccess\', \'never\', \'src\', \''.$url.'\', \'quality\', \'high\', \'bgcolor\', \'#ffffff\', \'wmode\', \'transparent\', \'allowfullscreen\', \'true\');</script>';
                        case 'asf':
                        case 'asx':
                        case 'wmv':
                        case 'mms':
                        case 'avi':
                        case 'mpg':
                        case 'mpeg':
                                return '<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'.$width.'" height="'.$height.'"><param name="invokeURLs" value="0"><param name="autostart" value="0" /><param name="url" value="'.$url.'" /><embed src="'.$url.'" autostart="0" type="application/x-mplayer2" width="'.$width.'" height="'.$height.'"></embed></object>';
                        case 'mov':
                                return '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'.$width.'" height="'.$height.'"><param name="autostart" value="false" /><param name="src" value="'.$url.'" /><embed src="'.$url.'" autostart="false" type="video/quicktime" controller="true" width="'.$width.'" height="'.$height.'"></embed></object>';
                        default:
                                return '<a href="'.$url.'" target="_blank">'.$url.'</a>';
                }
        }
        return;
}

 

来替换

 

 

 

 

 


(本文来自互联网,不代表搜站(http://www.ylzx8.cn/)的观点和立场)
本站所有内容来自互联网,若本站收录的信息无意侵犯了贵司版权,请给我们来信(ylzx8cn@163.com),我们会及时处理和回复,谢谢