hello all

made a small player integration into coppermine gallery for FLV-Videos

im no php pro or such .DD
what ull see if u r one *smile*
but it works and was the thing i needed

here are coming the install instructions:
1. download filetype editor MOD
http://forum.coppermine-gallery.net/index.php?topic=24186.msg111120#msg1111202. make new filetype "flv application/x-shockwave-flash movie Flash player"
3. open theme.php (if code isnt insde paste the function "theme_html_picture" from /theme/sample/theme.php)
a) search for
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
}
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";
}
replace with
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
}
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
$pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=false\" />";
$pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
$pic_html .= "</object><br />\n";
} else {
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";
}
}
b)
if u got problem with browser asking for plugin (on watchin other videos avi,mpg,wmf...) but the right one is installed:
search for
$pic_html = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
replace with
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
4. download the flvplayer package from
http://www.jeroenwijering.com/?item=Flash_Video_Player and upload "flvplayer.swf" to gallery root
5. upload flv files and watch them on ur site

hf

°gwenny
