Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 08:37:26 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: 1 2 [3] 4 5 6 7 ... 9   Go Down
  Print  
Author Topic: FLV Player Integration MOD  (Read 104652 times)
0 Members and 1 Guest are viewing this topic.
padelpro
Coppermine newbie

Posts: 1


« Reply #40 on: March 23, 2007, 06:18:23 pm »

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
Logged
basisbyte
Contributor
***
Gender: Male
Posts: 4

I love it to write small and big php scripts..


WWW
« Reply #41 on: March 27, 2007, 05:08:46 pm »

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:

    
Code:
  $pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv?autoStart=false\" />";


Replace it with this one and everything should be fine:

    
Code:
  $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 Smiley
Logged
msanderc
Coppermine newbie

Posts: 12


« Reply #42 on: April 14, 2007, 12:45:58 am »

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.
Logged
Surfer_D
Coppermine newbie

Posts: 14


« Reply #43 on: July 31, 2007, 10:28:08 am »

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.

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.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']) > 4array_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']==|| $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&amp;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
Logged
Surfer_D
Coppermine newbie

Posts: 14


« Reply #44 on: July 31, 2007, 10:49:08 am »

Admin please delete my previous post - I found what was wrong - my fault

I can't find where to delete my post.
Logged
Surfer_D
Coppermine newbie

Posts: 14


« Reply #45 on: July 31, 2007, 11:37:31 am »

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?
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #46 on: August 01, 2007, 08:30:16 am »

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.
Logged
ba2
Coppermine newbie

Posts: 12


« Reply #47 on: August 08, 2007, 10:13:04 am »

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
Logged
rivensky
Coppermine newbie

Posts: 3


« Reply #48 on: August 08, 2007, 05:57:51 pm »

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:
Code:
<?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) ? '' '&amp;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($ratio1.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&amp;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!
Logged
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #49 on: August 08, 2007, 05:59:44 pm »

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.
Logged

I don't care about what they say, I won't live or die that way.
rivensky
Coppermine newbie

Posts: 3


« Reply #50 on: August 08, 2007, 06:09:15 pm »

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:
Code:
<?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) ? '' '&amp;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($ratio1.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&amp;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
Quote
?>
was my problem. I was putting the theme below it. I hope this is the end of my stupidity today... hmm.  Shocked
Logged
rivensky
Coppermine newbie

Posts: 3


« Reply #51 on: August 08, 2007, 07:20:45 pm »

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!
Logged
madragonn
Coppermine newbie

Posts: 3


« Reply #52 on: August 13, 2007, 10:57:41 pm »

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
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";

This is the code i have now
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  = "<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 >.<
Logged
ba2
Coppermine newbie

Posts: 12


« Reply #53 on: August 14, 2007, 06:32:46 pm »

thanks man it worked perfectly for me !!!
but just a problem, I can't have the fullscreen Sad when I click on the button
Logged
Iced Coffee
Coppermine regular visitor
**
Posts: 92


« Reply #54 on: August 18, 2007, 01:11:23 pm »

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.
Logged
madragonn
Coppermine newbie

Posts: 3


« Reply #55 on: August 27, 2007, 06:13:11 pm »

thanks man it worked perfectly for me !!!
but just a problem, I can't have the fullscreen Sad 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 Smiley
Logged
madragonn
Coppermine newbie

Posts: 3


« Reply #56 on: August 27, 2007, 07:40:53 pm »

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 Smiley

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
Code:
<script type="text/javascript" src="swfobject.js"></script>

now just change the code in theme.php from
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  = "<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
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('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
Logged
pftq
Contributor
***
Posts: 81


« Reply #57 on: August 30, 2007, 09:33:43 pm »

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:
Code:
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.
« Last Edit: August 31, 2007, 02:52:10 am by pftq » Logged
pftq
Contributor
***
Posts: 81


« Reply #58 on: August 31, 2007, 11:06:07 am »

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):
Code:
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.
Logged
ULISS
Coppermine regular visitor
**
Gender: Male
Posts: 56


« Reply #59 on: September 11, 2007, 01:39:21 pm »

HELP!!! http://www.usiba.ru/gallery/displayimage-lastup-0-0.html

Three days i am soared... Tongue
Logged
Pages: 1 2 [3] 4 5 6 7 ... 9   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.126 seconds with 15 queries.