2010年8月21日星期六

Sablog 2.0 增加UBB标签 之 [FLV]

1.打开include/func/front.func.php,搜索


view source

print?











1// 高亮显示PHP




在上面填加

// flv播放器
function makeflv($id) {
$code = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="450" height="350"><param name="movie" value="/flvplayer.swf"><param name="quality" value="high"><param name="allowFullScreen" value="true" /><param name="FlashVars" value="vcastr_file='.$id.'&LogoText=www.mytension.cn&DefaultVolume=100" /><embed src="/flvplayer.swf" allowFullScreen="true" FlashVars="vcastr_file='.$id.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="350"></embed></object>';
return $code;
}

打开 modulesarticle.php 以及  modulesshow.php 找到


view source

print?











1//处理PHP高亮




在上面加上:


view source

print?











1//处理FLV










2     $article['content'] = preg_replace("/s*[flv](.+?)[/flv]s*/ies", "makeflv('\1')", $article['content']);




上传压缩包解压文件放至主目录flv.rar

其实就和添加MP3同理

调用方法[FLV]FLV地址[/FLV]