Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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

Author Topic: FLV Player Integration MOD  (Read 275324 times)

0 Members and 2 Guests are viewing this topic.

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: FLV Player Integration MOD
« Reply #20 on: January 24, 2007, 08:47:47 pm »

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
Logged

popersman

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: FLV Player Integration MOD
« Reply #21 on: January 24, 2007, 09:21:02 pm »

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

taiboi

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #22 on: January 24, 2007, 09:52:59 pm »

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

popersman

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: FLV Player Integration MOD
« Reply #23 on: January 25, 2007, 02:16:09 am »

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:
Code: [Select]
$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
Code: [Select]
$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  :-[
Logged

taiboi

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #24 on: January 25, 2007, 03:44:45 pm »

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

Code: [Select]
// 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&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['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);
}
Logged

popersman

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: FLV Player Integration MOD
« Reply #25 on: January 25, 2007, 07:47:53 pm »

I've seen that done by rphMedia on his website (http://gallery.rphmedia.net/), albeit he was using wmv file (see here.
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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4685
    • Windsurf.me
Re: FLV Player Integration MOD
« Reply #26 on: January 30, 2007, 12:05:01 am »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Nibbler

  • Guest
Re: FLV Player Integration MOD
« Reply #27 on: January 30, 2007, 03:25:07 pm »

This mod hardcodes the dimensions. Try changing

Code: [Select]
$pic_html  = "<object type=\"application/x-shockwave-flash\" width=\"320\" height=\"260\" wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";

to

Code: [Select]
$pic_html  = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">";
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4685
    • Windsurf.me
Re: FLV Player Integration MOD
« Reply #28 on: January 30, 2007, 03:30:47 pm »

That's done the trick :)

Thanks for your help, I was running out of hair.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: FLV Player Integration MOD
« Reply #29 on: February 01, 2007, 02:55:17 pm »

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

popersman

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: FLV Player Integration MOD
« Reply #30 on: February 05, 2007, 08:18:13 am »

I can see my videos without any problem, after implementing the solution given by Nibbler.

Here is an example.

However i still have a strange looking 640x480 window in which videos with smaller resolution plays. Here is an example.
Logged

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: FLV Player Integration MOD
« Reply #31 on: February 13, 2007, 01:15:28 pm »

I've done the french traduction of the hack ;-)
Logged

Jerzxu

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #32 on: March 05, 2007, 07:58:44 am »

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

fallenxstar

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #33 on: March 06, 2007, 05:12:10 am »

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
Logged

Jerzxu

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #34 on: March 06, 2007, 05:18:14 am »

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

Jerzxu

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #35 on: March 06, 2007, 05:20:12 am »

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

empfl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • cy tha game
Re: FLV Player Integration MOD
« Reply #36 on: March 15, 2007, 09:29:04 pm »

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

Nibbler

  • Guest
Re: FLV Player Integration MOD
« Reply #37 on: March 15, 2007, 09:34:53 pm »

You didn't copy the code correctly, probably missed out one of the closing braces.
Logged

empfl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • cy tha game
Re: FLV Player Integration MOD
« Reply #38 on: March 15, 2007, 09:52:44 pm »

thx nibbler,

sometimes it work's suddenly on the second try ;-)

regards
Logged

jayjay01

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: FLV Player Integration MOD
« Reply #39 on: March 17, 2007, 03:43:39 pm »

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!
Logged
Pages: 1 [2] 3 4 5 6 ... 11   Go Up
 

Page created in 0.167 seconds with 20 queries.