forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Miscellaneous => Topic started by: gwendolyn on July 24, 2006, 02:39:36 am
-
hello all :D :D
made a small player integration into coppermine gallery for FLV-Videos :D :D
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#msg111120 (http://forum.coppermine-gallery.net/index.php?topic=24186.msg111120#msg111120)
2. 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 (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 ::) :P
°gwenny ::) :P
-
Thanks for this mod, very easy to implement exactly what I was looking for. Just have one small issue the .flv files seem to play properly in firefox, however in IE6 & 7 they don't work at all. The click to play screen will show but the file will not load?
I tried searching the forums @ http://www.jeroenwijering.com/?forum=Flash_FLV_Player . There were a few issues with the transparent tag and CSS, tried using but this did not fix the problem.
Current flash version installed.
Has anyone had this working in IE6 or 7? Or is this just a problem with me :'(
Any ideas?
-
seeking for a workaround :) :)
--->
also did not work for me :) :)
but now it works on
- IE6 on xp and win2000
thx for bugreport,
wouldnt have find it cause i dont use IE ::) :P
updated code plz rereplace :) :)
-
Works great in IE7 too. Thanks Again ;)
-
This looks great! It may be perfect for what I need.
Is there a demo out there or can you give me a link to a page where you use it on your site?
Is there a way to insert a site logo as watermark in the videos?
-
hi seeker :D:D
click here for http://213.239.198.200/atw/forumgallery/thumbnails.php?album=53 (http://213.239.198.200/atw/forumgallery/thumbnails.php?album=53) demo :D:D
about the watermarks,
i just can say,
resampling of the movie would be needed...
but me always uploaded flv files directly,
this is no mpg avi to flv mod...
and this would be a quiter bigger project i think...
cause of resampling the movies,
and dont know (right now) how to decode mpg to flv and such on linux,
but nice idea...
ill watch for myself for a workaround...
if ill have success, ill release it here in forum :D:D
-
thank you very very much.it was what i exactly looking for.works perfect HERE (http://www.cocktailshows.com/cpg/displayimage.php?album=21&pos=2)
-
WOW!!! I had posted earlier looking for an FLV solution and somehow missed this thread and MOD. I followed the instructions and BINGO - worked perfect the first time!!! YEAH!!
The only issue that I have now is that I did have some SWF files loaded that pointed to FLV files - these no longer work, so this might need to be looked at. The SWF/FLV combo files were created from Sorenson Squeeze 4.3 and the SWF file provided a way to load FLV video under SWF. I'm ok with this limitation, because my goal was only to show FLV files, but this might be a problem for someone else.
Thanks!
-
followed all instructions but i don't know where to put code I went to sample/themes to get code then placed in i dont want to put code on forum because im not sure if a long code is allowed i just need to know where exactlly to put the code and where to stop copying from in the sample themes. HELP ???
-
Got it to work but it doesnt work with my opera browser. Any help? Thanks
-
Why don´t work anything browser??? advices...?? :)
example, IE 7 screenshot: i click white screen, but not happend anything...
(http://xs411.xs.to/xs411/07022/flv_ie7_pic1.gif) (http://xs.to)
Thanks any help... :)
-
Screenshots or reports that just say "doesn't work for me" are not helpfull. Post actual (deep) links.
-
I´m sorry but my website not public yet.... :(
...separate my websites this working, but not copppermine gallerys.
Gallery version is: 1.4.10
Theme is: WaterDrop
sample.php files location: /home/admin/public_html/gallery/themes/sample
My flvplayer.swf files is location: /home/admin/public_html/gallery
My video.flv files is location: /home/admin/public_html/gallery/albums/userpics/10066/video.flv
Filetype mod is installed and add new filetype: flv application/x-shockwave-flash movie Flash player
This is my sample.php files stump...
...
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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";
}
}
etc...
I hope this info is help... thanks ;D
-
The sample theme is irrelevant and not being taken into account.
-
But where paste this code?
// 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";
}
}
My water drop themes no be this replace codes:
// 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";
}
This is my water drop theme.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.10
$Source$
$Revision: 3275 $
$Author: gaugau $
$Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/
define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
// you have validated it. See docs/theme.htm.
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';
?>
-
Ou.... Now working :)
I paste this code my water_drop/theme.php files...
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
-
i have a question.
is it possible to make your own player and integrate it using this code? if possible, how? and thanks :)
-
Great mod - nice job!
I guess that auto grabbing a thumbnail from the flv file would be pretty tricky?
-
That's a great mode!! I love it!!
On another hand,
I tried to modify the dimensions of the flv video in the following line:
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
I replaced it by
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"640\" height=\"480\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
I am doing this since i kept a VGA resolution for my flv videos. The issue is that while in 320x260 the video run smooth, in vga resolution it plays image by image instead.
Here is a link to the page playing in vga: http://ed.roquette.free.fr/photo/displayimage.php?album=87&pos=0
Is this because playing VGA resolutions is too demanding on the server?
Thanks!
-
I guess that auto grabbing a thumbnail from the flv file would be pretty tricky?
I've seen that done by rphMedia on his website (http://gallery.rphmedia.net/), albeit he was using wmv file (see here (http://gallery.rphmedia.net/thumbnails.php?album=15).
I'd be pretty curious to see how he does that.
-
Also already I made an modification to use FLV in the site, I am using the FLOWPLAYER. The result was excellent, sees… http://www.ortubes.com
-
Also already I made an modification to use FLV in the site, I am using the FLOWPLAYER. The result was excellent, sees… http://www.ortubes.com
I'm using firefox with Adblock, which is an extension allowing to block advertising. I cant see your videos. I am guessing this is due to the close integration of adsense with your videos.
Can you compare performance with the flash player mentioned before?
-
Hello -
Thank you for the instructions. I got flv to work on my website. I copied the code from Jape reply. It worked great with my eyeball theme. I do need help with one little thing though. How can I make the video play automatically without having to hit play button on the flv player?
-
That's a great mode!! I love it!!
On another hand,
I tried to modify the dimensions of the flv video in the following line:
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
I replaced it by
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"640\" height=\"480\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
I am doing this since i kept a VGA resolution for my flv videos. The issue is that while in 320x260 the video run smooth, in vga resolution it plays image by image instead.
Here is a link to the page playing in vga: http://ed.roquette.free.fr/photo/displayimage.php?album=87&pos=0
Is this because playing VGA resolutions is too demanding on the server?
The problem was not coming from the gallery or the server, but was due to the computer i was using :-[
-
Hello -
Thank you for the instructions. I got flv to work on my website. I copied the code from Jape reply. It worked great with my eyeball theme. I do need help with one little thing though. How can I make the video play automatically without having to hit play button on the flv player?
I guess it makes sense to post the code I used, before anyone can help.
here is the code
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
-
I've seen that done by rphMedia on his website (http://gallery.rphmedia.net/), albeit he was using wmv file (see here (http://gallery.rphmedia.net/thumbnails.php?album=15).
I'd be pretty curious to see how he does that.
rphMedia has PMed me to let me know that he had manually added the thumbnail.
-
I'm probably being thick but I cannot get videos to appear in any size larger than this
http://www.windsurf.me.uk/cpg133/displayimage.php?pos=-1424
Am I just missing something?
I just want videos to be able to be viewed in the size they were uploaded at.
-
This mod hardcodes the dimensions. Try changing
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
to
$pic_html = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
-
That's done the trick :)
Thanks for your help, I was running out of hair.
-
Unhappyly it does not function with the FIREFOX, only with the IE. Already I tested the IE7 and functioned perfectly, who to know the solution informs me. ???
I'm using firefox with Adblock, which is an extension allowing to block advertising. I cant see your videos. I am guessing this is due to the close integration of adsense with your videos.
Can you compare performance with the flash player mentioned before?
-
I can see my videos without any problem, after implementing the solution given by Nibbler.
Here is an example (http://ed.roquette.free.fr/photo/displayimage.php?album=88&pos=11).
However i still have a strange looking 640x480 window in which videos with smaller resolution plays. Here is an example (http://ed.roquette.free.fr/photo/displayimage.php?pos=-1941).
-
I've done the french traduction of the hack ;-)
-
So here, I am reading this, the video works perfect. But you see, on my gallery I also have enabled .swf files. Now odd things is, that they don't work while this is installed. Is there a way to fix this at all?
-
I think I'm doing something wrong, but I don't know what. All I get is a blank screen:
http://yingna.yinten.com/gallery/displayimage.php?album=4&pos=0
-
So here, I am reading this, the video works perfect. But you see, on my gallery I also have enabled .swf files. Now odd things is, that they don't work while this is installed. Is there a way to fix this at all?
Never mind, it fixed itself.
-
Never mind, it fixed itself.
My problem, isn't fixed. Well it is, if your using internet explorer(which mine is glitched). Firefox doesn't seem to work with the other swf's but the flv player works.
-
hello to all,
i want to modify coppermine as before described. I'll tried to copy the modified function into the theme
i had chosed. But always i get teh following error message:
""" Parse error: syntax error, unexpected $end in /usr/export/www/vhosts/funnetwork/hosting/empfl/cpg1410/themes/mac_ox_x/theme.php on line 369 """
What did i wrong ???
-
You didn't copy the code correctly, probably missed out one of the closing braces.
-
thx nibbler,
sometimes it work's suddenly on the second try ;-)
regards
-
Hello everyone,
I apologize if this has been answered but i've looked everywhere both here on copermine and on JW's site. I tried to make this modification but
my FLV files are not loading (or playing) all I get is a blank white screen. This is the case weather I am trying to view it on any browser (fire fox, IE 6, and IE 7).
I've tried all kinds of diffrent things like moving the files to different directories but nothing works.
Here is what I did:
1) I download the the FileType plug in and added the flv extension, application/x-shockwave-flash, movie and Flash Player to the list.
2) I then downloaded the Flash Video Player from JW's website and uploaded it to the root of the gallery (http://www.oiucmglobal.com/v2/gallery/).
3) I then uploaded a flv video (320K) using the Coppermine interface, wrote a description, type in the dimensions, and selected a album.
When I try to view as I said I get a white blank screen nothing else nothing at all.
Another thing that I noticed when the vieo file was uploaded it uploaded it to the gallery/albums/userpics/10001 directory and not the album I choose. Is this ok?
You should know that I am uploading the photos via batch and adding the videos via the coppermine upload interface one at a time. ANY HELP WOULD BE GREATLY APPRECIATED.
I have to get this site launched by monday 3/19/2007. Please help!!
Again here is the URL to the gallery: http://www.oiucmglobal.com/v2/gallery/
Below is my theme.php file ( I am using the default theme, classic). Thank you again.
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.10
$Source$
$Revision: 3275 $
$Author: gaugau $
$Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// 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 = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
?>
Than you everyone!
-
It doesn't work for me. The flv player appears, but it seems don't have loaded the file.
Here you have a screenshot.
Thank you
-
I have had the same problem as the posters bero, the videos didn't start. But I found the solution, there's a small bug in the orginal code.
In the code which should be inserted into theme.php there is this line:
$pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=false\" />";
Replace it with this one and everything should be fine:
$pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv&autoStart=false\" />";
The problem was that there was standing flvplayer.swf?file=$flv?autoStart=false but it should be flvplayer.swf?file=$flv&autoStart=false
Hope it will help some of you :)
-
I have EXACTLY the same problem as padelpro. I tried the fix in the post just above this, changing '?' to '&', but it didn't solve the problem.
-
Hi Guys,
I did as the points on the 1st post sail, but it's not showing me the video.
Here you can see that the flvplayer.swf is loaded bu no movie is seen
http://www.davorceh.com/galerija/displayimage.php?album=47&pos=0
This is my theme.php
Theme.php had all entries removed in my theme.
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.8
$Source$
$Revision: 3116 $
$Author: gaugau $
$Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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['clsid'].$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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
Any hints? The video I uploaded was video.flv which is working fine if I open with internet explorer. I tried IE7 an FIrefox.
Thanks for the help
-
Admin please delete my previous post - I found what was wrong - my fault
I can't find where to delete my post.
-
It's working great but there is a bug if you change the width and height of the movie.
It's always default - small
For all other non flv movies this works, but not for flv with the timebar. I also tried to change default values in the theme.php but still the same.
Any hints?
-
Admin please delete my previous post
We don't delete posts - the whole point of support boards is that postings remain even if the issue is solved.
I found what was wrong - my fault
You should have posted what you did to solve your issues for others with similar issues.
I can't find where to delete my post.
We don't allow you to do so, as suggested above. Users could render a thread useless if they were allowed to edit or delete their postings. It's because of people like you why we had to remove the edit feature, with drawbacks for users who would want the edit feature for legitimate purposes. Review your attitude - consider what a support board is meant for.
It's working great but there is a bug if you change the width and height of the movie.
Be carefull when shouting bug, as you're accusing coders to have made a mistake even if the problem lies on your end.
-
It doesn't work for me. The flv player appears, but it seems don't have loaded the file.
Here you have a screenshot.
Thank you
I have the same problem
-
I am so confused, it's not even funny. I promise I'm not normally this slow. My problem lies in the fact that the theme I'm using doesn't include the function theme_html_picture, so I'm not entirely sure which parts of the sample to copy over.
This is the code I have now:
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2005 Coppermine Dev Team
v1.1 originaly written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.3
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.13 $
$Author: donnoman $
$Date: 2005/12/04 03:22:35 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
?>
Can someone help me with what all I need to add to get this to work?
Thank you!
-
3. open theme.php (if code isnt insde paste the function "theme_html_picture" from /theme/sample/theme.php)
Copy just the theme_html_picture() function over from the sample theme as suggested. Then modify it.
-
I am so confused, it's not even funny. I promise I'm not normally this slow. My problem lies in the fact that the theme I'm using doesn't include the function theme_html_picture, so I'm not entirely sure which parts of the sample to copy over.
This is the code I have now:
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2005 Coppermine Dev Team
v1.1 originaly written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.3
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.13 $
$Author: donnoman $
$Date: 2005/12/04 03:22:35 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
?>
Can someone help me with what all I need to add to get this to work?
Thank you!
Man guys. I'm a dork. So sorry to waste your time. the ?>
was my problem. I was putting the theme below it. I hope this is the end of my stupidity today... hmm. :o
-
I have EXACTLY the same problem as padelpro. I tried the fix in the post just above this, changing '?' to '&', but it didn't solve the problem.
I'm having this same problem as well. I was able to get it to work with rphMedia version of the player, but it won't work with this version which I would prefer. Thanks in advance!
-
I'm having this same problem as well. I was able to get it to work with rphMedia version of the player, but it won't work with this version which I would prefer. Thanks in advance!
I think i have a soloution to the jeroenwijering player not loading correctly (showing half buffered but not playing)
i changed part of my code to use an <embed> tag rather than the <object> tag stated
This is what i had when it was not loading correctly
// 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";
This is the code i have now
// 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 = "<embed src='flvplayer.swf' width='400' height='400'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
the only downside i can see is that the other code may have changed the size of the flash player to suit the FLV file.
Sorry if i have misspelt anything stupid education >.<
-
thanks man it worked perfectly for me !!!
but just a problem, I can't have the fullscreen :( when I click on the button
-
Great, this is exactly what I am looking for. Does it work with youtube and photobucket? Can I just get the link to the flv file and it runs well?
Thanks for the great work.
-
thanks man it worked perfectly for me !!!
but just a problem, I can't have the fullscreen :( when I click on the button
its ok it was buging me as well.
and for the full screen yer your right it doesent seem to work ill have a play around with the script :)
-
its ok it was buging me as well.
and for the full screen yer your right it doesent seem to work ill have a play around with the script :)
ok found a soloution
first upload the swfobject.js file from the JW player download to the coppermine root folder
now modify the template.html file for your theme and add this line to the head section
<script type="text/javascript" src="swfobject.js"></script>
now just change the code in theme.php from
// 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 = "<embed src='flvplayer.swf' width='400' height='400'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
to
// 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 = "<p id='player1'><a href='http://www.macromedia.com/go/getflashplayer'>Get the Flash Player</a> to see this player.</p>";
$pic_html .= "<script type='text/javascript'>";
$pic_html .= "var s1 = new SWFObject('flvplayer.swf','single','400','400','7');";
$pic_html .= "s1.addParam('allowfullscreen','true');";
$pic_html .= "s1.addVariable('file','$flv');";
$pic_html .= "s1.addVariable('image','preview.jpg');";
$pic_html .= "s1.write('player1');";
$pic_html .= "</script>";
you can play around with the variables to change the player height and width ect.
Not sure what the number 7 or the words single are yet.. will look in the js file
will make a full tut from the start if anyone wants one and where is the best place to post it
-
You can keep the embed, just insert these:
allowfullscreen="true" allowscriptaccess="always" before the tag ends.
Here's a readme from the author:
http://www.jeroenwijering.com/extras/readme.html
This is what I'm currently using:
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 640; // Default width
$CURRENT_PIC_DATA['pheight'] = 480; // Default height
}
$CURRENT_PIC_DATA['pwidth']-=26; // black bars on sides for me for some reason
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"flvplayer.swf\" width='".$CURRENT_PIC_DATA['pwidth']."' height='".$CURRENT_PIC_DATA['pheight']."' allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";
}
In the code above, I've also made it so that the video uses the image thumbnail as preview image. If the intermediate image is available (normal_ for me), it will use that, which should be a much higher quality image seeing as the intermediate image would have no other purpose here.
-
Here is the same code again, only this time with remote video linking. Basically, you can have the flv hosted elsewhere and just add a file with the url to your gallery.
1. The file you would upload would be a simple txt file with nothing but the URL to the flv file. The extension of this file would be .flvtxt
2. Same way you added the flv extension to coppermine, now add .flvtxt also as a Flash movie.
And use this code in your theme (includes features from previous post as well):
if ($mime_content['content']=='movie' && $mime_content['mime']=='application/x-shockwave-flash') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 640; // Default width
$CURRENT_PIC_DATA['pheight'] = 480; // Default height
}
$CURRENT_PIC_DATA['pwidth']-=26; // black bars on sides for me for some reason
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
if($mime_content['extension']!='flv') {
$flvcheck = fopen($flv,"r");
$flv=fgets($flvcheck);
fclose($flvcheck);
}
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"flvplayer.swf\" width='".$CURRENT_PIC_DATA['pwidth']."' height='".$CURRENT_PIC_DATA['pheight']."' allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";
}
It will still check for the thumbs and intermediate images as if no video linking exists (it will not look for thumbnails on the remote url).
The only problem is that for remotely linked flvs, (flvtxt) it does not seem to download automatically until you click Play. If anyone knows another way around this, that'd be great.
-
HELP!!! http://www.usiba.ru/gallery/displayimage-lastup-0-0.html (http://www.usiba.ru/gallery/displayimage-lastup-0-0.html)
Three days i am soared... :P
-
FireFox 2.0.0.4 not work?
-
Works for me in Firefox 2.0.0.6
-
Thanks, all is worked. How to make everyone image video by himself...?
-
This mod doesn't deal with creating a video. Please don't ask for support on unrelated issues on this thread.
-
There was in view of at each video a picture...
As here
http://ed.roquette.free.fr/photo/displayimage.php?album=87&pos=0
Sorry for my bad Russian-English....
-
Hello!
Can anybody upload/zipped/ this modded coppermine?
Thanks!
-
Impossible due to copyright issues and because the files alone won't help you much. Follow the instructions posted in this thread. There is no easier method available. If you have issues follwing them, post your actual question. Don't expect to be spoon-fed.
-
Understand.
Today i uploaded the modded theme, the new filetype in the database, and the flwplayer. I downloaded from the site was written here, but there are different filenames: not flvplayer.swf, but jw_allvideos_player.swf. I renamed it to flvplayer.swf.
In mozilla firefox, the browser can't play the file: unknown filetype: video/f-flv. In IExplorer i can see only a black area, without a video.
my site: www.dirtydanceteam.hu/index.php
-
In my opinion i have a mistake in my flv player installation. In the zip file, i downloaded for coppermine, there is a map, named: plugin_jw_allvideos, and two file: plugin_jw_allvideos.php and plugin_jw_allvideos.xml. Where should i upload these? I uploaded them, but i dont know, how to install this plugin, or how to use them. In the zip file isn't any readme file. ???
-
Hi, I followed the instructions and in filetypes I put in extention: flv MIME type application/x-shockwave-flash, Content type : movie, Associated player: Flash player. Whe I upload a movie.flv I get this message that no files were uploaded and the error message is that the file exeeded the kb's in the aplication while I put it very high for testing. I have coppermine now locally on a xammp server to test it but is it correct hat some settings don't get in the db? I tried to switch from Dutch to English so I could give you the exact error message but it stays on Dutch after saving.
Jeroen ;)
-
Have you tried a smaller .flv file?
You may be exceeding the size limit set in your PHP installation such as post_max_size, upload_max_filesize etc. Check your php info (from admin tools) to see.
-
Hi, I followed your instructions.Upload goes ok but if I don't see any movie an no player too. I did all the codechanges in themes/sample/theme.php is this not correct? Please help I want this function so badly.
Jeroen :)
-
Hi, I followed your instructions.Upload goes ok but if I don't see any movie an no player too. I did all the codechanges in themes/sample/theme.php is this not correct? Please help I want this function so badly.
Jeroen :)
What theme are you using? You need to edit theme.php for whatever theme you are using. So if your theme is Eyeball you need to edit themes/eyeball/theme.php
-
Yes, that's logical but how do I do this? Just placed the code in? Because I found the the code from the examples in this forum only in sample/theme.php
Jeroen
-
Yes, that's logical but how do I do this? Just placed the code in? Because I found the the code from the examples in this forum only in sample/theme.php
Jeroen
As suggested in the first post on this thread, you need to copy the relavent function.
"3. open theme.php (if code isnt insde paste the function "theme_html_picture" from /theme/sample/theme.php)"
Zip and attach your theme.php to your next post. And post a link you your site.
-
@Jeroen.php: you constantly seem to disrespect board rules and common sense. From now on, your postings will be monitored closely. You are welcome to ask questions, but it's mandatory to respect board rules and to read thoroughly before asking questions. Phil patiently answered your questions, but the level of tolerance that you can expect from supporters will decrease if you keep on displaying in your postings that you don't pay enough attention. Review your attitude.
-
Hi, I installed this plugin and it is awesome on windows but when I play it on a mac it doesn't show up, it just shows a blank. Flash is installed on the mac I am on and is updated. Youtube and other flash sites show up fine. I am not sure if it is a template or mod issue or not. Hope you can help because I really want this to work.
Thanks!
www.blackdeathmetal.com
-
I installed this plugin
It's not a plugin, but a mod.
-
MOD THEN, of course you understand what I was talking about. Any chance I can get help with this?
-
You already have another open thread named "Flash player does not seem to play on macs (http://forum.coppermine-gallery.net/index.php?topic=48669.0)" about a similar issue (regular flash content embedded into coppermine not working), so I can't see the point of trying to hijack this mod thread. You have an issue on your client that is unrelated and that the mod author here probably won't be able to solve, so you better not clutter this thread, but fix your client. You better do this where the Mac experts lurk. This board is not one of their favorite hangouts afaik.
-
Thanks, I actually thought it might be a problem with the mod so i didn't think that is what you call hijacking.
Thanks
-
I am getting a little bit confused with this thread as to what mod works and what doesn't.
There has been lots of different solutions offered, and i'm afraid trying them all may wreak havoc with any installation.
Has anybody gotten a working installation on Firefox and IE, allowing fullscreen to work? Would he kindly consider centralizing the modifications necessary? Or simply listing the numbers of the post to actually follow?
-
Well i thought i would get on and write a summing up of what i have done and what was the result. I hope it will save you a big share of the 4 or 5 hours it took me to work all of this out (i'm clearly am no coder).
Originally i had done this installation when this thread opened and had no issue whatsoever. My problems started when i updated the flv player with the new Jeroen version as i wanted to test the new full screen option. I started having the same exact issue as many posters in this thread, "the half baked player (http://ed.roquette.free.fr/photo/displayimage.php?pos=-2974)" when using Firefox.
To avoid any further mess, i restarted with a fresh theme.php where i added the "theme_html_picture()" function. You need to add the following code (http://forum.coppermine-gallery.net/index.php?topic=34182.msg159880#msg159880) at the beginning of your file, before the start of the "function theme_html_img_nav_menu()".
Once this was done i re-uploaded the new jeroen flvplayer and to let my player's fit to the video's size i followed Nibbler's advice and replaced this code
$pic_html = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
With this code
$pic_html = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
in theme.php
So far the result was the same as earlier (good with IE, bad with FF, no fullscreen). To prevent the issue to be caused by my browser, i deactivated all of my extension's and tried on two different OS (XP and Vista). This did not change anything.
I then followed basisbyte solution (http://forum.coppermine-gallery.net/index.php?topic=34182.msg202144#msg202144) but this did not make any difference.
I then implemented Madragonn's solution (http://forum.coppermine-gallery.net/index.php?topic=34182.msg221287#msg221287) but as a result had my entire player to disappear and only display a "Get the Flash Player to see this player" message. From the test i did afterward it is not the template's modification that cause the problem, but the theme.php mod.
I reverted back to my previous version, but left the swfobject.js file at the gallery's root.
I then tried PFTQ's advice and was successful in both having the player to come up in FF and to come up in full screen.
To do this you need to:
-upload the swfobject.js file from the JW player download to the coppermine root folder (Madragonn's solution)
-modify the template.html file for your theme and add this line to the head section:
<script type="text/javascript" src="swfobject.js"></script>
(this is still Madragonn's solution)
-Then change the code in theme.php from:
// 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 = "<embed src='flvplayer.swf' width='400' height='400'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
To
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 640; // Default width
$CURRENT_PIC_DATA['pheight'] = 480; // Default height
}
$CURRENT_PIC_DATA['pwidth']-=26; // black bars on sides for me for some reason
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"flvplayer.swf\" width='".$CURRENT_PIC_DATA['pwidth']."' height='".$CURRENT_PIC_DATA['pheight']."' allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";
(PTFQ's solution minus the final parenthesis).
The only issue i am having here is that the scroll bar's comportment is erratic, and does not show adequately the remaining time. The video needs to be played entirely once before it can show the actual remaining time.
To future proof my installation I have gone further with ptfq's mod and added the piece of code where he includes the possibility to link your flv's from a remote location. It works like a charm except for the scroll bar issue.
To sum it up, here is the code you will need to add in your theme.php before the function theme_html_img_nav_menu(). You will still however need to upload the js and swf files, change you template.html and do nibbler's mod to let your player change it size.
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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['mime']=='application/x-shockwave-flash') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 640; // Default width
$CURRENT_PIC_DATA['pheight'] = 480; // Default height
}
$CURRENT_PIC_DATA['pwidth']-=26; // black bars on sides for me for some reason
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
if($mime_content['extension']!='flv') {
$flvcheck = fopen($flv,"r");
$flv=fgets($flvcheck);
fclose($flvcheck);
}
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"flvplayer.swf\" width='".$CURRENT_PIC_DATA['pwidth']."' height='".$CURRENT_PIC_DATA['pheight']."' allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";
} 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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
-
Where do I place the function "theme_html_picture" code....I know where to get it from but when I pasted into "my" theme.php I received the following error:
Parse error: syntax error, unexpected $end in /hsphere/local/home/lrepton/sandrailsonly.com/coppermine/themes/plusxl_30/theme.php on line 288
I followed all the instructions herein, but am unsure of where placement should be.
Thanks.
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
?>
-
The code you posted isn't even 288 lines long.
-
I know...that is what I didn't understand....even when I added in the function code....
Does this code somehow link up to the sample "theme.php"?
Anyhow...can you tell me where it should be added please?
Thanks.
-
I am using the plusxl_30 theme.
:)
-
The instructions say to add the code before the function theme_html_nav_menu ...I did that and received the 288 line error.
USER:
------------------
Array
(
[ID] => 8a7145bdb9466d92ab653f601715b4b6
[am] => 1
[lang] => english
[liv] => Array
(
)
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => admin
[groups] => Array
(
[0] => 1
)
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 3
[custom_user_upload] => 0
[num_file_upload] => 5
[num_URI_upload] => 3
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Administrators
[upload_form_config] => 3
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
)
==========================
Queries:
------------------
Array
(
[0] => SELECT extension, mime, content, player FROM cpg140_filetypes; (0s)
[1] => select * from cpg140_plugins order by priority asc; (0s)
[2] => delete from `lrepton_coppermine`.cpg140_sessions where time<1201037919 and remember=0; (0.004s)
[3] => delete from `lrepton_coppermine`.cpg140_sessions where time<1199831919; (0s)
[4] => select user_id from `lrepton_coppermine`.cpg140_sessions where session_id=md5("e7e84395ad3b22946f4e806c107f10b9a0e677d6c59195ea2a49d104007f6c26"); (0s)
[5] => select user_id as id, user_password as password from `lrepton_coppermine`.cpg140_users where user_id=1 (0s)
[6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `lrepton_coppermine`.cpg140_users AS u INNER JOIN `lrepton_coppermine`.cpg140_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
[7] => SELECT user_group_list FROM `lrepton_coppermine`.cpg140_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
[8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg140_usergroups WHERE group_id in (1) (0.004s)
[9] => SELECT group_name FROM cpg140_usergroups WHERE group_id= 1 (0s)
[10] => update `lrepton_coppermine`.cpg140_sessions set time='1201041519' where session_id=md5('e7e84395ad3b22946f4e806c107f10b9a0e677d6c59195ea2a49d104007f6c26'); (0s)
[11] => SELECT user_favpics FROM cpg140_favpics WHERE user_id = 1 (0s)
[12] => DELETE FROM cpg140_banned WHERE expiry < '2008-01-22 13:38:39' (0s)
[13] => SELECT * FROM cpg140_banned WHERE (ip_addr='66.214.126.160' OR ip_addr='66.214.126.160' OR user_id=1) AND brute_force=0 (0.004s)
[14] => SELECT title,keyword from cpg140_albums WHERE aid='11' (0s)
[15] => SELECT COUNT(*) from cpg140_pictures WHERE ((aid='11' ) ) (0s)
[16] => SELECT * from cpg140_pictures WHERE ((aid='11' ) ) ORDER BY filename ASC LIMIT 0 ,1 (0s)
[17] => SELECT title, comments, votes, category, aid FROM cpg140_albums WHERE aid='11' LIMIT 1 (0s)
[18] => SELECT name, parent FROM cpg140_categories WHERE cid = '2' (0.004s)
[19] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM cpg140_comments WHERE pid='36' ORDER BY msg_id ASC (0.004s)
[20] => SELECT COUNT(*) FROM cpg140_pictures WHERE approved = 'NO' (0.004s)
[21] => SELECT title,keyword from cpg140_albums WHERE aid='11' (0s)
[22] => SELECT COUNT(*) from cpg140_pictures WHERE ((aid='11' ) ) (0s)
[23] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg140_pictures WHERE ((aid='11' ) ) ORDER BY filename ASC LIMIT 0 ,8 (0.004s)
)
==========================
GET :
------------------
Array
(
[album] => 11
[pos] => 0
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 5.2.3 - OK
------------------
mySQL version: 5.0.41-community-log
------------------
Coppermine version: 1.4.14(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:
==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.45
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | On | On
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/hsphere/shared/apache/libexec/php5ext/php/ | .:/hsphere/shared/apache/libexec/php5ext/php/
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.14 seconds - 24 queries in 0.028 seconds - Album set : ; Meta set: ;
-
I moved the swfobject.js and mediaplayer-3-14.swf into the sandrailsonly.com/coppermine/ folder.
I can view all other vids....mpg, wmv, avi...but cannot play the flv....
-
Now this is the error I get....Parse error: syntax error, unexpected $end in /hsphere/local/home/lrepton/sandrailsonly.com/coppermine/themes/plusxl_30/theme.php on line 279
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.4
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.15 $
$Author: gaugau $
$Date: 2006/02/24 13:32:45 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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['clsid'].$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";
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
-
You missed out a bracket in step 3a. Follow the instructions more carefully.
-
On what line please?
-
On what line please?
ok found it 259/260...
Changed this, no error, but blank FLV screen as previous jpg shows. Ugh....
???
-
OK....SO i corrected the bracket. No error now. But still not playing flv!
Uploaded the mediaplayer-3-14.swf and swfobject.js into Coppermine root folder = sandrailsonly/coppermine
I made the "Nibbler" code change in my template.html.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{LANG_DIR}">
<head>
<script type="text/javascript" src="swfobject.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="themes/plusxl_30/style.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
</head><body>
{CUSTOM_HEADER}
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" class="bodyline" >
<tr>
<td><table align="center" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="3" class="topnav"> </td>
</tr>
<tr>
<td align="left"><a href="index.php"><img src="themes/plusxl_30/images/phpbb2_logo_left.gif" height="35" border="0" alt="{GAL_NAME}" title="{GAL_NAME}" /></a></td>
<td class="topbkg" align="center" width="100%"><div class="maintitle" align="center">
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3>
</div></td>
<td align="right"><a href="index.php"><img src="themes/plusxl_30/images/phpbb2_logo_right.gif" height="35" border="0" alt="{GAL_NAME}" title="{GAL_NAME}" /></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="topnav" width="100%" align="center"> {SYS_MENU} <br />
{SUB_MENU} </td>
</tr>
</table>
<img src="images/spacer.gif" width="1" height="10" alt="" /> <br />
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td align="left" valign="top"> {ADMIN_MENU} {GALLERY} </td>
</tr>
</table>
<img src="images/spacer.gif" width="1" height="10" alt="" /> <br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"> {LANGUAGE_SELECT_FLAGS} </td>
</tr>
<tr>
<td align="center" valign="top"> {THEME_SELECT_LIST} {LANGUAGE_SELECT_LIST} </td>
</tr>
</table>
{CUSTOM_FOOTER}{VANITY} </td>
</tr>
<tr>
<td colspan="3" class="topnav" align="center"><div class="footer"><a href="http://sandrailsonly.com/" target="_blank">SandRailsOnly.com</a> © 2008</div></td>
</tr>
</table>
</body>
</html>
and here is my theme.php code
<?php/************************* Coppermine Photo Gallery ************************ Copyright (c) 2003-2006 Coppermine Dev Team v1.1 originally written by Gregory DEMAR This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ******************************************** Coppermine version: 1.4.4 $Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $ $Revision: 1.15 $ $Author: gaugau $ $Date: 2006/02/24 13:32:45 $**********************************************/// ------------------------------------------------------------------------- //// This theme has all CORE items removed //// ------------------------------------------------------------------------- //define('THEME_IS_XHTML10_TRANSITIONAL',1);// Added to display flim_stripfunction theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb'){ global $CONFIG, $THEME_DIR; global $template_film_strip, $lang_film_strip; static $template = ''; static $thumb_cell = ''; static $empty_cell = ''; static $spacer = ''; if ((!$template)) { $template = $template_film_strip; $thumb_cell = template_extract_block($template, 'thumb_cell'); $empty_cell = template_extract_block($template, 'empty_cell'); } $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat; $thumbcols = $CONFIG['thumbcols']; $cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%'; $i = 0; $thumb_strip = ''; foreach($thumb_list as $thumb) { //modify $new_size for max dimension of thumbnails in filmstrip $new_size = 65; preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE); $srcWidth=$matches[0][0]; preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE); $srcHeight=$matches[0][0]; $ratio = max($srcWidth, $srcHeight) / $new_size; $ratio = max($ratio, 1.0); $destWidth = (int)($srcWidth / $ratio); $destHeight = (int)($srcHeight / $ratio); $thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']); $thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']); $i ; if ($mode == 'thumb') { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => '' ); } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "index.php?cat={$thumb['cat']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => '', '{ADMIN_MENU}' => '' ); } $thumb_strip .= template_eval($thumb_cell, $params); } if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) { $tile1 = $THEME_DIR . 'images/tile1.gif'; $tile2 = $THEME_DIR . 'images/tile2.gif'; } elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) { $tile1=$tile2=$THEME_DIR . 'images/tile.gif'; } else { $tile1=$tile2= 'images/tile.gif'; } $params = array('{THUMB_STRIP}' => $thumb_strip, '{COLS}' => $i, '{TILE1}' => $tile1, '{TILE2}' => $tile2, ); ob_start(); starttable($CONFIG['picture_table_width']); echo template_eval($template, $params); endtable(); $film_strip = ob_get_contents(); ob_end_clean(); return $film_strip;}function theme_html_picture(){ global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER; global $album, $comment_date_fmt, $template_display_media; global $lang_display_image_php, $lang_picinfo; $pid = $CURRENT_PIC_DATA['pid']; $pic_title = ''; if (!isset($USER['liv']) || !is_array($USER['liv'])) { $USER['liv'] = array(); } // Add 1 to hit counter if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) { add_hit($pid); if (count($USER['liv']) > 4) array_shift($USER['liv']); array_push($USER['liv'], $pid); } if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored $condition = true; }elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){ $condition = true; }elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){ $condition = true; }else{ $condition = false; } if ($CURRENT_PIC_DATA['title'] != '') { $pic_title .= $CURRENT_PIC_DATA['title'] . "\n"; } if ($CURRENT_PIC_DATA['caption'] != '') { $pic_title .= $CURRENT_PIC_DATA['caption'] . "\n"; } if ($CURRENT_PIC_DATA['keywords'] != '') { $pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords']; } if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) { template_extract_block($template_display_media, 'img_desc'); } else { if (!$CURRENT_PIC_DATA['title']) { template_extract_block($template_display_media, 'title'); } if (!$CURRENT_PIC_DATA['caption']) { template_extract_block($template_display_media, 'caption'); } } $CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : ''; if ($CONFIG['make_intermediate'] && $condition ) { $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal'); } else { $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize'); } $image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']); $pic_title = ''; $mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']); if ($mime_content['content']=='movie' || $mime_content['content']=='audio') { if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) { $CURRENT_PIC_DATA['pwidth'] = 320; // Default width // Set default height; if file is a movie if ($mime_content['content']=='movie') { $CURRENT_PIC_DATA['pheight'] = 240; // Default height } } $ctrl_offset['mov']=15; $ctrl_offset['wmv']=45; $ctrl_offset['swf']=0; $ctrl_offset['rm']=0; $ctrl_offset_default=45; $ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default; $image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight'] $ctrl_height).'"'; } if ($mime_content['content']=='image') { if (isset($image_size['reduced'])) { $winsizeX = $CURRENT_PIC_DATA['pwidth'] 5; //the 's are the mysterious FF and IE paddings $winsizeY = $CURRENT_PIC_DATA['pheight'] 3; //the 's are the mysterious FF and IE paddings $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">"; $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title; $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />"; $pic_html .= "</a>\n"; } else { $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n"; } } elseif ($mime_content['content']=='document') { $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb'); $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />"; } else { $autostart = ($CONFIG['media_autostart']) ? ('true'):('false'); $players['WMP'] = array('id' => 'MediaPlayer', 'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ', 'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ', 'mime' => 'type="application/x-mplayer2" ', ); $players['RMP'] = array('id' => 'RealPlayer', 'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ', 'codebase' => '', 'mime' => 'type="audio/x-pn-realaudio-plugin" ' ); $players['QT'] = array('id' => 'QuickTime', 'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ', 'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ', 'mime' => 'type="video/x-quicktime" ' ); $players['SWF'] = array('id' => 'SWFlash', 'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ', 'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ', 'mime' => 'type="application/x-shockwave-flash" ' ); $players['UNK'] = array('id' => 'DefaultPlayer', 'clsid' => '', 'codebase' => '', 'mime' => '' ); if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) { $user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player']; } else { $user_player = $mime_content['player']; } // 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\" ".$image_size['whole']." 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['clsid'].$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"; }} $CURRENT_PIC_DATA['html'] = $pic_html; $CURRENT_PIC_DATA['header'] = ''; $CURRENT_PIC_DATA['footer'] = ''; $CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA); $params = array('{CELL_HEIGHT}' => '100', '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'], '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'], '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']), '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']), ); return template_eval($template_display_media, $params);}?>
I really need some help here guys and gals.... I'm dying here..... :'(
-
It is impossible to read your theme.php in that format.
It might be easier if you provided a link + test account
-
Sorry about that....
sandrailsonly.com/coppermine
user:testing
Pass: Id_Love_to
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.4
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.15 $
$Author: gaugau $
$Date: 2006/02/24 13:32:45 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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\" ".$image_size['whole']." 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['clsid'].$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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
-
oops I did it again....
Let me try this....
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.4
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.15 $
$Author: gaugau $
$Date: 2006/02/24 13:32:45 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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\" ".$image_size['whole']." 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['clsid'].$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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
-
Sorry...I copied it into Notepad and the copied/pasted here....don't know what's up...
But you have user/pass now...
-
Try changing flvplayer.swf to mediaplayer.swf, that could help you a lot :D
-
Oh my goodness...you are a godsend...
I changed two places from flvplayer.swf to mediaplayer.swf....
I now get the black screen with an arrow to click...
I click on the arrow...it shows loading from sandrailsonly.com for about 30 secs.....then just gives a blank screen. :o
Any more ideas on what I should mod....?
Thanks a bundle....
USER:
------------------
Array
(
[ID] => 8a7145bdb9466d92ab653f601715b4b6
[am] => 1
[lang] => english
[liv] => Array
(
)
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => admin
[groups] => Array
(
[0] => 1
)
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 3
[custom_user_upload] => 0
[num_file_upload] => 5
[num_URI_upload] => 3
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Administrators
[upload_form_config] => 3
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
)
==========================
Queries:
------------------
Array
(
[0] => SELECT extension, mime, content, player FROM cpg140_filetypes; (0s)
[1] => select * from cpg140_plugins order by priority asc; (0s)
[2] => delete from `lrepton_coppermine`.cpg140_sessions where time<1201139690 and remember=0; (0.012s)
[3] => delete from `lrepton_coppermine`.cpg140_sessions where time<1199933690; (0.004s)
[4] => select user_id from `lrepton_coppermine`.cpg140_sessions where session_id=md5("e7e84395ad3b22946f4e806c107f10b9a0e677d6c59195ea2a49d104007f6c26"); (0s)
[5] => select user_id as id, user_password as password from `lrepton_coppermine`.cpg140_users where user_id=1 (0s)
[6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `lrepton_coppermine`.cpg140_users AS u INNER JOIN `lrepton_coppermine`.cpg140_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.004s)
[7] => SELECT user_group_list FROM `lrepton_coppermine`.cpg140_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
[8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg140_usergroups WHERE group_id in (1) (0s)
[9] => SELECT group_name FROM cpg140_usergroups WHERE group_id= 1 (0s)
[10] => update `lrepton_coppermine`.cpg140_sessions set time='1201143290' where session_id=md5('e7e84395ad3b22946f4e806c107f10b9a0e677d6c59195ea2a49d104007f6c26'); (0s)
[11] => SELECT user_favpics FROM cpg140_favpics WHERE user_id = 1 (0s)
[12] => DELETE FROM cpg140_banned WHERE expiry < '2008-01-23 17:54:50' (0s)
[13] => SELECT * FROM cpg140_banned WHERE (ip_addr='66.214.126.160' OR ip_addr='66.214.126.160' OR user_id=1) AND brute_force=0 (0s)
[14] => SELECT COUNT(*) from cpg140_pictures WHERE approved = 'YES' (0s)
[15] => SELECT * FROM cpg140_pictures WHERE approved = 'YES' ORDER BY pid DESC LIMIT 0 ,1 (0.004s)
[16] => SELECT title, comments, votes, category, aid FROM cpg140_albums WHERE aid='11' LIMIT 1 (0s)
[17] => SELECT name, parent FROM cpg140_categories WHERE cid = '2' (0s)
[18] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM cpg140_comments WHERE pid='36' ORDER BY msg_id ASC (0s)
[19] => SELECT COUNT(*) FROM cpg140_pictures WHERE approved = 'NO' (0s)
[20] => SELECT COUNT(*) from cpg140_pictures WHERE approved = 'YES' (0s)
[21] => SELECT * FROM cpg140_pictures WHERE approved = 'YES' ORDER BY pid DESC LIMIT 0 ,8 (0s)
)
==========================
GET :
------------------
Array
(
[album] => lastup
[cat] => 0
[pos] => 0
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 5.2.3 - OK
------------------
mySQL version: 5.0.41-community-log
------------------
Coppermine version: 1.4.14(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:
==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.45
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | On | On
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/hsphere/shared/apache/libexec/php5ext/php/ | .:/hsphere/shared/apache/libexec/php5ext/php/
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.136 seconds - 22 queries in 0.024 seconds - Album set : ; Meta set: ;
-
What I meant that the code was debug info....
Here is theme.php as it is now.
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.4
$Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
$Revision: 1.15 $
$Author: gaugau $
$Date: 2006/02/24 13:32:45 $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// Added to display flim_strip
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
{
global $CONFIG, $THEME_DIR;
global $template_film_strip, $lang_film_strip;
static $template = '';
static $thumb_cell = '';
static $empty_cell = '';
static $spacer = '';
if ((!$template)) {
$template = $template_film_strip;
$thumb_cell = template_extract_block($template, 'thumb_cell');
$empty_cell = template_extract_block($template, 'empty_cell');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
$i = 0;
$thumb_strip = '';
foreach($thumb_list as $thumb) {
//modify $new_size for max dimension of thumbnails in filmstrip
$new_size = 65;
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcWidth=$matches[0][0];
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
$srcHeight=$matches[0][0];
$ratio = max($srcWidth, $srcHeight) / $new_size;
$ratio = max($ratio, 1.0);
$destWidth = (int)($srcWidth / $ratio);
$destHeight = (int)($srcHeight / $ratio);
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
$i++;
if ($mode == 'thumb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => '',
'{ADMIN_MENU}' => ''
);
}
$thumb_strip .= template_eval($thumb_cell, $params);
}
if (defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
$tile1 = $THEME_DIR . 'images/tile1.gif';
$tile2 = $THEME_DIR . 'images/tile2.gif';
} elseif (defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
$tile1=$tile2=$THEME_DIR . 'images/tile.gif';
} else {
$tile1=$tile2= 'images/tile.gif';
}
$params = array('{THUMB_STRIP}' => $thumb_strip,
'{COLS}' => $i,
'{TILE1}' => $tile1,
'{TILE2}' => $tile2,
);
ob_start();
starttable($CONFIG['picture_table_width']);
echo template_eval($template, $params);
endtable();
$film_strip = ob_get_contents();
ob_end_clean();
return $film_strip;
}
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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\" ".$image_size['whole']." wmode=\"transparent\" data=\"mediaplayer.swf?file=$flv?autoStart=false\">";
$pic_html .= "<param name=\"movie\" value=\"mediaplayer.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['clsid'].$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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
-
Correction: when trying to play the flv.....the "transferring data from SandRailsOnly.com" goes one for almost 1 1/2 minutes until it says done...
flv file is 1.05 mb
avi file is 1.94 mb
mpg file is 3.50 mb
wmv file is 2.51 mb
avi loads right away as does mpg...wmv is a tad slower and you need to push play button.....and flv doesn't load at all...just stalls.
-
Anyone have suggestions as where I should go next?
Thanks for all of your input....
-
Have you read the entire thread, you might want to try the code at the bottom of this post (http://forum.coppermine-gallery.net/index.php?topic=34182.msg234046#msg234046)
-
That did the trick, except that I didn't find Nibbler's Code to change to
$pic_html = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
in Popersman's final edition of code to make the flv "mediaplayer" work.
Also, not that this code needed the replacement of flvplayer.swf to mediaplayer.swf.
;)
-
But shouldn't it really say
$pic_html = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"mediaplayer.swf?file=$flv?autoStart=false\">";
And where should it be placed?
-
Still waiting on an answer folks.... ;D
-
This is not a hotline... ::)
-
Sorry, I am just trying to get the final details so that when folks visit our site they get the best impression of us and the software (Coppermine) that is being used. If the function to make the flv player larger isn't working and there is a way to make it work...I just want to apply it.
See above where I searched for Nibbler's code and did not find it in the final code posting.
Thanks in advance for any input.
:)
-
I don’t know if this is the right thing to do since Jeroen Wijering's player is not free/OSS but I missed the full-screen capability sooo much :)
This is an Update for already running (an working!) FLV Player MODs
Testsystem: CPG 1.4.14 and JW-FLV-Player Mediaplayer-3-14
Video width=440, height=330
1. Go to http://www.jeroenwijering.com/?item=JW_FLV_Player (http://www.jeroenwijering.com/?item=JW_FLV_Player) and ready the license agreement if it is suitable for you and your site. Download the mediaplayer-3-14.zip and unzip it somewhere.
2. open your themen.php and search for
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
...
} else {
...
}
}
And replace with
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
}
$player = $players[$user_player];
if ($mime_content['extension'] == "flv") {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$descript = $CURRENT_PIC_DATA['title'];
$pic_html = "<script type=\"text/javascript\" src=\"swfobject.js\"></script>
<div id=\"container\" style=\"width: 440px; height: 330px\"></div>
<script type=\"text/javascript\">
var s1 = new SWFObject(\"mediaplayer.swf\",\"mediaplayer\",\"440\",\"330\",\"7\");
s1.addParam(\"allowfullscreen\",\"true\");
s1.addVariable(\"width\",\"440\");
s1.addVariable(\"height\",\"330\");
s1.addVariable(\"file\",\"$picture_url\");
s1.addVariable(\"image\",\"$pic_thumb_url\");
s1.write(\"container\");
</script>";
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"src\" value=\"". $picture_url . "\" /><param name=\"ShowControls\" value=\"1\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"ShowStatusBar\" value=\"1\" /><param name=\"ShowDisplay\" value=\"0\" /><param name=\"DisplaySize\" value=\"0\" /><param name=\"autostart\" value=\"$autostart\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" AllowChangeDisplaySize="1" '.' autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";
}
}
Then upload the mediaplayer.swf and swfobject.js the your gallery root.
-
That did the trick, except that I didn't find Nibbler's Code to change to $pic_html = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
in Popersman's final edition of code to make the flv "mediaplayer" work.
Also, not that this code needed the replacement of flvplayer.swf to mediaplayer.swf.
;)
Soleiltan,
You are moddifying and talking about modifying a theme.php that came along with the theme that you chose. As far as my limited understanding of Coppermine allows me to understand, some theme's writers have taken liberties with the code contained in this page, and you may or may not find certain functions. I suggest you compare with the theme.php from the classic theme to see what functions are missing and what can be added.
As for the mediaplayer.swf i do not recall having the need to rename flwplayer. Could a confirmed codder confirm my mistake so that i may change my earlier post to avoid confusing future readers?
-
The old version is called flvplayer.swf, the new one mediaplayer.swf, so it depends on what version you have.
This namechange took place because of copyright things.
-
Got it working...
-
Hmm after long reading and chancing things around i got it working but
My full screen dont work
And my auto start dont work.
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
I see other ppl post it and than full screen works for tham...
-
ok the post from http://forum.coppermine-gallery.net/index.php?topic=34182.msg221287#msg221287 fixed my fullscreen problem
is there anything so the move wil auto start ad loading page?
Also a thing i didnt get is ppl keep talking about sample/theme.php but i had to edit include/themes.inc.php
Coppermine Photo Gallery 1.4.10 (stable)
Just post it for other ppl to read and understand.
-
For those of you with trouble getting the video to play. Don't forget to set the MIME settings for .flv on your web server. I am using IIS and after setting the mime type (and restarting IIS) everything worked fine.
-
K, I found a solution to a problem of some videos not playing, it is so simple.
Try renaming your video to have no unique characters and no spaces, see if it works for any of ya'll
-
Hello everyone,
I'm terribly happy today because after days trying to make works Flvplayer with Coppermine, that's it! It's working!
I just would have a question, the size is specified in the theme.php file, but did there is a way to do not put any size and let the play show the original size of the uploaded video?
If so, how can i do?
Thank you very much.
-
Hello,
This player supports MP3 as well, but i cannot figure out how to use this properly.
What i've done is:
// 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 = "<embed src='flvplayer.swf' width='500' height='375' allowfullscreen='true'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
} else {
$mime_content['content']=='audio' && $mime_content['extension']=='mp3';
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html = "<embed src='flvplayer.swf' width='500' height='20'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
}
}
However this messes up any other movie files on my gallery.
What i would like to know is to properly code the following line to take more then one mime:
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
Something like this:
if ($mime_content['content']=='movie,audio' && $mime_content['extension']=='flv,mp3') {
Can someone tell me how to do this?
Thank you.
-
Solved the above:
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
$descript = $CURRENT_PIC_DATA['title'];
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html = "<embed src='flvplayer.swf' width='500' height='375' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='file=$flv' />";
} elseif ($mime_content['content']=='audio' && $mime_content['extension']=='mp3') {
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html = "<embed src='flvplayer.swf' width='500' height='20' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='file=$flv' />";
} else {..........................[code]
Thanks for the mod.
[/code]
-
This is an edit on pftq's modifications on the FLV player mod here: http://forum.coppermine-gallery.net/index.php/topic,34182.msg221791.html#msg221791
This allows the width to be automatically detected and adjusted for each video instead of having a solid number.
if ($mime_content['content']=='movie' && $mime_content['mime']=='application/x-shockwave-flash') {
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
if($mime_content['extension']!='flv') {
$flvcheck = fopen($flv,"r");
$flv=fgets($flvcheck);
fclose($flvcheck);
}
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
$pic_html = "<embed src=\"mediaplayer.swf\" ".$image_size['whole']." allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
flashvars=\"file=$flv$exxvars\"></embed>";
}
-
Hello,
I really need this mod to work and I followed the installation instructions, then I got here:
4. download the flvplayer package from http://www.jeroenwijering.com/?item=Flash_Video_Player and upload "flvplayer.swf" to gallery root
I went to that link and it sent me to jeroenwijering homepage. So I clicked on players and download the flv media player but there is not flvplayer.swf included in that zip file.
So what am I supposed to upload to my gallery root?
-
http://www.jeroenwijering.com/?item=JW_FLV_Media_Player
-
Okay,
I downloaded it. It comes with a lot of files. I'm still not sure which ones to upload.
-
Nevermind, I got it sorted out.
-
Would it be possible to add a copy&paste embed code underneath the video somewhere?
-
Also, is it possible to manual add thumbnails to individual videos?
-
I added this to my site , it loads the flvplayer and you can see it loads the FLV file in the status bar but the video doesn't play it comes up with 0:00 of 0:00 , i have checked the paths and everything.
Doesn't seem to want to play the file it's loaded . Any idea's i could try?
-
I posted in this thread before: http://forum.coppermine-gallery.net/index.php/topic,43180.60.html (http://forum.coppermine-gallery.net/index.php/topic,43180.60.html) ... probably should have posted in this one.
I followed instructions for this modification and it works just fine for the most part, however, the JW player is linked to here has a problem with an FLV that I posted... another player handles it just fine, but has no fullscreen option :( Even the JW player doesn't have a button for fullscreen that I see, only click to fullscreen which is not best for me.
I would like to use another player instead, but having difficulty getting the ones I like, working.
Two of them I have tried are: http://flvhosting.com/clients/looplayer/ (http://flvhosting.com/clients/looplayer/) and http://www.osflv.com/ (http://www.osflv.com/) ... each of these, I can get the player to load, but not able to get the $flv string recognized.
Has anyone gotten either of these, or perhaps another feature rich player to work? At the very least, a button for fullscreen would be fine. Could be that the one FLV which wouldn't play through the JW player was just converted badly and the other player just doesn't complain... so, if this is the case and there is an option on JW player for a fullscreen button, rather than the click to full, that I am not aware of, I could even settle on that ;D
Any help appreciated!
-
I posted in this thread before: http://forum.coppermine-gallery.net/index.php/topic,43180.60.html (http://forum.coppermine-gallery.net/index.php/topic,43180.60.html) ... probably should have posted in this one.
Nope. Wrong again. You should have started a thread of your own on the support board, as neither the thread you tried to hijack in your first attempt nor this thread deal with the FLV players you're refering to.
-
not attempting to hijack anything dude... just trying to get a bit of help, which is what a support forum should be about... so, you can give me more nagative karma or whatever (by the looks of it, the karma system is being seriously abused here)... just trying to get assistance... I posted in THIS thread because my question is related to the modification described in THIS thread. I'll admit that the first thread I posted in was indeed the wrong one, but this due to my being in multiple threads at the same time in an attempt to resolve the issue... Not a good start in this "support" forum and I question whether or not I'll get any help whatsoever, even posting in a new thread...
-
First i would like to thank everyone here for all the great help you have provided.
I am using a theme that did not have any "function theme_html_picture" section. I have attached my original and the modified theme.php Hopefully any one having problems will be able to look at this and follow what i did.
I have uploaded mediaplayer.swf, and swfobject.js into the root of coppermine. and everything works great.
I used the filetype editor plugin to add the flv file type. and everything works great.
here is the code i am using.
// There isn't a player selected or user wants client-side control
if (!$user_player) {
$user_player = 'UNK';
}
$player = $players[$user_player];
if ($mime_content['extension'] == "flv") {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$descript = $CURRENT_PIC_DATA['title'];
$pic_html = "<script type=\"text/javascript\" src=\"swfobject.js\"></script>
<div id=\"container\" style=\"width: 640px; height: 480px\"></div>
<script type=\"text/javascript\">
var s1 = new SWFObject(\"mediaplayer.swf\",\"mediaplayer\",\"640\",\"480\",\"7\");
s1.addParam(\"allowfullscreen\",\"true\");
s1.addVariable(\"width\",\"640\");
s1.addVariable(\"height\",\"480\");
s1.addVariable(\"bufferlenght\",\"5\");
s1.addVariable(\"file\",\"$picture_url\");
s1.addVariable(\"image\",\"$pic_thumb_url\");
s1.write(\"container\");
</script>";
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"src\" value=\"". $picture_url . "\" /><param name=\"ShowControls\" value=\"1\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"ShowStatusBar\" value=\"1\" /><param name=\"ShowDisplay\" value=\"0\" /><param name=\"DisplaySize\" value=\"0\" /><param name=\"bufferlength\" value=\"30\" /><param name=\"autostart\" value=\"$autostart\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" AllowChangeDisplaySize="1" '.' autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";
}
}
I am looking for some help adding variables to make the videos buffer the syntax i have found on the player website shows as this. so.addParam('flashvars','&file=/upload/flash.flv&bufferlength=5'); as you can see from my code i have attempted to add the following code:
s1.addVariable(\"bufferlenght\",\"5\");
but it does not work. Im sure someone on this forum is smarter in matters like this then i am. Any help will be appreciated.
-
Hi,
I've gone through this thread numerous times and tried everything suggested. I see the player load on screen with the play button in the centre but no flv plays & I get this error in my flash 9 console:
An Actionscript error has occurred:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.jeroenwijering.utils::Playlister/::loaderHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I've run out of suggestions to try now. Does anyone have any clues to what's going on?
TIA
NC
-
Hi,
I've gone through this thread numerous times and tried everything suggested. I see the player load on screen with the play button in the centre but no flv plays & I get this error in my flash 9 console:
An Actionscript error has occurred:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.jeroenwijering.utils::Playlister/::loaderHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I've run out of suggestions to try now. Does anyone have any clues to what's going on?
TIA
NC
Instructions in this blog: http://matthewhelmke.net/wordpress/2008/04/26/allowing-flash-flv-files-to-be-stored-and-embedded-in-a-coppermine-gallery (http://matthewhelmke.net/wordpress/2008/04/26/allowing-flash-flv-files-to-be-stored-and-embedded-in-a-coppermine-gallery) Is what finally worked for me... hope this helps...
-
Hi PagaNation,
I've just tried everything it said on there and now all I get is a white screen.
Cheerz for trying though
NC
-
It worked.
I forgot to re-name flvplayer.swf back to mediaplayer.swf from a previous attempt.
Many thanx PagaNation.
NC
-
$exxvars=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], get_pic_url($CURRENT_PIC_DATA,'thumb'));
if(!file_exists($exxvars)) $exxvars=get_pic_url($CURRENT_PIC_DATA,'thumb');
$exxvars="&image=".$exxvars;
thanks for this code, exactly what i was after!
-
Ok how do I get the FullScreen to work in Firefox? everything works fine in IE but I cannot get the Fullscreen in Firefox.
Any help is so appreciated.
Thanks
-
Here is a very simple solution to use the width/height values that are inserted manually for flv files .
Search in the unmodified function theme_html_picture:
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
and replace it with:
$player = $players[$user_player];
if ($mime_content['extension'] == "flv") {
$pheight = $CURRENT_PIC_DATA['pheight'] + 20;
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$pic_html = "<embed type=\"application/x-shockwave-flash\" width=\"{$CURRENT_PIC_DATA['pwidth']}\" height=\"$pheight\" allowfullscreen=\"true\" src=\"jw_player.swf\" flashvars=\"file=$picture_url&image=$thumb\" />";
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
The rest has to be done as described here (http://forum.coppermine-gallery.net/index.php/topic,34182.msg159880.html#msg159880). Maybe you'll have to rename the .swf file from the downloaded package to "jw_player.swf" if it has another name.
(Tested with JW Player 4.3.132)
-
Hi,
I did all the modifications from plugin instructions.
Unfortunately its not working. as you can see here
http://www.caboz.com/aves/displayimage.php?album=8&pos=0
The flv files uploaded fine but i get a white square in sted the flv player
Please any help will be apreciated
thankx
-
First: update your gallery to the latest version 1.4.20!
Hi,
I did all the modifications from plugin instructions.
Unfortunately its not working. as you can see here
http://www.caboz.com/aves/displayimage.php?album=8&pos=0
The flv files uploaded fine but i get a white square in sted the flv player
Please any help will be apreciated
thankx
Simple reason:
?autoStart=false
has to be
&autoStart=false
This will work but won't result in the code as instructed.
Edit:
Hi, my name is caboz1 and i made a post here
[Hi,
I did all the modifications from plugin instructions.
Unfortunately its not working. as you can see here
http://www.caboz.com/aves/displayimage.php?album=8&pos=0
The flv files uploaded fine but i get a white square in sted the flv player
Please any help will be apreciated
thankx]
If you think you can help me please anwser me or send me a e-mail will apreceat Thankx
Gil cabozhttp://
Can't you read my signature? There is written Post support questions to the proper board, not via PM!
Why do you send me a support question to a modification instruction of gwendolyn? >:(
Unfortunately I've read your PM after I made this post. Otherwise I had not made this post, that's sure!
Please respect the board rules you have accepted while registering on this board.
-
I did all the modifications from plugin instructions.
It's not a plugin, but a mod. Behave, respect board rules!
-
Greetings. I followed this thread and got the .flv integration working perfectly.
The only issue is that now I have ">>?" showing up at the top left corner of all my pages. (Except the question-mark is upside-down. You can see it here: http://www.coolstucki.net (http://www.coolstucki.net).)
I've gone through my modified theme.php code a dozen times, and even re-did the cut/paste from this thread from scratch but don't really know what I'm looking for and it's still there. If one of you code-gurus could scan this code and see if there is something screwy that pops out at you, it would be much appreciated. It is the "rainy day" theme.
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2009 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.4.21
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/rainy_day/theme.php $
$Revision: 5728 $
$Author: gaugau $
$Date: 2009-03-02 09:25:17 +0100 (Mo, 02 Mär 2009) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed //
// ------------------------------------------------------------------------- //
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);
// HTML template for sys_menu
$template_sys_menu = <<<EOT
<div class="topmenu">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
{BUTTONS}
</tr>
</table>
</div>
EOT;
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
<td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
<td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
<a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
</td>
<td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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 = "<embed src='flvplayer.swf' width='640' height='480' allowfullscreen='true' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
?>
Thank you.
-
Man, now I feel dumb. Appearantly the text editor I was using inserted those weird >>? characters. Re-saved in linux and it looks fine now.
Thanks anyway!
-
Thanks for coming back and resolving your problem. Many people do not bother so others then waste time looking into it. It also help when someone else comes along with the same issue.
As for text editors I too have made the mistake of copying text from Word and the like or using a dodgy text editor. Glad you sorted it.
-
The strange characters (usually the actual representation is ) are called Byte Order Mark (aka "BOM"). There are many threads on this board that contain a more detailed explanation how they creep in, how to get rid of them and what editors to use. I suggest using the board's search feature and use "Byte-Order-Mark" or similar as keyword.
You (queequeg) have changed the default encoding from utf-8 to iso8859-1: why on earth did you do that? Not a bright move - I suggested undoing that (you can not simply switch back to utf-8 (unicode) in coppermine's config though, as the textual content in your database that has been added from the moment you switched to iso8859-1 is in that encoding as well. Any non-lation characters will look distorted if you switch. If you have used special chars at all, you can savely switch. If you are using special chars (like German Umlauts ä ö ü Ä Ö Ü) or accented chars (à á è é È É etc.), they will break and need to be converted. If your last name is actually "Stucki" (as your URL suggests), your ancestors probably came from Switzerland or Germany, so maybe there are Umlauts on your site (haven't checked in detail, nor could I check fully).
Both issues (Byte Order Mark and improper use of encoding) are not related to this mod and should therefor not be discussed in detail on this announcement thread. If you have questions on those two subjects, please start a separate thread on the "regular" support board with a reference to this thread.
-
Thanks for this MOD,
I read about jwplayer "mp4" format is supported too
I try to add this extention but that don't work
I add whit files type : mp4 video/mp4 movie Flash player
but in my theme.php I've this code if($mime_content['extension']!='flv') {
$flvcheck = fopen($flv,"r");
$flv=fgets($flvcheck);
fclose($flvcheck);
}
How can I do? for add mp4 extention?
thx
-
How can I do? for add mp4 extention?
According to my solution (http://forum.coppermine-gallery.net/index.php/topic,34182.msg281745.html#msg281745), you have to:
Search in the unmodified function theme_html_picture:
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
and replace it with:
$player = $players[$user_player];
if ($mime_content['extension'] == "flv" || $mime_content['extension'] == "mp4" ) {
$pheight = $CURRENT_PIC_DATA['pheight'] + 20;
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$pic_html = "<embed type=\"application/x-shockwave-flash\" width=\"{$CURRENT_PIC_DATA['pwidth']}\" height=\"$pheight\" allowfullscreen=\"true\" src=\"jw_player.swf\" flashvars=\"file=$picture_url&image=$thumb\" />";
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
-
Thanks !
that's work for mp4 extension
but now the flv files no playing, the jw player say "This playlist is not a valid XML file." :-[
-
This is not caused by my mod.
All I have done is changing
if ($mime_content['extension'] == "flv") {
to
if ($mime_content['extension'] == "flv" || $mime_content['extension'] == "mp4") {
which forces cpg to use jw-player to play mp4 files, nothing more. It doesn't changes the behavior of playing flv files.
-
mp4 and flv work!!
Sorry it was me, I has an error code too much }
Thanks for your quickly answers and your code!
-
hello
i got the error "playlist is not a valid xml ..." too - but the file is a flv. i have to rename the name of the player-file, because it's new name is "player.swf".
this is the code - i think, it's correct:
// 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=\"player.swf?file=$flv?autoStart=false\">";
$pic_html .= "<param name=\"movie\" value=\"player.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['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"SendPlayStateChangeEvents\" value=\"True\" /><param name=\"enableContextMenu\" value=\"True\" /><param name=\"enabled\" value=\"true\" /><param name=\"Volume\" value=\"10\" /><param name=\"uiMode\" value=\"full\" /><param name=\"PlayCount\" value=\"1\" /><param name=\"ShowStatusBar\" value=\"true\" /><param name=\"ShowDisplay\" value=\"false\" /><param name=\"url\" value=\"". $picture_url . "\" />";
$pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" volume="10" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
$pic_html .= "</object><br />\n";}
}
can someone give me a hint please ?
-
i have to rename the name of the player-file, because it's new name is "player.swf".
Why don't you just rename the swf file?
You can also try my code (http://forum.coppermine-gallery.net/index.php/topic,34182.msg281745.html#msg281745), maybe it works better for you.
-
@eenemeenemuu
ok, your code works perfect ;D (http://www.andmore.at/cpg14x/displayimage-15-0.html (http://www.andmore.at/cpg14x/displayimage-15-0.html))
thank you for your help !!!
-
Is there a difference between .flv-files created with `mencoder' and those created with `Riva' under Windows?
I created a .mpg which is converted to .flv with `Riva'. Movie 20090216-stofzuigen.flv does play.
I created a .flv from 27 .jpgs with `mencoder'. Movie 2009-06-07_telefoon.flv doesn't play. The player states "MEDIA NOT FOUND".
The file is really there and added via 'Batch add'.
The command `file' gives:
20090216-stofzuigen.flv: Macromedia Flash Video
2009-06-07_telefoon.flv: Macromedia Flash Video
I created the .flv from the .jpgs with the command:
mencoder "mf://*.jpg" -mf type=jpeg:fps=2 -o output.flv -oac copy -of lavf -ovc lavc -lavcopts vcodec=flv:keyint=1
What am I doing wrong?
-
What am I doing wrong?
You are asking on a forum to support Coppermine, not media conversion issues.
Try Google and please stick to the subject of this thread.
-
I thought it was an error with the player (can't handle other kind of .flv's).
But the error was a cache which wasn't cleared correctly. Apologies.
-
i integrated the mod, it works great, thanks very much. BUT: i want the flash movies start automatically. how shall i edit my code below? (kindo newbie here)
// 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 = "<embed src='flvplayer.swf' width='320' height='260'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
} else {
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
}
-
Use this (http://forum.coppermine-gallery.net/index.php/topic,34182.msg281745.html#msg281745) solution.
-
thanks for fast response but im not using fullscreen mode and i could not understand the solution at the link :(
-
The solution at the link doesn't differ from the instructions in the first post ::)
-
no, it doesnt work. it says "this is not an xml file" on the flash video screen :(
-
If you really want support, you have to give more details (like a link to your gallery where the error occurs). Probably you have done something wrong.
how shall i edit my code
Try:
// 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 = "<embed src='flvplayer.swf' width='320' height='260'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv&autostart=$autostart' />";
$pic_html .= "<br />\n";
} else {
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
}
-
Why do you sent me a PM? This is a public support board!
thanks for your motivation for help :)
here is the site http://daylightfilms.tv/reel/
there is only videos in CARS and COMEDY albums.
i use hardwired theme and below is the code part. i tried to edit it depending on your help links but could not make it work. i can send you the whole theme.php but how :)
// 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 = "<embed src='flvplayer.swf' width='320' height='260'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
$pic_html .= "<br />\n";
} else {
$player = $players[$user_player];
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
}
You don't have to edit the code, you only have to replace it with this one (http://forum.coppermine-gallery.net/index.php/topic,34182.msg300525.html#msg300525).
-
i did it, here is the result:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /mnt/w0714/d14/s18/b028067a/www/reel/themes/hardwired/theme.php on line 2093
-
Sorry I forgot a " in the code. I updated my code, please replace it again.
-
still parse error (syntax error, unexpected T_CONSTANT_ENCAPSED_STRING) on line 2093 which is:
flashvars='file=$flv' autostart="'.$autostart.'" />";
smthng wrong here?
-
Sorry it is a very hot day here and I mixed up " and ' ::)
I updated my code again. Sorry for that.
-
still doesnt work :(
any other/more ideas?
-
Dang!
Of course
flashvars='file=$flv' autostart='".$autostart."' />";
hast to be
flashvars='file=$flv&autostart=$autostart' />";
::)
Code updated.
-
YESSS! that's done. thanks very much :)
-
I want to use this player with my gallery, but I have one question
The player's site has an area where you can customize your player: http://www.longtailvideo.com/support/jw-player-setup-wizard
I only want to change the colors player's bar.
How would I implement this into my gallery?
-
I only want to change the colors player's bar.
How would I implement this into my gallery?
It's described in your posted link: http://www.longtailvideo.com/support/jw-player-setup-wizard
-
Section "Change Your Flashvars".
-
It's described in your posted link: http://www.longtailvideo.com/support/jw-player-setup-wizard
Hum, I do see the code at the bottom once I have everything the way I like it, but I don't know how to edit it for all the codes posted within this thread, as they are different. Some are similar but have different characters in what seem to be important places.
The way I understand it, that code they give me is for a normal webpage, and would need to be edited further to work with this MOD. But I'm not sure how to go about doing this.
For example, here is the code they give me, for the player I want:
<script type='text/javascript' src='swfobject.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','mpl','470','320','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','MY_LINK_HERE');
so.addVariable('backcolor','990000');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','000000');
so.write('mediaspace');
</script>
There is this code: http://forum.coppermine-gallery.net/index.php/topic,34182.msg221287.html#msg221287 which is close, but the "so.addParam", and "var so" are different. @ that link they are "sl" instead.
This one: http://forum.coppermine-gallery.net/index.php/topic,34182.msg241637.html#msg241637 is kinda the same too, with the same issues as the other one, and with a bunch of '/' in it.
I was going to use one of those and add the extra Variables to the code, but #1 I'm unsure if this will work, #2 I'm not sure if I should keep the "so" or change to "sl" or even if I'm doing any of this correctly.
-
Oops, can't modify my post.
Anyhow, I'm assuming, my code for the player color would look like this:
// 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 = "<p id='player1'><a href='http://www.macromedia.com/go/getflashplayer'>Get the Flash Player</a> to see this player.</p>";
$pic_html .= "<script type='text/javascript'>";
$pic_html .= "var s1 = new SWFObject('flvplayer.swf','single','400','400','7');";
$pic_html .= "s1.addParam('allowfullscreen','true');";
$pic_html .= "s1.addVariable('file','$flv');";
$pic_html .= "s1.addVariable('image','preview.jpg');";
$pic_html .= "s1.addVariable('backcolor','990000');
$pic_html .= "s1.addVariable('frontcolor','FFFFFF');
$pic_html .= "s1.addVariable('lightcolor','000000');
$pic_html .= "s1.write('player1');";
$pic_html .= "</script>";
Edited from: http://forum.coppermine-gallery.net/index.php/topic,34182.msg221287.html#msg221287
-
Alrighty, first things first.
Trying to get this to work out, got the player files loaded to my gallery root folder.
Go to edit my theme.php and don't have the code in there. So I go to sample/theme.php, but it too doesn't have the code I'm supposed to look for. I assume this is because the original post is from a couple years ago, so I choose the closest thing and edit that. (BTW - the directions don't say where to STOP copying, or where to place this copy & paste in your theme.php)
I then take my edited code (from the post above, but with corrections cause I had a goof or two) and added into theme.php - also adding the small line in template.php.
I check my gallery and get this error:
Parse error: syntax error, unexpected $end in /home/kat91119/public_html/campblood/gallery/themes/camp_blood/theme.php on line 407
The only thing on that line is the ?> and I never touched anything in that area...
So, now I'm even more confused.
Here is my theme.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2008 Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.4.16
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/camp_blood/theme.php $
$Revision: 4233 $
$Author: gaugau $
$Date: 2008-02-02 09:23:58 +0100 (Sa, 02 Feb 2008) $
**********************************************/
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='::';
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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 = "<p id='player1'><a href='http://www.macromedia.com/go/getflashplayer'>Get the Flash Player</a> to see this player.</p>";
$pic_html .= "<script type='text/javascript'>";
$pic_html .= "var s1 = new SWFObject('player.swf','single','400','400','7');";
$pic_html .= "s1.addParam('allowfullscreen','true');";
$pic_html .= "s1.addVariable('file','$flv');";
$pic_html .= "s1.addVariable('image','preview.jpg');";
$pic_html .= "s1.addVariable('backcolor','990000');";
$pic_html .= "s1.addVariable('frontcolor','FFFFFF');";
$pic_html .= "s1.addVariable('lightcolor','000000');";
$pic_html .= "s1.write('player1');";
$pic_html .= "</script>";
}
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
</tr>
</table>
EOT;
// HTML template for the album list
$template_album_list = <<<EOT
<!-- BEGIN stat_row -->
<tr>
<td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END stat_row -->
<!-- BEGIN header -->
<tr class="tableb_compact">
<!-- END header -->
<!-- BEGIN album_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" align="left" valign="top" class="tableh2">
<span class="alblink"><a href="{ALB_LINK_TGT}"><b><center>{ALBUM_TITLE}</center></b></a></span>
</td>
</tr>
<tr>
<td colspan="3">
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td align="center" valign="middle" class="thumbnails" width="100%">
<img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
<a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
</td>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
<td width="100%" valign="top" align="left" class="tableb_compact">
{ADMIN_MENU}
<p>{ALB_DESC}</p>
</td>
</tr>
</table>
</td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="1" valign="top" class="tableh2">
<b> </b>
</td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td width="100%" valign="top" class="tableb_compact">
<div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
</td>
</tr>
</table>
</td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
</tr>
<tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
</tr>
<!-- END footer -->
<!-- BEGIN tabs -->
<tr>
<td colspan="{COLUMNS}" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{TABS}
</tr>
</table>
</td>
</tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
// HTML template for the album list
$template_album_list_cat = <<<EOT
<!-- BEGIN c_stat_row -->
<tr>
<td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END c_stat_row -->
<!-- BEGIN c_header -->
<tr class="tableb_compact">
<!-- END c_header -->
<!-- BEGIN c_album_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" valign="top" class="tableh2">
<span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
</td>
</tr>
<tr>
<td colspan="3">
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td align="center" valign="middle" class="thumbnails">
<img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
<a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
</td>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
<td width="100%" valign="top" class="tableb_compact">
{ADMIN_MENU}
<p>{ALB_DESC}</p>
</td>
</tr>
</table>
</td>
<!-- END c_album_cell -->
<!-- BEGIN c_empty_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" >
<tr>
<td height="1" valign="top" class="tableh2">
<b> </b>
</td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td width="100%" valign="top" class="tableb_compact" >
<div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
</td>
</tr>
</table>
</td>
<!-- END c_empty_cell -->
<!-- BEGIN c_row_separator -->
</tr>
<tr class="tableb_compact">
<!-- END c_row_separator -->
<!-- BEGIN c_footer -->
</tr>
<!-- END c_footer -->
<!-- BEGIN c_tabs -->
<tr>
<td colspan="{COLUMNS}" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{TABS}
</tr>
</table>
</td>
</tr>
<!-- END c_tabs -->
<!-- BEGIN c_spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END c_spacer -->
EOT;
// HTML template for thumbnails display
$template_thumbnail_view = <<<EOT
<!-- BEGIN header -->
<tr>
<!-- END header -->
<!-- BEGIN thumb_cell -->
<td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<a href="{LINK_TGT}">{THUMB}<br /></a>
{CAPTION}
{ADMIN_MENU}
</td>
</tr>
</table>
</td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
<td valign="top" class="thumbnails" align="center"> </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
</tr>
<tr>
<!-- END row_separator -->
<!-- BEGIN footer -->
</tr>
<!-- END footer -->
<!-- BEGIN tabs -->
<tr>
<td colspan="{THUMB_COLS}" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{TABS}
</tr>
</table>
</td>
</tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
?>
And here is a link to my gallery:
http://www.campblood.net/gallery
-
Ok, I got it to work.
I took the code from this: http://forum.coppermine-gallery.net/index.php/topic,34182.msg189778.html#msg189778
and pasted it in my theme.php
Then I changed that, and pasted my custom code:
// 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 = "<p id='player1'><a href='http://www.macromedia.com/go/getflashplayer'>Get the Flash Player</a> to see this player.</p>";
$pic_html .= "<script type='text/javascript'>";
$pic_html .= "var s1 = new SWFObject('player.swf','single','400','400','7');";
$pic_html .= "s1.addParam('allowfullscreen','true');";
$pic_html .= "s1.addVariable('file','$flv');";
$pic_html .= "s1.addVariable('image','preview.jpg');";
$pic_html .= "s1.addVariable('backcolor','990000');";
$pic_html .= "s1.addVariable('frontcolor','FFFFFF');";
$pic_html .= "s1.addVariable('lightcolor','000000');";
$pic_html .= "s1.write('player1');";
$pic_html .= "</script>";
Guess messing around with it, having no clue worked for once :D
-
Hello,
I had this mod for one year and it worked fine but from now, it stop working - I get only black video screen.
(code was from this site: http://matthewhelmke.net/2008/04/26/allowing-flash-flv-files-to-be-stored-and-embedded-in-a-coppermine-gallery/)
So I again download JW FLV Media Player (4.6) and upload it in the root of photogallery directory, I update code in theme.php (which is water_drop) with this code in this topic http://forum.coppermine-gallery.net/index.php/topic,34182.msg159880.html#msg159880 and again set a filetypes editor plugin.
But only result that I get is this message This playlist is not a valid xml file,
example you can see in my coppermine photogallery
http://www.trinactka.com/fotky/displayimage.php?album=72&pos=1
This si code from theme.php
// Displays a picture
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
global $album, $comment_date_fmt, $template_display_media;
global $lang_display_image_php, $lang_picinfo;
$pid = $CURRENT_PIC_DATA['pid'];
$pic_title = '';
if (!isset($USER['liv']) || !is_array($USER['liv'])) {
$USER['liv'] = array();
}
// Add 1 to hit counter
if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
add_hit($pid);
if (count($USER['liv']) > 4) array_shift($USER['liv']);
array_push($USER['liv'], $pid);
}
if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
$condition = true;
}elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
$condition = true;
}elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
$condition = true;
}else{
$condition = false;
}
if ($CURRENT_PIC_DATA['title'] != '') {
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
}
if ($CURRENT_PIC_DATA['caption'] != '') {
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
}
if ($CURRENT_PIC_DATA['keywords'] != '') {
$pic_title .= $lang_picinfo['Keywords'] . ": " . $CURRENT_PIC_DATA['keywords'];
}
if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'img_desc');
} else {
if (!$CURRENT_PIC_DATA['title']) {
template_extract_block($template_display_media, 'title');
}
if (!$CURRENT_PIC_DATA['caption']) {
template_extract_block($template_display_media, 'caption');
}
}
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';
if ($CONFIG['make_intermediate'] && $condition ) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
$image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
$pic_title = '';
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
$pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
}
} elseif ($mime_content['content']=='document') {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
} else {
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');
$players['WMP'] = array('id' => 'MediaPlayer',
'clsid' => 'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ',
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ',
'mime' => 'type="application/x-mplayer2" ',
);
$players['RMP'] = array('id' => 'RealPlayer',
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
'codebase' => '',
'mime' => 'type="audio/x-pn-realaudio-plugin" '
);
$players['QT'] = array('id' => 'QuickTime',
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
'mime' => 'type="video/x-quicktime" '
);
$players['SWF'] = array('id' => 'SWFlash',
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
'mime' => 'type="application/x-shockwave-flash" '
);
$players['UNK'] = array('id' => 'DefaultPlayer',
'clsid' => '',
'codebase' => '',
'mime' => ''
);
if (isset($_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
$user_player = $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
} else {
$user_player = $mime_content['player'];
}
// 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";
}
}
$CURRENT_PIC_DATA['html'] = $pic_html;
$CURRENT_PIC_DATA['header'] = '';
$CURRENT_PIC_DATA['footer'] = '';
$CURRENT_PIC_DATA = CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
);
return template_eval($template_display_media, $params);
}
Can you please help me? I try many things in this topic, but no is helpful for me.
-
I'm sorry, it seems that flash video on my photogallery didn't work due to my antivirus software. Now is everything ok and tutorial in this topic is working.
-
Thanks a lot for this, I have posted it on my site and for the most part it works wonderfully. Although when I set the autoplay to true, it doesn't play automatically.
http://troopphoto.troop101.net/index.php?cat=52
// 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=\"580\" height=\"475\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=true\" allowfullscreen=\"true\" allowscriptaccess=\"always\" >";
$pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=true\" />";
$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";
}
I was wondering if I had a setting wrong? Thanks.
Also I noticed that there is an embed option for the player. Can this be integrated? I'm not sure how to write php code efficiently yet. Thanks again!
Source: http://www.longtailvideo.com/addons/plugins/49/get-examples.html?addon=49&vid=46&q=
-
I changed my code to the embed tag, which seems to work as well as the Object tab. When I got everything in the embed code I managed to get the autoplay to work.
// 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 = "<embed src=\"swfplayer101.swf\" width=\"580\" height=\"475\" bgcolor=\"000000\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"file=$flv&image=images/trooplogosm.png&autostart=true\"></embed><br />\n";
}
I would like to get the image to automatically choose the normal_filename.jpg image in the folder, but I don't know what to do here so for now it's the site logo.
I got the embed tag to work, but it ended up not being what I wanted and I've ditched that idea for now. But that has nothing to do with this topic, so I will most likely make another topic for that.
If someone knows the variables to replace in my image section of the code above I would appreciate it. Thanks!
-
If someone knows the variables to replace in my image section of the code above I would appreciate it. Thanks!
See here (http://forum.coppermine-gallery.net/index.php/topic,34182.msg281745.html#msg281745). Use
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
instead of
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
-
I tried to add the code above, but I don't get the normal Thumbnail. Maybe I'm missing something.
I used the code:
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
Like this:
$flv = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$thumb = get_pic_url($CURRENT_PIC_DATA, 'normal');
$pic_html = "<embed src=\"http://troopphoto.troop101.net/swfplayer101.swf\" width=\"580\" height=\"475\" bgcolor=\"000000\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"file=http://troopphoto.troop101.net/$flv&image=http://troopphoto.troop101.net/$thumb&autostart=true\"></embed><br />
But where the normal photo file should be It points at
http://troopphoto.troop101.net/albums/videos/movienight2007/Beaver_BobcatWinter2007.flv
and should point at
http://troopphoto.troop101.net/albums/videos/movienight2007/normal_Beaver_BobcatWinter2007.jpg
should I just modify the image files to be Beaver_BobcatWinter2007.flv.jpg and use that? or is there a way to detect the normal image file.
Thanks again!
-Matt
-
Edit to last post, if I have it say thumb instead of normal it works fine. Is it because I added the normal_ file after I added the Videos? How do I correct this.
-
If you access an flv file, the 'normal' file will be the flv file. If you want to use an already existing picture, modify your code accordingly. I'm not sure what you try to accomplish.
-
OK. I am using this mod. I wanted to have the normal_photo shown on the SWF player before users press play.
I have the code there but wasn't sure how to link to the picture file, but as you just told me the flv is the normal file, so I can just change a few things around to make it work for me.
Thanks for the help.
I will rename my normal_videophoto.jpg to videophoto.flv.jpg and then add the .jpg in the code and that should work. I don't want to use the thumbnail image because I set the size of those to be really small. Thanks again for all the help.
-
i have a Displaying videos from Youtube in Coppermine without fopen & Youtube dev API ID mod on my gallery now im having problem in integrating this mod. please help thanks
-
i have a Displaying videos from Youtube in Coppermine without fopen & Youtube dev API ID mod on my gallery now im having problem in integrating this mod. please help thanks
Find
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
and replace with
if ($mime_content['extension'] == "youtube") {
// get content of .youtube file
$youtube_file_content = file_get_contents($picture_url);
// remove apostrophes and quotes
$youtube_file_content = str_replace("'", "", $youtube_file_content);
$youtube_file_content = str_replace("\"", "", $youtube_file_content);
// get youtube video id
$youtube_file_content = str_replace("http://www.youtube.com/watch?v=", "", $youtube_file_content);
$youtube_file_content = explode("&", $youtube_file_content);
$youtube_video_id = $youtube_file_content[0];
// check if video id is valid
if (strlen($youtube_video_id) == "11") {
$youtube_check_result = preg_match("/[A-Za-z0-9_-]{11}/", $youtube_video_id, $youtube_video_id_valid);
}
// embed video or print error message
if ($youtube_check_result == "1" ) {
$pic_html = "<embed type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"640\" height=\"385\" src=\"http://www.youtube.com/v/{$youtube_video_id_valid[0]}&hl=de&fs=1\" />";
} else {
$pic_html = "Error: no valid youtube video id";
}
}
elseif ($mime_content['extension'] == "flv") {
$pheight = $CURRENT_PIC_DATA['pheight'] + 20;
$thumb = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$pic_html = "<embed type=\"application/x-shockwave-flash\" width=\"{$CURRENT_PIC_DATA['pwidth']}\" height=\"$pheight\" allowfullscreen=\"true\" src=\"jw_player.swf\" flashvars=\"file=$picture_url&image=$thumb\" />";
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$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";
}
-
i just moved to another host and made a fresh install of cpg 1.4 with this mod but somehow i cant upload flv's anymore its already set on addfiletypes the size of the video is below 1mb.
Warning ADULT content!
http://jorpetz.com/gallery (http://jorpetz.com/gallery)
debug mode enabled
user:test
pass:test
-
I want FLV Player change skin , how change skin ?
I don't know, that how video player change skin .
My test video : http://ultimatebritney.org/videoarchive/displayimage.php?pos=-3
I want same skin video : http://meganfoxdaily.net/mfox-tv/displayimage.php?pos=-53
Please teach me , how change skin video ?
-
http://www.longtailvideo.com/addons/skins
-
http://www.longtailvideo.com/addons/skins
yes , i don't know what code :/
-
// 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";
}
}
Where i change add code ( skin )
-
i solved skin .
but i want change logo , how ?
http://ultimatebritney.org/videoarchive/displayimage.php?pos=-3
-
I just upgraded to 1.5.8, and the gallery won't work with the code as is. Since I am not an avid php coder, does anyone know what to change to get this to work with 1.5.8?
Right now FLV videos don't play at all in my gallery. Any help is appreciated. Thanks!
-
In response to my last Post, I found that there is a plugin that is available for 1.5.x.
http://forum.coppermine-gallery.net/index.php/topic,62704.0.html is the topic, in this forum that discusses it.
-
Don't ask for other versions (http://forum.coppermine-gallery.net/index.php/topic,24540.0.html)
-
Additionally, you could also search the plugins for 1.5.x as a couple of them provide this functionality - http://forum.coppermine-gallery.net/index.php/board,91.0.html
-
thanks for your post
-
hello all :D :D
made a small player integration into coppermine gallery for FLV-Videos :D :D
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#msg111120 (http://forum.coppermine-gallery.net/index.php?topic=24186.msg111120#msg111120)
2. 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 (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 ::) :P
°gwenny ::) :P
Hallo,
i make it so how you show it here.
but it doesent work.
what did i make for an mistake?
i use version 1.4.27 stram mod
can you help me?
and witch code do you mean what is in sample php?
can you put here the code?
mfg
Jörg-André
-
hello all :D :D
made a small player integration into coppermine gallery for FLV-Videos :D :D
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#msg111120 (http://forum.coppermine-gallery.net/index.php?topic=24186.msg111120#msg111120)
2. 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 (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 ::) :P
°gwenny ::) :P
Hallo,
i make it so how you show it here.
but it doesent work.
what did i make for an mistake?
i use version 1.4.27 stram mod
can you help me?
and witch code do you mean what is in sample php?
can you put here the code?
mfg
Jörg-André
-
hi, I'm new to the community and Thanks for this active community.
I want to use this player with my gallery, but I have one question
The player's site has an area where you can customize your player: http://www.longtailvideo.com/support/jw-player-setup-wizard
I only want to change the colors player's bar.
How would I implement this into my gallery?
:) (http://www.rahkarenovin.com/)