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 8 9 10 11   Go Down

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

0 Members and 1 Guest are viewing this topic.

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #100 on: January 24, 2008, 04:06:03 am »

What I meant that the code was debug info....

Here is theme.php as it is now.

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.4
  $Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
  $Revision: 1.15 $
  $Author: gaugau $
  $Date: 2006/02/24 13:32:45 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// Added to display flim_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&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;
}

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\" ".$image_size['whole']." wmode=\"transparent\" data=\"mediaplayer.swf?file=$flv?autoStart=false\">";
    $pic_html .= "<param name=\"movie\" value=\"mediaplayer.swf?file=$flv?autoStart=false\" />";
    $pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
            
$pic_html .= "</object><br />\n";

        } else {

        
$player $players[$user_player];

        
$pic_html  '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\""$picture_url "\" />";
        
$pic_html .= '<embed '.$image_size['whole'].' src="'$picture_url '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        
$pic_html .= "</object><br />\n";
   
 }
}

    
$CURRENT_PIC_DATA['html'] = $pic_html;
    
$CURRENT_PIC_DATA['header'] = '';
    
$CURRENT_PIC_DATA['footer'] = '';

    
$CURRENT_PIC_DATA CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);

    
$params = array('{CELL_HEIGHT}' => '100',
        
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

    return 
template_eval($template_display_media$params);
}

?>


Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #101 on: January 24, 2008, 05:00:08 am »

Correction: when trying to play the flv.....the "transferring data from SandRailsOnly.com" goes one for almost 1 1/2 minutes until it says done...


flv file is 1.05 mb
avi file is 1.94 mb
mpg file is 3.50 mb
wmv file is 2.51 mb


avi loads right away as does mpg...wmv is a tad slower and you need to push play button.....and flv doesn't load at all...just stalls.
Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #102 on: January 24, 2008, 07:54:32 pm »

Anyone have suggestions as where I should go next?

Thanks for all of your input....
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: FLV Player Integration MOD
« Reply #103 on: January 24, 2008, 08:20:40 pm »

Have you read the entire thread, you might want to try the code at the bottom of this post
Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #104 on: January 24, 2008, 09:04:56 pm »

That did the trick, except that I didn't find Nibbler's Code to change to
Code: [Select]
$pic_html  = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">"; in Popersman's final edition of code to make the flv "mediaplayer" work.

Also, not that this code needed the replacement of flvplayer.swf to mediaplayer.swf.


 ;)
Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #105 on: January 24, 2008, 09:07:11 pm »

But shouldn't it really say

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

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #106 on: January 25, 2008, 01:57:33 am »

Still waiting on an answer folks.... ;D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: FLV Player Integration MOD
« Reply #107 on: January 25, 2008, 09:45:02 am »

This is not a hotline... ::)
Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #108 on: January 25, 2008, 08:41:21 pm »

Sorry, I am just trying to get the final details so that when folks visit our site they get the best impression of us and the software (Coppermine) that is being used. If the function to make the flv player larger isn't working and there is a way to make it work...I just want to apply it.

See above where I searched for Nibbler's code and did not find it in the final code posting.

Thanks in advance for any input.
 :)
Logged

Riox

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 55
Re: FLV Player Integration MOD
« Reply #109 on: February 02, 2008, 04:17:09 am »

I don’t know if this is the right thing to do since Jeroen Wijering's player is not free/OSS but I missed the full-screen capability sooo much :)

This is an Update for already running (an working!) FLV Player MODs

Testsystem: CPG 1.4.14 and JW-FLV-Player Mediaplayer-3-14
Video width=440, height=330

1.  Go to http://www.jeroenwijering.com/?item=JW_FLV_Player and ready the license agreement if it is suitable for you and your site. Download the mediaplayer-3-14.zip and unzip it somewhere.

2. open your themen.php and search for

Code: [Select]
// There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
...
        } else {
...
}
    }

And replace with

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") {
$pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
$descript = $CURRENT_PIC_DATA['title'];
$pic_html = "<script type=\"text/javascript\" src=\"swfobject.js\"></script>
<div id=\"container\" style=\"width: 440px; height: 330px\"></div>
<script type=\"text/javascript\">
var s1 = new SWFObject(\"mediaplayer.swf\",\"mediaplayer\",\"440\",\"330\",\"7\");
s1.addParam(\"allowfullscreen\",\"true\");
s1.addVariable(\"width\",\"440\");
s1.addVariable(\"height\",\"330\");
s1.addVariable(\"file\",\"$picture_url\");
s1.addVariable(\"image\",\"$pic_thumb_url\");
s1.write(\"container\");
</script>";
} else {
        $pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        $pic_html .= "<param name=\"src\" value=\"". $picture_url . "\" /><param name=\"ShowControls\" value=\"1\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"ShowStatusBar\" value=\"1\" /><param name=\"ShowDisplay\" value=\"0\" /><param name=\"DisplaySize\" value=\"0\" /><param name=\"autostart\" value=\"$autostart\" />";
        $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" AllowChangeDisplaySize="1" '.' autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        $pic_html .= "</object><br />\n";
    }
}

Then upload the mediaplayer.swf and swfobject.js the your gallery root.
Logged

popersman

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: FLV Player Integration MOD
« Reply #110 on: February 02, 2008, 03:08:14 pm »

That did the trick, except that I didn't find Nibbler's Code to change to
Code: [Select]
$pic_html  = "<object type=\"application/x-shockwave-flash\" ".$image_size['whole']." wmode=\"transparent\" data=\"flvplayer.swf?file=$flv?autoStart=false\">"; in Popersman's final edition of code to make the flv "mediaplayer" work.

Also, not that this code needed the replacement of flvplayer.swf to mediaplayer.swf.
 ;)
Soleiltan,
You are moddifying and talking about modifying a theme.php that came along with the theme that you chose. As far as my limited understanding of Coppermine allows me to understand, some theme's writers have taken liberties with the code contained in this page, and you may or may not find certain functions. I suggest you compare with the theme.php from the classic theme to see what functions are missing and what can be added.

As for the mediaplayer.swf i do not recall having the need to rename flwplayer. Could a confirmed codder confirm my mistake so that i may change my earlier post to avoid confusing future readers?
Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: FLV Player Integration MOD
« Reply #111 on: February 02, 2008, 11:34:25 pm »

The old version is called flvplayer.swf, the new one mediaplayer.swf, so it depends on what version you have.
This namechange took place because of copyright things.
Logged

soleiltan2

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
    • SandRailsOnly
Re: FLV Player Integration MOD
« Reply #112 on: February 06, 2008, 07:37:26 pm »

Got it working...
Logged

TAZmd

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #113 on: February 08, 2008, 06:47:00 pm »

Hmm after long reading and chancing things around i got it working but
My full screen dont work
And my auto start dont work.

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);
}

I see other ppl post it and than full screen works for tham...
Logged

TAZmd

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: FLV Player Integration MOD
« Reply #114 on: February 08, 2008, 08:02:22 pm »

ok the post from http://forum.coppermine-gallery.net/index.php?topic=34182.msg221287#msg221287 fixed my fullscreen problem

is there anything so the move wil auto start ad loading page?



Also a thing i didnt get is ppl keep talking about sample/theme.php but i had to edit include/themes.inc.php
Coppermine Photo Gallery 1.4.10 (stable)
Just post it for other ppl to read and understand.
Logged

belgiebob

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: FLV Player Integration MOD
« Reply #115 on: March 24, 2008, 09:42:35 pm »

For those of you with trouble getting the video to play.  Don't forget to set the MIME settings for .flv on your web server.  I am using IIS and after setting the mime type (and restarting IIS) everything worked fine. 
Logged

rujikin

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: FLV Player Integration MOD
« Reply #116 on: April 23, 2008, 08:08:40 pm »

K, I found a solution to a problem of some videos not playing, it is so simple.

Try renaming your video to have no unique characters and no spaces, see if it works for any of ya'll
Logged

Sharp

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: FLV Player Integration MOD
« Reply #117 on: May 01, 2008, 02:54:13 am »

Hello everyone,

I'm terribly happy today because after days trying to make works Flvplayer with Coppermine, that's it! It's working!

I just would have a question, the size is specified in the theme.php file, but did there is a way to do not put any size and let the play show the original size of the uploaded video?

If so, how can i do?

Thank you very much.
Logged

net

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: FLV Player Integration MOD
« Reply #118 on: May 14, 2008, 11:45:13 pm »

Hello,

This player supports MP3 as well, but i cannot figure out how to use this properly.

What i've done is:

Code: [Select]
// There isn't a player selected or user wants client-side control
        if (!$user_player) {
            $user_player = 'UNK';
        }

        if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    $pic_html  = "<embed src='flvplayer.swf' width='500' height='375' allowfullscreen='true'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
            $pic_html .= "<br />\n";

        } else {

      $mime_content['content']=='audio' && $mime_content['extension']=='mp3';
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    $pic_html  = "<embed src='flvplayer.swf' width='500' height='20'
type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
flashvars='file=$flv' />";
            $pic_html .= "<br />\n";

}
}

However this messes up any other movie files on my gallery.

What i would like to know is to properly code the following line to take more then one mime:

Code: [Select]
if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {

Something like this:

Code: [Select]
if ($mime_content['content']=='movie,audio' && $mime_content['extension']=='flv,mp3') {
Can someone tell me how to do this?

Thank you.


Logged

net

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: FLV Player Integration MOD
« Reply #119 on: May 15, 2008, 01:15:29 am »

Solved the above:

Code: [Select]
        if ($mime_content['content']=='movie' && $mime_content['extension']=='flv') {
$descript = $CURRENT_PIC_DATA['title'];
$flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html  = "<embed src='flvplayer.swf' width='500' height='375' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='file=$flv' />";
 } elseif ($mime_content['content']=='audio' && $mime_content['extension']=='mp3') {
    $flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html  = "<embed src='flvplayer.swf' width='500' height='20' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='file=$flv' />";
} else {..........................[code]

Thanks for the mod.
[/code]
Logged
Pages: 1 2 3 4 5 [6] 7 8 9 10 11   Go Up
 

Page created in 0.033 seconds with 20 queries.