Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2] 3 4 5 6 7   Go Down

Author Topic: Another FLV Player  (Read 263267 times)

0 Members and 1 Guest are viewing this topic.

jostor

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Another FLV Player
« Reply #20 on: May 29, 2007, 06:19:25 pm »

I'm sorry, I wasn't using the right files. I was using the files from gwendolyn's post. When i replaced them with flvPlayer.swf and flashobject.js from your post everything worked great!

Thankyou very much for helping me! :)
Logged

jostor

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Another FLV Player
« Reply #21 on: May 30, 2007, 04:44:40 pm »

Is there a way this player can buffer the video before playing it?
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Another FLV Player
« Reply #22 on: May 30, 2007, 04:53:34 pm »

Is there a way this player can buffer the video before playing it?
It already does buffer the video before playing it. If you're having problems playing the video then it's either your connection or your server's problem, not the player.

s5iztok

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Another FLV Player
« Reply #23 on: May 31, 2007, 11:48:37 am »

any idea how to setup album to get thumbnails instead "video" thumnail for *.vlf files?

http://video.agility-slo.net
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures

MEGALOLZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Another FLV Player
« Reply #25 on: June 05, 2007, 06:21:33 pm »

is it possible to use this mod, but with a flv player that i have built myself?

if so, what settings do i need to change within flash (flash 8).

thanks
Mike
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Another FLV Player
« Reply #26 on: June 05, 2007, 09:53:56 pm »

is it possible to use this mod, but with a flv player that i have built myself?

if so, what settings do i need to change within flash (flash 8).

thanks
Mike
You could do it 2 ways. One is (if you want to use my code out-of-the-box) - make a variable for the path to accept flvPath as the url of the FLV.  Or you could create your own Flash Var(s).

MEGALOLZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Another FLV Player
« Reply #27 on: June 05, 2007, 09:57:26 pm »

would you be able to walk me through it?

ive had experience with flash before, but nothing too advanced.

I'm more of a designer than a coder ;) lol
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Another FLV Player
« Reply #28 on: June 05, 2007, 10:29:18 pm »

No, sorry. From your question, you sounded like you were ready for the answer.

It would take a lot of "walk me thru it" time to guide you and this is not the place.  Try flashkit.com, lots of help there. Though not really difficult, it is time consuming to explain/learn.

MEGALOLZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Another FLV Player
« Reply #29 on: June 05, 2007, 10:32:56 pm »

ok cheers anyway, but i've tried flashkit before, and could never find any tutorials on how to change variables in the component inspector via an external script..
guess i'll go look again =\

Mike

p.s. i already have an fla, and its playing videos i set directly, its just changing it dynamically that i can't get working
Logged

jack5288

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Another FLV Player
« Reply #30 on: June 11, 2007, 12:33:42 am »

hi i have a "big" problem

Parse error: syntax error, unexpected $end in /www/htdocs/w0087014/coppermine/themes/water_drop/theme.php on line 184

theme.php:
Code: [Select]
<?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="" />';
// 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];

if (
$mime_content['extension'] == "flv") {
$descript $CURRENT_PIC_DATA['title'];
$pic_html "<script type=\"text/javascript\" src=\"flashobject.js\"></script><div id=\"flashcontent\" style=\"width: 320px; height: 240px\"></div><script type=\"text/javascript\">var fo = new FlashObject(\"flvPlayer.swf\", \"animationName\", \"330\", \"270\", \"8\", \"#FFFFFF\");fo.addParam(\"allowScriptAccess\", \"sameDomain\");fo.addParam(\"quality\", \"high\");fo.addParam(\"FlashVars\", \"flvPath=$picture_url&flvTitle=$descript\");fo.addParam(\"wmode\", \"transparent\");fo.write(\"flashcontent\");</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";
}
?>
Logged

Nibbler

  • Guest
Re: Another FLV Player
« Reply #31 on: June 11, 2007, 01:27:20 am »

You've copied half the function. Copy the whole thing.
Logged

tim18

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
Re: Another FLV Player
« Reply #32 on: July 20, 2007, 11:40:48 am »

Hi,

I have opened up the theme.php file and found that its really a blank canvas.
Code: [Select]
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_NAVBAR_GRAPHICS', 1);
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 main menu
$template_sys_menu = <<<EOT
                <div class="topmenu">
                     {BUTTONS}
                </div>
EOT;

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='';


?>

In your opening post you mentioned something about making sure the function theme_html_picture() exists. By the look of it, i dont think it does. Am i missing something?
Thanks
Tim
Logged

Nibbler

  • Guest
Re: Another FLV Player
« Reply #33 on: July 20, 2007, 12:05:41 pm »

Copy the function from the sample theme.
Logged

ba2

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Another FLV Player
« Reply #34 on: July 23, 2007, 11:36:51 pm »

Hello to all!
I have some problems to install the flv player.
I have a blank theme.php (well there is just some codes)
what do I need to add between the lines :

define('THEME_IS_XHTML10_TRANSITIONAL',1);

?>

thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Another FLV Player
« Reply #35 on: July 25, 2007, 08:29:26 am »

Do as Nibbler suggested just one posting above yours. In the future, read the thread you reply to thoroughly before starting your reply.
Logged

mrdummy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Another FLV Player
« Reply #36 on: August 06, 2007, 02:25:23 pm »

I tried this with 1.4.12

I copied whole function from theme.inc.php inside theme.php
Paste the code for FLV part inside function.
Copied ... ho! The JW Player package has newer swfobject.js (v1.5) and the flashobject.js seems older (v1.2.3).
Both are placed in gallery root.
FLV file type added.

When i run the gallery with modifications, i can add FLV files, but when i want play one, the screen is black.
This is tested in Firefox 2.0.0.6.
With IE 6, the player itself shows indeed up with 'Play' icon. But no clip is visible or playable.

When i check sample html file of JW Player, the settings are different.
Logged

mrdummy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Another FLV Player
« Reply #37 on: August 06, 2007, 02:50:46 pm »

Finally found the problem.
The JW Player is indeed internally changed, thus you need new setting values to play FLV files possible.

This code
Code: [Select]
fo.addParam(\"FlashVars\", \"flvPath=$picture_url&flvTitle=$descript\");

change in
Code: [Select]
fo.addVariable(\"file\",\"$picture_url\");
And you can play finally FLV files. Verified in Firefox and IE 6+
It's important to compare changes with sample HTML inside JW Player zip file. I add new codes from sample HTML file and that is the answer.
The old code in startpost doesn't work with latest zip package.
You may add more codes from sample HTML file inside $pic_html if you want, for example custom colors.
Logged

ULISS

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 60
Re: Another FLV Player
« Reply #38 on: September 13, 2007, 11:10:24 am »

Why the mod is doesh,t worked? What hapend? Sorry for my bad Russian-English.... :P

http://www.usiba.ru/gallery/displayimage-random-10--187.html
Logged

angel777

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • My home
Re: Another FLV Player
« Reply #39 on: September 21, 2007, 03:25:17 am »

How to Editing Theme.php in Coppermine 1.4.13 - Security release?

In this release there isn't
Code: [Select]
// There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = etc etc


Where mod?
 ... at the End I crashed all themes i created i think..lol
Logged
Pages: 1 [2] 3 4 5 6 7   Go Up
 

Page created in 0.037 seconds with 20 queries.