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 263272 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Another FLV Player
« Reply #100 on: December 05, 2008, 01:15:36 pm »

By the way: I have written a simple script, that adds the filetype to the database (because some people had problems with installing and using the Filetype Editor Plugin).

The steps
Firstly you'll need Nibbler's Filetype Editor Plugin

Add the filetype "flv     application/x-shockwave-flash     movie     Flash Player"
can be skipped with the help of this script.

Just download the attached file in this post, upload the extracted php file to your coppermine root directory and visit it with your browser.


@rphMedia: attach this file to your first post (or include it in your flvPlayer.zip) if you thinks it's useful.
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Another FLV Player
« Reply #101 on: December 17, 2008, 12:23:43 pm »


Modify theme.php (ensure the function theme_html_picture() exists).

To bad you have to do this for every theme if you want the users to be able to select their own theme :)
Is this going to be put into v1.5 ;)
Logged

karbine

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Another FLV Player
« Reply #102 on: June 26, 2009, 12:53:32 pm »

Sorry to sound like a COMPLETE noob but i am new to coppermine so really would appreciate the help.

I Have downloaded step one,nibblers file.   Now from this point i am stuck and confused looking at 3 php files within the zip of nibbles file.

Can you tell me what i need to do after this please.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Logged

karbine

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Another FLV Player
« Reply #105 on: June 29, 2009, 08:07:53 pm »

The section that eenemeenemuu has refered to that explains exactly what you have asked. >:(
Logged

karbine

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Another FLV Player
« Reply #106 on: June 30, 2009, 11:25:55 pm »

I have read the section refered to and im still rather lost.   I tried to upload the .zip file to the plugin manager and once it uploads and the page refreshes it still says "No Plugins Installed"?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Logged

janmanzer411

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
    • Jan Manzer
Re: Another FLV Player
« Reply #108 on: September 11, 2009, 06:52:54 am »

Hi!
I have done exactly what you described, but it won't work. I just get a completely grey field with no content. If I use gwendolyn's player I get something that looks like a player, but nothing happens when I click on play or any other buttons.

This is the part of theme.php that contains the edits I have done:
Code: [Select]
        // 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") {
$descript = $CURRENT_PIC_DATA['title'];
$pic_html = "<script type=\"text/javascript\" src=\"flashobject.js\"></script><div id=\"flashcontent\" style=\"width: 330px; height: 270px\"></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";
    }
}

The link to my video in my coppermine gallery is here: http://jostor.com/gallery/displayimage.php?album=1&pos=66

I hope someone can help me, thankyou very much!

I tried this too. Even doing the root folder correctly, but I think it is version hassles stopping from working

Best,
Jan
Jan Manzer
Logged
Best Regards,
Jan Manzer

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Another FLV Player
« Reply #109 on: September 11, 2009, 09:09:32 am »

I tried this too. Even doing the root folder correctly, but I think it is version hassles stopping from working

Best,
Jan
Jan Manzer
Is this spam or a support request? I can't find a Coppermine installation on your website.
Logged

dos3age

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
  • I LOVE COPPERMINE!!!
    • Barry Zito Collection
Re: Another FLV Player
« Reply #110 on: October 22, 2009, 04:57:01 pm »

I uploaded the "flietype" plugin added the "flv", added the player.swf and flashobject.js to my root.. I added the code to the friuty theme.php right above:
Code: [Select]
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='';


then I tried adding this current to the theme.php:
Code: [Select]
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['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=\"mediaplayer.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);
}


When I go to view my video I only see "white box" nothing is displayed... I can click on box and get adobe message, and if I download I can view on my desktop but not watch on site?

Here is link:

http://christophers-collection.info/displayimage.php?album=18&pos=8


Any Help?
Thank You
Christopher




Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Another FLV Player
« Reply #111 on: October 22, 2009, 06:04:25 pm »

I don't know where you acquired your Flash script (pointing to 'mediaplayer.swf', instead of flvPlayer.swf'), but it's not the one I provided.

If you follow the instructions exactly, you won't have any problems.

dos3age

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
  • I LOVE COPPERMINE!!!
    • Barry Zito Collection
Re: Another FLV Player
« Reply #112 on: October 22, 2009, 11:00:29 pm »

Yes thank you.. I got it working.. just needed to rename player  ::)

Sincerely
Christopher
Logged

ligerzero

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Another FLV Player
« Reply #113 on: January 18, 2010, 01:29:53 pm »

Can i have help here please?

ive followed all the steps, and now have gotten to the player. But it does nothing, just the play button
http://ligerzero.net/coppermine/displayimage.php?album=lastup&cat=0&pos=1

flvPlayer.swf and flashobject.js are in the root directory already

I am using 1.4.25

Thanks very much. :D
Logged

ligerzero

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Another FLV Player
« Reply #114 on: January 19, 2010, 09:27:28 am »

had to use the 2nd flashPlayer.swf which was attached here. Works nicely now. :D
Logged

Magic2010

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Another FLV Player
« Reply #115 on: March 24, 2010, 06:54:08 pm »

Hi there, is it possible to have the player size like 768x512?
I know can change it in the code, but this make also the buttons bigger.

thank you
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Another FLV Player
« Reply #116 on: March 25, 2010, 07:42:17 am »

That's not possible with this mod. Try that mod instead.
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: Another FLV Player
« Reply #117 on: April 23, 2010, 06:03:05 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Another FLV Player
« Reply #118 on: April 23, 2010, 06:56:30 pm »

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
See here. It's the same approach.
Logged

andy_cul

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Incigida
Re: Another FLV Player
« Reply #119 on: May 02, 2010, 04:04:59 am »

how to not autostart playing videos?
Logged
Pages: 1 2 3 4 5 [6] 7   Go Up
 

Page created in 0.032 seconds with 19 queries.